Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dpu: correct error messages in RM

Some of error messages in RM reference block index, while other print
the enum value (which is shifted by 1), not to mention that some of the
messages are misleading. Reformat the messages, making them more clear
and also always printing the hardware block name.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/698774/
Link: https://lore.kernel.org/r/20260115-dpu-fix-dspp-v1-1-b73152c147b3@oss.qualcomm.com

+10 -12
+10 -12
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
··· 315 315 316 316 /* Already reserved? */ 317 317 if (reserved_by_other(global_state->mixer_to_crtc_id, lm_idx, crtc_id)) { 318 - DPU_DEBUG("lm %d already reserved\n", lm_idx + LM_0); 318 + DPU_DEBUG("LM_%d already reserved\n", lm_idx); 319 319 return false; 320 320 } 321 321 322 322 lm_cfg = to_dpu_hw_mixer(rm->mixer_blks[lm_idx])->cap; 323 323 idx = lm_cfg->pingpong - PINGPONG_0; 324 - if (idx < 0 || idx >= ARRAY_SIZE(rm->pingpong_blks)) { 325 - DPU_ERROR("failed to get pp on lm %d\n", lm_cfg->pingpong); 324 + if (idx < 0 || idx >= ARRAY_SIZE(rm->pingpong_blks) || !rm->pingpong_blks[idx]) { 325 + DPU_ERROR("LM_%d, invalid PP_%d\n", lm_idx, idx); 326 326 return false; 327 327 } 328 328 329 329 if (reserved_by_other(global_state->pingpong_to_crtc_id, idx, crtc_id)) { 330 - DPU_DEBUG("lm %d pp %d already reserved\n", lm_cfg->id, 331 - lm_cfg->pingpong); 330 + DPU_DEBUG("LM_%d PP_%d already reserved\n", lm_idx, idx); 332 331 return false; 333 332 } 334 333 *pp_idx = idx; ··· 336 337 return true; 337 338 338 339 idx = lm_cfg->dspp - DSPP_0; 339 - if (idx < 0 || idx >= ARRAY_SIZE(rm->dspp_blks)) { 340 - DPU_ERROR("failed to get dspp on lm %d\n", lm_cfg->dspp); 340 + if (idx < 0 || idx >= ARRAY_SIZE(rm->dspp_blks) || !rm->dspp_blks[idx]) { 341 + DPU_ERROR("LM_%d, invalid DSPP_%d\n", lm_idx, idx); 341 342 return false; 342 343 } 343 344 344 345 if (reserved_by_other(global_state->dspp_to_crtc_id, idx, crtc_id)) { 345 - DPU_DEBUG("lm %d dspp %d already reserved\n", lm_cfg->id, 346 - lm_cfg->dspp); 346 + DPU_DEBUG("LM_%d DSPP_%d already reserved\n", lm_idx, idx); 347 347 return false; 348 348 } 349 349 *dspp_idx = idx; ··· 362 364 int i, lm_count = 0; 363 365 364 366 if (!topology->num_lm) { 365 - DPU_ERROR("invalid number of lm: %d\n", topology->num_lm); 367 + DPU_ERROR("zero LMs in topology\n"); 366 368 return -EINVAL; 367 369 } 368 370 ··· 466 468 features = ctl->caps->features; 467 469 has_split_display = BIT(DPU_CTL_SPLIT_DISPLAY) & features; 468 470 469 - DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features); 471 + DPU_DEBUG("CTL_%d caps 0x%lX\n", j, features); 470 472 471 473 if (needs_split_display != has_split_display) 472 474 continue; 473 475 474 476 ctl_idx[i] = j; 475 - DPU_DEBUG("ctl %d match\n", j + CTL_0); 477 + DPU_DEBUG("CTL_%d match\n", j); 476 478 477 479 if (++i == num_ctls) 478 480 break;