Skip to content

Commit c8bc662

Browse files
committed
Merge tag 'amd-drm-fixes-6.14-2025-03-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.14-2025-03-06: amdgpu: - Fix NULL check in DC code - SMU 14 fix amdkfd: - Fix NULL check in queue validation radeon: - RS400 HyperZ fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250306193424.27413-1-alexander.deucher@amd.com
2 parents eea6520 + da552bd commit c8bc662

File tree

6 files changed

+24
-17
lines changed

6 files changed

+24
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_prope
266266
/* EOP buffer is not required for all ASICs */
267267
if (properties->eop_ring_buffer_address) {
268268
if (properties->eop_ring_buffer_size != topo_dev->node_props.eop_buffer_size) {
269-
pr_debug("queue eop bo size 0x%lx not equal to node eop buf size 0x%x\n",
270-
properties->eop_buf_bo->tbo.base.size,
269+
pr_debug("queue eop bo size 0x%x not equal to node eop buf size 0x%x\n",
270+
properties->eop_ring_buffer_size,
271271
topo_dev->node_props.eop_buffer_size);
272272
err = -EINVAL;
273273
goto out_err_unreserve;

drivers/gpu/drm/amd/display/dc/core/dc_resource.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,8 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
14551455
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
14561456

14571457
/* Invalid input */
1458-
if (!plane_state->dst_rect.width ||
1458+
if (!plane_state ||
1459+
!plane_state->dst_rect.width ||
14591460
!plane_state->dst_rect.height ||
14601461
!plane_state->src_rect.width ||
14611462
!plane_state->src_rect.height) {

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,16 +1895,6 @@ static int smu_v14_0_allow_ih_interrupt(struct smu_context *smu)
18951895
NULL);
18961896
}
18971897

1898-
static int smu_v14_0_process_pending_interrupt(struct smu_context *smu)
1899-
{
1900-
int ret = 0;
1901-
1902-
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_ACDC_BIT))
1903-
ret = smu_v14_0_allow_ih_interrupt(smu);
1904-
1905-
return ret;
1906-
}
1907-
19081898
int smu_v14_0_enable_thermal_alert(struct smu_context *smu)
19091899
{
19101900
int ret = 0;
@@ -1916,7 +1906,7 @@ int smu_v14_0_enable_thermal_alert(struct smu_context *smu)
19161906
if (ret)
19171907
return ret;
19181908

1919-
return smu_v14_0_process_pending_interrupt(smu);
1909+
return smu_v14_0_allow_ih_interrupt(smu);
19201910
}
19211911

19221912
int smu_v14_0_disable_thermal_alert(struct smu_context *smu)

drivers/gpu/drm/radeon/r300.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ int r300_mc_wait_for_idle(struct radeon_device *rdev)
359359
return -1;
360360
}
361361

362-
static void r300_gpu_init(struct radeon_device *rdev)
362+
/* rs400_gpu_init also calls this! */
363+
void r300_gpu_init(struct radeon_device *rdev)
363364
{
364365
uint32_t gb_tile_config, tmp;
365366

drivers/gpu/drm/radeon/radeon_asic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ void r200_set_safe_registers(struct radeon_device *rdev);
165165
*/
166166
extern int r300_init(struct radeon_device *rdev);
167167
extern void r300_fini(struct radeon_device *rdev);
168+
extern void r300_gpu_init(struct radeon_device *rdev);
168169
extern int r300_suspend(struct radeon_device *rdev);
169170
extern int r300_resume(struct radeon_device *rdev);
170171
extern int r300_asic_reset(struct radeon_device *rdev, bool hard);

drivers/gpu/drm/radeon/rs400.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,22 @@ int rs400_mc_wait_for_idle(struct radeon_device *rdev)
256256

257257
static void rs400_gpu_init(struct radeon_device *rdev)
258258
{
259-
/* FIXME: is this correct ? */
260-
r420_pipes_init(rdev);
259+
/* Earlier code was calling r420_pipes_init and then
260+
* rs400_mc_wait_for_idle(rdev). The problem is that
261+
* at least on my Mobility Radeon Xpress 200M RC410 card
262+
* that ends up in this code path ends up num_gb_pipes == 3
263+
* while the card seems to have only one pipe. With the
264+
* r420 pipe initialization method.
265+
*
266+
* Problems shown up as HyperZ glitches, see:
267+
* https://bugs.freedesktop.org/show_bug.cgi?id=110897
268+
*
269+
* Delegating initialization to r300 code seems to work
270+
* and results in proper pipe numbers. The rs400 cards
271+
* are said to be not r400, but r300 kind of cards.
272+
*/
273+
r300_gpu_init(rdev);
274+
261275
if (rs400_mc_wait_for_idle(rdev)) {
262276
pr_warn("rs400: Failed to wait MC idle while programming pipes. Bad things might happen. %08x\n",
263277
RREG32(RADEON_MC_STATUS));

0 commit comments

Comments
 (0)