diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-05-31 12:17:08 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-06-11 08:35:51 +1000 |
commit | 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1 (patch) | |
tree | cfe55d25141ebe5f287c752fca2467b546d99de6 /drivers/gpu/drm/drm_modes.c | |
parent | 990256aec2f10800595dddf4d1c3441fcd6b2616 (diff) | |
download | blackbird-op-linux-9bc3cd5673d84d29272fa7181a4dfca83cbb48c1.tar.gz blackbird-op-linux-9bc3cd5673d84d29272fa7181a4dfca83cbb48c1.zip |
drm: Sort connector modes based on vrefresh
Keeping the modes sorted by vrefresh before the pixel clock makes the
mode list somehow more pleasing to the eye.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 69153385c63f..a6729bfe6860 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1020,6 +1020,11 @@ static int drm_mode_compare(void *priv, struct list_head *lh_a, struct list_head diff = b->hdisplay * b->vdisplay - a->hdisplay * a->vdisplay; if (diff) return diff; + + diff = b->vrefresh - a->vrefresh; + if (diff) + return diff; + diff = b->clock - a->clock; return diff; } |