Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ed1b2d3 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Gerrit - the friendly Code Review server
Browse files

drm/modes: Introduce drm_mode_match()



Make mode matching less confusing by allowing the caller to specify
which parts of the modes should match via some flags.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarShashank Sharma <shashank.sharma@intel.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-2-git-send-email-ankit.k.nautiyal@intel.com


Patch-mainline: 1525777785-9740-2-git-send-email-ankit.k.nautiyal@intel.com @ 08/05/18, 11:09 a.m.

Change-Id: I4c6686ee0eceaac6d109e4ae14dab76e96441688
Signed-off-by: default avatarShubham Talekar <stalek@codeaurora.org>
parent 48a8d5e8
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -984,7 +984,6 @@ static bool drm_mode_match_aspect_ratio(const struct drm_display_mode *mode1,
bool drm_mode_match(const struct drm_display_mode *mode1,
		    const struct drm_display_mode *mode2,
		    unsigned int match_flags)

{
	if (!mode1 && !mode2)
		return true;
@@ -1051,10 +1050,6 @@ EXPORT_SYMBOL(drm_mode_equal);
bool drm_mode_equal_no_clocks(const struct drm_display_mode *mode1,
			      const struct drm_display_mode *mode2)
{
	if ((mode1->flags & DRM_MODE_FLAG_3D_MASK) !=
	    (mode2->flags & DRM_MODE_FLAG_3D_MASK))
		return false;

	return drm_mode_match(mode1, mode2,
			      DRM_MODE_MATCH_TIMINGS |
			      DRM_MODE_MATCH_FLAGS |