]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.35 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Sat, 18 Sep 2010 18:19:54 +0000 (11:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 18 Sep 2010 18:19:54 +0000 (11:19 -0700)
queue-2.6.35/drm-only-decouple-the-old_fb-from-the-crtc-is-we-call-mode_set.patch [new file with mode: 0644]
queue-2.6.35/series

diff --git a/queue-2.6.35/drm-only-decouple-the-old_fb-from-the-crtc-is-we-call-mode_set.patch b/queue-2.6.35/drm-only-decouple-the-old_fb-from-the-crtc-is-we-call-mode_set.patch
new file mode 100644 (file)
index 0000000..05ec15c
--- /dev/null
@@ -0,0 +1,42 @@
+From 356ad3cd616185631235ffb48b3efbf39f9923b3 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Thu, 9 Sep 2010 09:41:32 +0100
+Subject: drm: Only decouple the old_fb from the crtc is we call mode_set*
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 356ad3cd616185631235ffb48b3efbf39f9923b3 upstream.
+
+Otherwise when disabling the output we switch to the new fb (which is
+likely NULL) and skip the call to mode_set -- leaking driver private
+state on the old_fb.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857
+Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/drm_crtc_helper.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -610,13 +610,13 @@ int drm_crtc_helper_set_config(struct dr
+               mode_changed = true;
+       if (mode_changed) {
+-              old_fb = set->crtc->fb;
+-              set->crtc->fb = set->fb;
+               set->crtc->enabled = (set->mode != NULL);
+               if (set->mode != NULL) {
+                       DRM_DEBUG_KMS("attempting to set mode from"
+                                       " userspace\n");
+                       drm_mode_debug_printmodeline(set->mode);
++                      old_fb = set->crtc->fb;
++                      set->crtc->fb = set->fb;
+                       if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
+                                                     set->x, set->y,
+                                                     old_fb)) {
index 501a6fea698ec010dcf68c2e2cd3cd7cfab8dbb3..48006b641ee0c0230cf7877a71e77aa5455406b2 100644 (file)
@@ -126,3 +126,4 @@ drm-i915-overlay-on-gen2-can-t-address-above-1g.patch
 drm-i915-prevent-double-dpms-on.patch
 drm-i915-don-t-enable-self-refresh-on-ironlake.patch
 revert-drm-i915-allow-lvds-on-pipe-a-on-gen4.patch
+drm-only-decouple-the-old_fb-from-the-crtc-is-we-call-mode_set.patch