Home | History | Annotate | Download | only in drm

Lines Matching refs:mode1

961 static bool drm_mode_match_timings(const struct drm_display_mode *mode1,
964 return mode1->hdisplay == mode2->hdisplay &&
965 mode1->hsync_start == mode2->hsync_start &&
966 mode1->hsync_end == mode2->hsync_end &&
967 mode1->htotal == mode2->htotal &&
968 mode1->hskew == mode2->hskew &&
969 mode1->vdisplay == mode2->vdisplay &&
970 mode1->vsync_start == mode2->vsync_start &&
971 mode1->vsync_end == mode2->vsync_end &&
972 mode1->vtotal == mode2->vtotal &&
973 mode1->vscan == mode2->vscan;
976 static bool drm_mode_match_clock(const struct drm_display_mode *mode1,
983 if (mode1->clock && mode2->clock)
984 return KHZ2PICOS(mode1->clock) == KHZ2PICOS(mode2->clock);
986 return mode1->clock == mode2->clock;
989 static bool drm_mode_match_flags(const struct drm_display_mode *mode1,
992 return (mode1->flags & ~DRM_MODE_FLAG_3D_MASK) ==
996 static bool drm_mode_match_3d_flags(const struct drm_display_mode *mode1,
999 return (mode1->flags & DRM_MODE_FLAG_3D_MASK) ==
1003 static bool drm_mode_match_aspect_ratio(const struct drm_display_mode *mode1,
1006 return mode1
1011 * @mode1: first mode
1015 * Check to see if @mode1 and @mode2 are equivalent.
1020 bool drm_mode_match(const struct drm_display_mode *mode1,
1024 if (!mode1 && !mode2)
1027 if (!mode1 || !mode2)
1031 !drm_mode_match_timings(mode1, mode2))
1035 !drm_mode_match_clock(mode1, mode2))
1039 !drm_mode_match_flags(mode1, mode2))
1043 !drm_mode_match_3d_flags(mode1, mode2))
1047 !drm_mode_match_aspect_ratio(mode1, mode2))
1056 * @mode1: first mode
1059 * Check to see if @mode1 and @mode2 are equivalent.
1064 bool drm_mode_equal(const struct drm_display_mode *mode1,
1067 return drm_mode_match(mode1, mode2,
1078 * @mode1: first mode
1081 * Check to see if @mode1 and @mode2 are equivalent, but
1087 bool drm_mode_equal_no_clocks(const struct drm_display_mode *mode1,
1090 return drm_mode_match(mode1, mode2,
1099 * @mode1: first mode
1102 * Check to see if @mode1 and @mode2 are equivalent, but
1108 bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
1111 return drm_mode_match(mode1, mode2,