Skip to content

Commit 980fffd

Browse files
Jessica Zhanglumag
authored andcommitted
drm/msm/dpu: Set input_sel bit for INTF
Set the input_sel bit for encoders as it was missed in the initial implementation. Reported-by: Rob Clark <robdclark@gmail.com> Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/39 Fixes: 9114387 ("drm/msm/dpu: Add MISR register support for interface") Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/572007/ Link: https://lore.kernel.org/r/20231213-encoder-fixup-v4-1-6da6cd1bf118@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent aee797d commit 980fffd

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static u32 dpu_hw_intf_get_line_count(struct dpu_hw_intf *intf)
322322

323323
static void dpu_hw_intf_setup_misr(struct dpu_hw_intf *intf, bool enable, u32 frame_count)
324324
{
325-
dpu_hw_setup_misr(&intf->hw, INTF_MISR_CTRL, enable, frame_count);
325+
dpu_hw_setup_misr(&intf->hw, INTF_MISR_CTRL, enable, frame_count, 0x1);
326326
}
327327

328328
static int dpu_hw_intf_collect_misr(struct dpu_hw_intf *intf, u32 *misr_value)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void dpu_hw_lm_setup_border_color(struct dpu_hw_mixer *ctx,
8585

8686
static void dpu_hw_lm_setup_misr(struct dpu_hw_mixer *ctx, bool enable, u32 frame_count)
8787
{
88-
dpu_hw_setup_misr(&ctx->hw, LM_MISR_CTRL, enable, frame_count);
88+
dpu_hw_setup_misr(&ctx->hw, LM_MISR_CTRL, enable, frame_count, 0x0);
8989
}
9090

9191
static int dpu_hw_lm_collect_misr(struct dpu_hw_mixer *ctx, u32 *misr_value)

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,13 @@ void _dpu_hw_setup_qos_lut(struct dpu_hw_blk_reg_map *c, u32 offset,
475475
cfg->danger_safe_en ? QOS_QOS_CTRL_DANGER_SAFE_EN : 0);
476476
}
477477

478+
/*
479+
* note: Aside from encoders, input_sel should be set to 0x0 by default
480+
*/
478481
void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c,
479482
u32 misr_ctrl_offset,
480-
bool enable, u32 frame_count)
483+
bool enable, u32 frame_count,
484+
u8 input_sel)
481485
{
482486
u32 config = 0;
483487

@@ -488,7 +492,8 @@ void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c,
488492

489493
if (enable) {
490494
config = (frame_count & MISR_FRAME_COUNT_MASK) |
491-
MISR_CTRL_ENABLE | MISR_CTRL_FREE_RUN_MASK;
495+
MISR_CTRL_ENABLE | MISR_CTRL_FREE_RUN_MASK |
496+
((input_sel & 0xF) << 24);
492497

493498
DPU_REG_WRITE(c, misr_ctrl_offset, config);
494499
} else {

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ void _dpu_hw_setup_qos_lut(struct dpu_hw_blk_reg_map *c, u32 offset,
363363
void dpu_hw_setup_misr(struct dpu_hw_blk_reg_map *c,
364364
u32 misr_ctrl_offset,
365365
bool enable,
366-
u32 frame_count);
366+
u32 frame_count,
367+
u8 input_sel);
367368

368369
int dpu_hw_collect_misr(struct dpu_hw_blk_reg_map *c,
369370
u32 misr_ctrl_offset,

0 commit comments

Comments
 (0)