drm/rockchip: cdn-dp: Reject non-32-bits-aligned mode widths

Change-Id: I8f6b94baef9fd5db2090e36dc8974769b7d469f7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
Wyon Bi
2019-08-14 14:30:55 +08:00
committed by Tao Huang
parent 43fd724887
commit 6f86fc8c00

View File

@@ -313,6 +313,9 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
break;
}
if (!IS_ALIGNED(mode->hdisplay * bpc * 3, 32))
return MODE_H_ILLEGAL;
requested = mode->clock * bpc * 3 / 1000;
source_max = dp->lanes;