mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
drm/msm/dp: account for widebus and yuv420 during mode validation
Widebus allows the DP controller to operate in 2 pixel per clock mode. The mode validation logic validates the mode->clock against the max DP pixel clock. However the max DP pixel clock limit assumes widebus is already enabled. Adjust the mode validation logic to only compare the adjusted pixel clock which accounts for widebus against the max DP pixel clock. Also fix the mode validation logic for YUV420 modes as in that case as well, only half the pixel clock is needed. Cc: [email protected] Fixes:757a2f36ab("drm/msm/dp: enable widebus feature for display port") Fixes:6db6e56065("drm/msm/dp: change clock related programming for YUV420 over DP") Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Dale Whinham <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/635789/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
This commit is contained in:
1 parent
24b50b7340
commit
df9cf852ca
2 files changed
+10
-6
No files matched your search
@@ -930,16 +930,17 @@ enum drm_mode_status msm_dp_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mode->clock > DP_MAX_PIXEL_CLK_KHZ)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
msm_dp_display = container_of(dp, struct msm_dp_display_private, msm_dp_display);
|
||||
link_info = &msm_dp_display->panel->link_info;
|
||||
|
||||
if (drm_mode_is_420_only(&dp->connector->display_info, mode) &&
|
||||
msm_dp_display->panel->vsc_sdp_supported)
|
||||
if ((drm_mode_is_420_only(&dp->connector->display_info, mode) &&
|
||||
msm_dp_display->panel->vsc_sdp_supported) ||
|
||||
msm_dp_wide_bus_available(dp))
|
||||
mode_pclk_khz /= 2;
|
||||
|
||||
if (mode_pclk_khz > DP_MAX_PIXEL_CLK_KHZ)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
mode_bpp = dp->connector->display_info.bpc * num_components;
|
||||
if (!mode_bpp)
|
||||
mode_bpp = default_bpp;
|
||||
|
||||
@@ -257,7 +257,10 @@ static enum drm_mode_status msm_edp_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mode->clock > DP_MAX_PIXEL_CLK_KHZ)
|
||||
if (msm_dp_wide_bus_available(dp))
|
||||
mode_pclk_khz /= 2;
|
||||
|
||||
if (mode_pclk_khz > DP_MAX_PIXEL_CLK_KHZ)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user