Skip to content

Commit d7df5e2

Browse files
committed
Merge tag 'drm-msm-fixes-2022-08-27' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
Fixes for v6.0 - Fix for inconsistent indenting in function msm_dsi_dphy_timing_calc_v3. This fixes a smatch warning reported by kbot - Fix to make eDP the first connector in the connected list. This was mainly done to address a screen corruption issue we were seeing on sc7280 boards which have eDP as the primary display. The corruption itself is from usermode but we decided to fix it this way because things work correct with the primary display as the first one for usermode - Fix to populate intf_cfg correctly before calling reset_intf_cfg(). Without this, the display pipeline is not torn down correctly for writeback - Specify the correct number of DSI regulators for SDM660. It should have been 1 but 2 was mentioned - Specify the correct number of DSI regulators for MSM8996. It should have been 3 but 2 was mentioned - Fix for removing DP_RECOVERED_CLOCK_OUT_EN bit for tps4 link training for DP. This was causing link training failures and hence no display for a specific DP to HDMI cable on chromebooks - Fix probe-deferral crash in gpu devfreq - Fix gpu debugfs deadlock Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtuY=jd44itwTkLXVqhnoKgY0BswPTrxDTxCiPG3WbmLA@mail.gmail.com
2 parents c1dd5d2 + 174974d commit d7df5e2

7 files changed

Lines changed: 17 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,12 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
20612061

20622062
intf_cfg.stream_sel = 0; /* Don't care value for video mode */
20632063
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
2064+
2065+
if (phys_enc->hw_intf)
2066+
intf_cfg.intf = phys_enc->hw_intf->idx;
2067+
if (phys_enc->hw_wb)
2068+
intf_cfg.wb = phys_enc->hw_wb->idx;
2069+
20642070
if (phys_enc->hw_pp->merge_3d)
20652071
intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx;
20662072

drivers/gpu/drm/msm/dp/dp_ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ static int dp_ctrl_link_train_2(struct dp_ctrl_private *ctrl,
12141214
if (ret)
12151215
return ret;
12161216

1217-
dp_ctrl_train_pattern_set(ctrl, pattern | DP_RECOVERED_CLOCK_OUT_EN);
1217+
dp_ctrl_train_pattern_set(ctrl, pattern);
12181218

12191219
for (tries = 0; tries <= maximum_retries; tries++) {
12201220
drm_dp_link_train_channel_eq_delay(ctrl->aux, ctrl->panel->dpcd);

drivers/gpu/drm/msm/dsi/dsi_cfg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static const char * const dsi_8996_bus_clk_names[] = {
109109
static const struct msm_dsi_config msm8996_dsi_cfg = {
110110
.io_offset = DSI_6G_REG_SHIFT,
111111
.reg_cfg = {
112-
.num = 2,
112+
.num = 3,
113113
.regs = {
114114
{"vdda", 18160, 1 }, /* 1.25 V */
115115
{"vcca", 17000, 32 }, /* 0.925 V */
@@ -148,7 +148,7 @@ static const char * const dsi_sdm660_bus_clk_names[] = {
148148
static const struct msm_dsi_config sdm660_dsi_cfg = {
149149
.io_offset = DSI_6G_REG_SHIFT,
150150
.reg_cfg = {
151-
.num = 2,
151+
.num = 1,
152152
.regs = {
153153
{"vdda", 12560, 4 }, /* 1.2 V */
154154
},

drivers/gpu/drm/msm/dsi/phy/dsi_phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ int msm_dsi_dphy_timing_calc_v3(struct msm_dsi_dphy_timing *timing,
347347
} else {
348348
timing->shared_timings.clk_pre =
349349
linear_inter(tmax, tmin, pcnt2, 0, false);
350-
timing->shared_timings.clk_pre_inc_by_2 = 0;
350+
timing->shared_timings.clk_pre_inc_by_2 = 0;
351351
}
352352

353353
timing->ta_go = 3;

drivers/gpu/drm/msm/msm_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,8 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
469469
}
470470
}
471471

472+
drm_helper_move_panel_connectors_to_head(ddev);
473+
472474
ddev->mode_config.funcs = &mode_config_funcs;
473475
ddev->mode_config.helper_private = &mode_config_helper_funcs;
474476

drivers/gpu/drm/msm/msm_gpu_devfreq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ void msm_devfreq_init(struct msm_gpu *gpu)
213213

214214
if (IS_ERR(df->devfreq)) {
215215
DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
216+
dev_pm_qos_remove_request(&df->idle_freq);
217+
dev_pm_qos_remove_request(&df->boost_freq);
216218
df->devfreq = NULL;
217219
return;
218220
}

drivers/gpu/drm/msm/msm_rd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ static int rd_open(struct inode *inode, struct file *file)
196196
file->private_data = rd;
197197
rd->open = true;
198198

199+
/* Reset fifo to clear any previously unread data: */
200+
rd->fifo.head = rd->fifo.tail = 0;
201+
199202
/* the parsing tools need to know gpu-id to know which
200203
* register database to load.
201204
*

0 commit comments

Comments
 (0)