Date: Sun, 29 Mar 2015 18:45:52 +0000 (UTC) From: Jean-Sebastien Pedron <dumbbell@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280814 - head/sys/dev/drm2 Message-ID: <201503291845.t2TIjqvv068658@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sun Mar 29 18:45:51 2015 New Revision: 280814 URL: https://svnweb.freebsd.org/changeset/base/280814 Log: drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 31 12:17:08 2013 +0000 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> PR: 198936 Obtained from: Linux MFC after: 1 month MFC with: r280183 Modified: head/sys/dev/drm2/drm_crtc_helper.c head/sys/dev/drm2/drm_modes.c Modified: head/sys/dev/drm2/drm_crtc_helper.c ============================================================================== --- head/sys/dev/drm2/drm_crtc_helper.c Sun Mar 29 18:44:15 2015 (r280813) +++ head/sys/dev/drm2/drm_crtc_helper.c Sun Mar 29 18:45:51 2015 (r280814) @@ -189,13 +189,14 @@ prune: if (list_empty(&connector->modes)) return 0; + list_for_each_entry(mode, &connector->modes, head) + mode->vrefresh = drm_mode_vrefresh(mode); + drm_mode_sort(&connector->modes); DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id, drm_get_connector_name(connector)); list_for_each_entry(mode, &connector->modes, head) { - mode->vrefresh = drm_mode_vrefresh(mode); - drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); drm_mode_debug_printmodeline(mode); } Modified: head/sys/dev/drm2/drm_modes.c ============================================================================== --- head/sys/dev/drm2/drm_modes.c Sun Mar 29 18:44:15 2015 (r280813) +++ head/sys/dev/drm2/drm_modes.c Sun Mar 29 18:45:51 2015 (r280814) @@ -927,6 +927,11 @@ static int drm_mode_compare(void *priv, 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503291845.t2TIjqvv068658>