From 5ddac1b583e199ad7ed715c733d0c22ebde638d2 Mon Sep 17 00:00:00 2001 From: Yakir Yang Date: Fri, 22 Apr 2016 16:09:42 +0800 Subject: [PATCH] drm/rockchip: analogix_dp: remove the devtype check in .mode_valid function The device type would always be ROCKCHIP_DP, so no need to add the unused devtype check. Change-Id: I7668a4bdb29700c5397583b9539446f19ae49c3b Signed-off-by: Yakir Yang --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 3a5fb13977e0..b8fda96fbefc 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -101,16 +101,13 @@ rockchip_dp_mode_valid(struct analogix_dp_plat_data *plat_data, struct drm_display_mode *mode) { struct drm_display_info *di = &connector->display_info; - struct rockchip_dp_device *dp = to_dp(plat_data); - if (dp->plat_data.dev_type == ROCKCHIP_DP) { - if (di->color_formats & DRM_COLOR_FORMAT_YCRCB444 || - di->color_formats & DRM_COLOR_FORMAT_YCRCB422) { - di->color_formats &= ~(DRM_COLOR_FORMAT_YCRCB422 | - DRM_COLOR_FORMAT_YCRCB444); - di->color_formats |= DRM_COLOR_FORMAT_RGB444; - di->bpc = 8; - } + if (di->color_formats & DRM_COLOR_FORMAT_YCRCB444 || + di->color_formats & DRM_COLOR_FORMAT_YCRCB422) { + di->color_formats &= ~(DRM_COLOR_FORMAT_YCRCB422 | + DRM_COLOR_FORMAT_YCRCB444); + di->color_formats |= DRM_COLOR_FORMAT_RGB444; + di->bpc = 8; } return MODE_OK; -- 2.34.1