mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
drm/bridge: analogix_dp: Fix stream valid control
Add DT property 'analogix,force-stream-valid' to DTS node
if want to support vrr.
Fixes: 2abd3af02c ("drm/bridge: analogix_dp: Use video format information from register")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ic4624e4ca3a03322f1d9520a7e3cee0d054c36ee
This commit is contained in:
@@ -1998,6 +1998,8 @@ static int analogix_dp_dt_parse_pdata(struct analogix_dp_device *dp)
|
||||
|
||||
video_info->video_bist_enable =
|
||||
of_property_read_bool(dp_node, "analogix,video-bist-enable");
|
||||
video_info->force_stream_valid =
|
||||
of_property_read_bool(dp_node, "analogix,force-stream-valid");
|
||||
|
||||
prop = of_find_property(dp_node, "data-lanes", &len);
|
||||
if (!prop) {
|
||||
|
||||
@@ -142,6 +142,7 @@ struct video_info {
|
||||
u32 lane_map[4];
|
||||
|
||||
bool video_bist_enable;
|
||||
bool force_stream_valid;
|
||||
};
|
||||
|
||||
struct link_train {
|
||||
|
||||
@@ -790,9 +790,11 @@ 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 = analogix_dp_read(dp, ANALOGIX_DP_SYS_CTL_3);
|
||||
reg |= VALID_CTRL | F_VALID;
|
||||
analogix_dp_write(dp, ANALOGIX_DP_SYS_CTL_3, reg);
|
||||
if (dp->video_info.force_stream_valid) {
|
||||
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);
|
||||
analogix_dp_write(dp, ANALOGIX_DP_VIDEO_CTL_8, reg);
|
||||
|
||||
Reference in New Issue
Block a user