kdb
[Top] [All Lists]

[PATCH 35/37] drm_fb_helper: Preserve capability to use atomic kms

To: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 35/37] drm_fb_helper: Preserve capability to use atomic kms
From: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
Date: Wed, 23 Dec 2009 15:43:02 -0600
Cc: kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx, kdb@xxxxxxxxxxx, mingo@xxxxxxx, Jason Wessel <jason.wessel@xxxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>, Clemens Ladisch <clemens@xxxxxxxxxx>
In-reply-to: <1261604584-5796-2-git-send-email-jason.wessel@xxxxxxxxxxxxx>
References: <1261603190-5036-33-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261604584-5796-1-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261604584-5796-2-git-send-email-jason.wessel@xxxxxxxxxxxxx>
Commit 5349ef3127c77075ff70b2014f17ae0fbcaaf199 changed logic of when
a pixclock was valid vs invalid.

The atomic kernel mode setting used by the kernel debugger relied upon
the drm_fb_helper_check_var() to always return -EINVAL.  Until a
better solution exists, this behavior will be restored.

CC: David Airlie <airlied@xxxxxxxx>
CC: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
CC: Clemens Ladisch <clemens@xxxxxxxxxx>
Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
---
 drivers/gpu/drm/drm_fb_helper.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 80aab3c..b390fd8 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -683,6 +683,10 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
 
        if (var->pixclock != 0)
                return -EINVAL;
+#ifdef CONFIG_KGDB
+       if (atomic_read(&kgdb_active) != -1)
+               return -EINVAL;
+#endif
 
        /* Need to resize the fb object !!! */
        if (var->xres > fb->width || var->yres > fb->height) {
-- 
1.6.4.rc1

<Prev in Thread] Current Thread [Next in Thread>