Skip to content

Commit 153a97b

Browse files
committed
Merge tag 'drm-misc-fixes-2022-09-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Short summary of fixes pull: * bridge/analogix: Revert earlier suspend fix * bridge/lt8912b: Fix corrupt display output Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/YzWvHhaqHhYirn4L@linux-uq9g
2 parents f76349c + cc62d98 commit 153a97b

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

drivers/gpu/drm/bridge/analogix/analogix_dp_core.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,12 +1864,6 @@ EXPORT_SYMBOL_GPL(analogix_dp_remove);
18641864
int analogix_dp_suspend(struct analogix_dp_device *dp)
18651865
{
18661866
clk_disable_unprepare(dp->clock);
1867-
1868-
if (dp->plat_data->panel) {
1869-
if (drm_panel_unprepare(dp->plat_data->panel))
1870-
DRM_ERROR("failed to turnoff the panel\n");
1871-
}
1872-
18731867
return 0;
18741868
}
18751869
EXPORT_SYMBOL_GPL(analogix_dp_suspend);
@@ -1884,13 +1878,6 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
18841878
return ret;
18851879
}
18861880

1887-
if (dp->plat_data->panel) {
1888-
if (drm_panel_prepare(dp->plat_data->panel)) {
1889-
DRM_ERROR("failed to setup the panel\n");
1890-
return -EBUSY;
1891-
}
1892-
}
1893-
18941881
return 0;
18951882
}
18961883
EXPORT_SYMBOL_GPL(analogix_dp_resume);

drivers/gpu/drm/bridge/lontium-lt8912b.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int lt8912_write_lvds_config(struct lt8912 *lt)
188188
{0x03, 0xff},
189189
};
190190

191-
return regmap_multi_reg_write(lt->regmap[I2C_CEC_DSI], seq, ARRAY_SIZE(seq));
191+
return regmap_multi_reg_write(lt->regmap[I2C_MAIN], seq, ARRAY_SIZE(seq));
192192
};
193193

194194
static inline struct lt8912 *bridge_to_lt8912(struct drm_bridge *b)
@@ -268,7 +268,7 @@ static int lt8912_video_setup(struct lt8912 *lt)
268268
u32 hactive, h_total, hpw, hfp, hbp;
269269
u32 vactive, v_total, vpw, vfp, vbp;
270270
u8 settle = 0x08;
271-
int ret;
271+
int ret, hsync_activehigh, vsync_activehigh;
272272

273273
if (!lt)
274274
return -EINVAL;
@@ -278,12 +278,14 @@ static int lt8912_video_setup(struct lt8912 *lt)
278278
hpw = lt->mode.hsync_len;
279279
hbp = lt->mode.hback_porch;
280280
h_total = hactive + hfp + hpw + hbp;
281+
hsync_activehigh = lt->mode.flags & DISPLAY_FLAGS_HSYNC_HIGH;
281282

282283
vactive = lt->mode.vactive;
283284
vfp = lt->mode.vfront_porch;
284285
vpw = lt->mode.vsync_len;
285286
vbp = lt->mode.vback_porch;
286287
v_total = vactive + vfp + vpw + vbp;
288+
vsync_activehigh = lt->mode.flags & DISPLAY_FLAGS_VSYNC_HIGH;
287289

288290
if (vactive <= 600)
289291
settle = 0x04;
@@ -317,6 +319,13 @@ static int lt8912_video_setup(struct lt8912 *lt)
317319
ret |= regmap_write(lt->regmap[I2C_CEC_DSI], 0x3e, hfp & 0xff);
318320
ret |= regmap_write(lt->regmap[I2C_CEC_DSI], 0x3f, hfp >> 8);
319321

322+
ret |= regmap_update_bits(lt->regmap[I2C_MAIN], 0xab, BIT(0),
323+
vsync_activehigh ? BIT(0) : 0);
324+
ret |= regmap_update_bits(lt->regmap[I2C_MAIN], 0xab, BIT(1),
325+
hsync_activehigh ? BIT(1) : 0);
326+
ret |= regmap_update_bits(lt->regmap[I2C_MAIN], 0xb2, BIT(0),
327+
lt->connector.display_info.is_hdmi ? BIT(0) : 0);
328+
320329
return ret;
321330
}
322331

0 commit comments

Comments
 (0)