aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r--drivers/gpu/drm/drm_modes.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index f83f0719922e..faa79df02648 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -848,6 +848,26 @@ bool drm_mode_equal(const struct drm_display_mode *mode1, const struct drm_displ
848 } else if (mode1->clock != mode2->clock) 848 } else if (mode1->clock != mode2->clock)
849 return false; 849 return false;
850 850
851 return drm_mode_equal_no_clocks(mode1, mode2);
852}
853EXPORT_SYMBOL(drm_mode_equal);
854
855/**
856 * drm_mode_equal_no_clocks - test modes for equality
857 * @mode1: first mode
858 * @mode2: second mode
859 *
860 * LOCKING:
861 * None.
862 *
863 * Check to see if @mode1 and @mode2 are equivalent, but
864 * don't check the pixel clocks.
865 *
866 * RETURNS:
867 * True if the modes are equal, false otherwise.
868 */
869bool drm_mode_equal_no_clocks(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2)
870{
851 if (mode1->hdisplay == mode2->hdisplay && 871 if (mode1->hdisplay == mode2->hdisplay &&
852 mode1->hsync_start == mode2->hsync_start && 872 mode1->hsync_start == mode2->hsync_start &&
853 mode1->hsync_end == mode2->hsync_end && 873 mode1->hsync_end == mode2->hsync_end &&
@@ -863,7 +883,7 @@ bool drm_mode_equal(const struct drm_display_mode *mode1, const struct drm_displ
863 883
864 return false; 884 return false;
865} 885}
866EXPORT_SYMBOL(drm_mode_equal); 886EXPORT_SYMBOL(drm_mode_equal_no_clocks);
867 887
868/** 888/**
869 * drm_mode_validate_size - make sure modes adhere to size constraints 889 * drm_mode_validate_size - make sure modes adhere to size constraints