mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/bridge: analogix_dp: Use video format information from register
Force sync polarity to active low for RK3588. Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com> Change-Id: Icbc2b344d67dd1b8e288cfd5117b5065fd4b2142
This commit is contained in:
@@ -839,7 +839,7 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp)
|
||||
analogix_dp_set_video_cr_mn(dp, CALCULATED_M, 0, 0);
|
||||
|
||||
/* For video bist, Video timing must be generated by register */
|
||||
analogix_dp_set_video_timing_mode(dp, VIDEO_TIMING_FROM_CAPTURE);
|
||||
analogix_dp_set_video_timing_mode(dp, VIDEO_TIMING_FROM_REGISTER);
|
||||
|
||||
/* Disable video mute */
|
||||
analogix_dp_enable_video_mute(dp, 0);
|
||||
@@ -1748,8 +1748,13 @@ static void analogix_dp_bridge_mode_set(struct drm_bridge *bridge,
|
||||
|
||||
/* Input video interlaces & hsync pol & vsync pol */
|
||||
video->interlaced = !!(mode->flags & DRM_MODE_FLAG_INTERLACE);
|
||||
video->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);
|
||||
video->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);
|
||||
if (dp->plat_data->dev_type == RK3588_EDP) {
|
||||
video->v_sync_polarity = true;
|
||||
video->h_sync_polarity = true;
|
||||
} else {
|
||||
video->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);
|
||||
video->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);
|
||||
}
|
||||
|
||||
/* Input video dynamic_range & colorimetry */
|
||||
vic = drm_match_cea_mode(mode);
|
||||
|
||||
@@ -790,7 +790,8 @@ void analogix_dp_init_video(struct analogix_dp_device *dp)
|
||||
reg = CHA_CRI(4) | CHA_CTRL;
|
||||
analogix_dp_write(dp, ANALOGIX_DP_SYS_CTL_2, reg);
|
||||
|
||||
reg = 0x0;
|
||||
reg = analogix_dp_read(dp, ANALOGIX_DP_SYS_CTL_3);
|
||||
reg |= VALID_CTRL | F_VALID;
|
||||
analogix_dp_write(dp, ANALOGIX_DP_SYS_CTL_3, reg);
|
||||
|
||||
reg = VID_HRES_TH(2) | VID_VRES_TH(0);
|
||||
|
||||
Reference in New Issue
Block a user