Skip to content

Commit 9f59341

Browse files
committed
Revert "drm/msm/dpu: try reserving the DSPP-less LM first"
This reverts commit 42f62cd ("drm/msm/dpu: try reserving the DSPP-less LM first"). It seems on later DPUs using higher LMs require some additional setup or conflicts with the hardware defaults. Val (and other developers) reported blue screen on Hamoa (X1E80100) laptops. Revert the offending commit until we understand, what is the issue. Fixes: 42f62cd ("drm/msm/dpu: try reserving the DSPP-less LM first") Reported-by: Val Packett <val@packett.cool> Closes: https://lore.kernel.org/r/33424a9d-10a6-4479-bba6-12f8ce60da1a@packett.cool Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Tested-by: Manivannan Sadhasivam <mani@kernel.org> # T14s Patchwork: https://patchwork.freedesktop.org/patch/704814/ Link: https://lore.kernel.org/r/20260214-revert-dspp-less-v1-1-be0d636a2a6e@oss.qualcomm.com
1 parent b1dcc80 commit 9f59341

1 file changed

Lines changed: 14 additions & 38 deletions

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -350,26 +350,28 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(struct dpu_rm *rm,
350350
return true;
351351
}
352352

353-
static bool dpu_rm_find_lms(struct dpu_rm *rm,
354-
struct dpu_global_state *global_state,
355-
uint32_t crtc_id, bool skip_dspp,
356-
struct msm_display_topology *topology,
357-
int *lm_idx, int *pp_idx, int *dspp_idx)
353+
static int _dpu_rm_reserve_lms(struct dpu_rm *rm,
354+
struct dpu_global_state *global_state,
355+
uint32_t crtc_id,
356+
struct msm_display_topology *topology)
358357

359358
{
359+
int lm_idx[MAX_BLOCKS];
360+
int pp_idx[MAX_BLOCKS];
361+
int dspp_idx[MAX_BLOCKS] = {0};
360362
int i, lm_count = 0;
361363

364+
if (!topology->num_lm) {
365+
DPU_ERROR("zero LMs in topology\n");
366+
return -EINVAL;
367+
}
368+
362369
/* Find a primary mixer */
363370
for (i = 0; i < ARRAY_SIZE(rm->mixer_blks) &&
364371
lm_count < topology->num_lm; i++) {
365372
if (!rm->mixer_blks[i])
366373
continue;
367374

368-
if (skip_dspp && to_dpu_hw_mixer(rm->mixer_blks[i])->cap->dspp) {
369-
DPU_DEBUG("Skipping LM_%d, skipping LMs with DSPPs\n", i);
370-
continue;
371-
}
372-
373375
/*
374376
* Reset lm_count to an even index. This will drop the previous
375377
* primary mixer if failed to find its peer.
@@ -408,38 +410,12 @@ static bool dpu_rm_find_lms(struct dpu_rm *rm,
408410
}
409411
}
410412

411-
return lm_count == topology->num_lm;
412-
}
413-
414-
static int _dpu_rm_reserve_lms(struct dpu_rm *rm,
415-
struct dpu_global_state *global_state,
416-
uint32_t crtc_id,
417-
struct msm_display_topology *topology)
418-
419-
{
420-
int lm_idx[MAX_BLOCKS];
421-
int pp_idx[MAX_BLOCKS];
422-
int dspp_idx[MAX_BLOCKS] = {0};
423-
int i;
424-
bool found;
425-
426-
if (!topology->num_lm) {
427-
DPU_ERROR("zero LMs in topology\n");
428-
return -EINVAL;
429-
}
430-
431-
/* Try using non-DSPP LM blocks first */
432-
found = dpu_rm_find_lms(rm, global_state, crtc_id, !topology->num_dspp,
433-
topology, lm_idx, pp_idx, dspp_idx);
434-
if (!found && !topology->num_dspp)
435-
found = dpu_rm_find_lms(rm, global_state, crtc_id, false,
436-
topology, lm_idx, pp_idx, dspp_idx);
437-
if (!found) {
413+
if (lm_count != topology->num_lm) {
438414
DPU_DEBUG("unable to find appropriate mixers\n");
439415
return -ENAVAIL;
440416
}
441417

442-
for (i = 0; i < topology->num_lm; i++) {
418+
for (i = 0; i < lm_count; i++) {
443419
global_state->mixer_to_crtc_id[lm_idx[i]] = crtc_id;
444420
global_state->pingpong_to_crtc_id[pp_idx[i]] = crtc_id;
445421
global_state->dspp_to_crtc_id[dspp_idx[i]] =

0 commit comments

Comments
 (0)