Commit 1c4f39b0 authored by Ville Syrjälä's avatar Ville Syrjälä

drm: Use drm_mode_is_420_only() instead of open coding it

Replace the open coded drm_mode_is_420_only() with the real thing.

No functional changes.

Cc: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210504102742.7005-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 660729e4
......@@ -1176,16 +1176,11 @@ enum drm_mode_status
drm_mode_validate_ycbcr420(const struct drm_display_mode *mode,
struct drm_connector *connector)
{
u8 vic = drm_match_cea_mode(mode);
enum drm_mode_status status = MODE_OK;
struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
if (test_bit(vic, hdmi->y420_vdb_modes)) {
if (!connector->ycbcr_420_allowed)
status = MODE_NO_420;
}
if (!connector->ycbcr_420_allowed &&
drm_mode_is_420_only(&connector->display_info, mode))
return MODE_NO_420;
return status;
return MODE_OK;
}
EXPORT_SYMBOL(drm_mode_validate_ycbcr420);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment