Skip to content

Commit 48bb67d

Browse files
committed
Merge tag 'drm-fixes-2023-09-22-2' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Ben Skeggs is stepping away from nouveau and Red Hat for personal reasons, he'll be missed and we intend to fill the gaps in the upcoming time with Danilo and Lyude stepping in for now. Otherwise i915, nouveau, amdgpu with a few each and some misc spread around. MAINTAINERS: - drop Ben as he retired from nouveau core: - drm_mm test fixes fbdev: - Kconfig fixes ivpu: - IRQ-handling fixes meson: - Fix memory leak in HDMI EDID code nouveau: - Correct type casting - Fix memory leak in scheduler - u_memcpya() fixes i915: - Prevent error pointer dereference - Fix PMU busyness values when using GuC mode amdgpu: - MST fix - Vbios part number reporting fix - Fix a possible memory leak in an error case in the RAS code - Fix low resolution modes on eDP amdkfd: - Fix GPU address for user queue wptr when GART is not at 0" * tag 'drm-fixes-2023-09-22-2' of git://anongit.freedesktop.org/drm/drm: MAINTAINERS: remove myself as nouveau maintainer fbdev/sh7760fb: Depend on FB=y drm/amdkfd: Use gpu_offset for user queue's wptr drm/amd/display: fix the ability to use lower resolution modes on eDP drm/amdgpu: fix a memory leak in amdgpu_ras_feature_enable Revert "drm/amdgpu: Report vbios version instead of PN" drm/amd/display: Fix MST recognizes connected displays as one drm/virtio: clean out_fence on complete_submit i915/pmu: Move execlist stats initialization to execlist specific setup drm/i915/gt: Prevent error pointer dereference drm/meson: fix memory leak on ->hpd_notify callback accel/ivpu/40xx: Fix buttress interrupt handling nouveau/u_memcpya: fix NULL vs error pointer bug nouveau/u_memcpya: use vmemdup_user drm/nouveau: sched: fix leaking memory of timedout job drm/nouveau: fence: fix type cast warning in nouveau_fence_emit() drm: fix up fbdev Kconfig defaults drm/tests: Fix incorrect argument in drm_test_mm_insert_range
2 parents 2f8d62d + b41b283 commit 48bb67d

23 files changed

+61
-53
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6645,7 +6645,6 @@ F: Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
66456645
F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c
66466646

66476647
DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
6648-
M: Ben Skeggs <bskeggs@redhat.com>
66496648
M: Karol Herbst <kherbst@redhat.com>
66506649
M: Lyude Paul <lyude@redhat.com>
66516650
L: dri-devel@lists.freedesktop.org

drivers/accel/ivpu/ivpu_hw_40xx.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,8 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
10461046
if (status == 0)
10471047
return IRQ_NONE;
10481048

1049-
REGB_WR32(VPU_40XX_BUTTRESS_INTERRUPT_STAT, status);
1049+
/* Disable global interrupt before handling local buttress interrupts */
1050+
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
10501051

10511052
if (REG_TEST_FLD(VPU_40XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status))
10521053
ivpu_dbg(vdev, IRQ, "FREQ_CHANGE");
@@ -1092,6 +1093,12 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
10921093
schedule_recovery = true;
10931094
}
10941095

1096+
/* This must be done after interrupts are cleared at the source. */
1097+
REGB_WR32(VPU_40XX_BUTTRESS_INTERRUPT_STAT, status);
1098+
1099+
/* Re-enable global interrupt */
1100+
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
1101+
10951102
if (schedule_recovery)
10961103
ivpu_pm_schedule_recovery(vdev);
10971104

drivers/gpu/drm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ config DRM_FBDEV_EMULATION
136136
bool "Enable legacy fbdev support for your modesetting driver"
137137
depends on DRM
138138
select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
139-
default y
139+
default FB
140140
help
141141
Choose this option if you have a need for the legacy fbdev
142142
support. Note that this support also provides the linux console

drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ static ssize_t amdgpu_atombios_get_vbios_version(struct device *dev,
17761776
struct amdgpu_device *adev = drm_to_adev(ddev);
17771777
struct atom_context *ctx = adev->mode_info.atom_context;
17781778

1779-
return sysfs_emit(buf, "%s\n", ctx->vbios_ver_str);
1779+
return sysfs_emit(buf, "%s\n", ctx->vbios_pn);
17801780
}
17811781

17821782
static DEVICE_ATTR(vbios_version, 0444, amdgpu_atombios_get_vbios_version,

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
801801
enable ? "enable":"disable",
802802
get_ras_block_str(head),
803803
amdgpu_ras_is_poison_mode_supported(adev), ret);
804+
kfree(info);
804805
return ret;
805806
}
806807

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
216216

217217
if (q->wptr_bo) {
218218
wptr_addr_off = (uint64_t)q->properties.write_ptr & (PAGE_SIZE - 1);
219-
queue_input.wptr_mc_addr = ((uint64_t)q->wptr_bo->tbo.resource->start << PAGE_SHIFT) + wptr_addr_off;
219+
queue_input.wptr_mc_addr = amdgpu_bo_gpu_offset(q->wptr_bo) + wptr_addr_off;
220220
}
221221

222222
queue_input.is_kfd_process = 1;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6098,8 +6098,6 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
60986098

60996099
if (recalculate_timing)
61006100
drm_mode_set_crtcinfo(&saved_mode, 0);
6101-
else if (!old_stream)
6102-
drm_mode_set_crtcinfo(&mode, 0);
61036101

61046102
/*
61056103
* If scaling is enabled and refresh rate didn't change
@@ -6661,6 +6659,8 @@ enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connec
66616659
goto fail;
66626660
}
66636661

6662+
drm_mode_set_crtcinfo(mode, 0);
6663+
66646664
stream = create_validate_stream_for_sink(aconnector, mode,
66656665
to_dm_connector_state(connector->state),
66666666
NULL);

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,12 +1178,15 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
11781178
dto_params.otg_inst = tg->inst;
11791179
dto_params.timing = &pipe_ctx->stream->timing;
11801180
dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
1181-
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
1182-
dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
1183-
dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, dp_hpo_inst);
1184-
} else if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST && dccg->funcs->disable_symclk_se)
1181+
if (dccg) {
1182+
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
1183+
dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
1184+
dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, dp_hpo_inst);
1185+
}
1186+
} else if (dccg && dccg->funcs->disable_symclk_se) {
11851187
dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,
11861188
link_enc->transmitter - TRANSMITTER_UNIPHY_A);
1189+
}
11871190

11881191
if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
11891192
/* TODO: This looks like a bug to me as we are disabling HPO IO when
@@ -2658,11 +2661,11 @@ void dce110_prepare_bandwidth(
26582661
struct clk_mgr *dccg = dc->clk_mgr;
26592662

26602663
dce110_set_safe_displaymarks(&context->res_ctx, dc->res_pool);
2661-
2662-
dccg->funcs->update_clocks(
2663-
dccg,
2664-
context,
2665-
false);
2664+
if (dccg)
2665+
dccg->funcs->update_clocks(
2666+
dccg,
2667+
context,
2668+
false);
26662669
}
26672670

26682671
void dce110_optimize_bandwidth(
@@ -2673,10 +2676,11 @@ void dce110_optimize_bandwidth(
26732676

26742677
dce110_set_displaymarks(dc, context);
26752678

2676-
dccg->funcs->update_clocks(
2677-
dccg,
2678-
context,
2679-
true);
2679+
if (dccg)
2680+
dccg->funcs->update_clocks(
2681+
dccg,
2682+
context,
2683+
true);
26802684
}
26812685

26822686
static void dce110_program_front_end_for_pipe(

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,8 +2692,6 @@ void dcn20_enable_stream(struct pipe_ctx *pipe_ctx)
26922692
struct dce_hwseq *hws = dc->hwseq;
26932693
unsigned int k1_div = PIXEL_RATE_DIV_NA;
26942694
unsigned int k2_div = PIXEL_RATE_DIV_NA;
2695-
struct link_encoder *link_enc = link_enc_cfg_get_link_enc(pipe_ctx->stream->link);
2696-
struct stream_encoder *stream_enc = pipe_ctx->stream_res.stream_enc;
26972695

26982696
if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
26992697
if (dc->hwseq->funcs.setup_hpo_hw_control)
@@ -2713,10 +2711,8 @@ void dcn20_enable_stream(struct pipe_ctx *pipe_ctx)
27132711
dto_params.timing = &pipe_ctx->stream->timing;
27142712
dto_params.ref_dtbclk_khz = dc->clk_mgr->funcs->get_dtb_ref_clk_frequency(dc->clk_mgr);
27152713
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
2716-
} else if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST && dccg->funcs->enable_symclk_se)
2717-
dccg->funcs->enable_symclk_se(dccg,
2718-
stream_enc->stream_enc_inst, link_enc->transmitter - TRANSMITTER_UNIPHY_A);
2719-
2714+
} else {
2715+
}
27202716
if (hws->funcs.calculate_dccg_k1_k2_values && dc->res_pool->dccg->funcs->set_pixel_rate_div) {
27212717
hws->funcs.calculate_dccg_k1_k2_values(pipe_ctx, &k1_div, &k2_div);
27222718

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void mpc32_power_on_blnd_lut(
7575
if (power_on) {
7676
REG_UPDATE(MPCC_MCM_MEM_PWR_CTRL[mpcc_id], MPCC_MCM_1DLUT_MEM_PWR_FORCE, 0);
7777
REG_WAIT(MPCC_MCM_MEM_PWR_CTRL[mpcc_id], MPCC_MCM_1DLUT_MEM_PWR_STATE, 0, 1, 5);
78-
} else {
78+
} else if (!mpc->ctx->dc->debug.disable_mem_low_power) {
7979
ASSERT(false);
8080
/* TODO: change to mpc
8181
* dpp_base->ctx->dc->optimized_required = true;

0 commit comments

Comments
 (0)