All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: linux-fbdev@vger.kernel.org
Cc: Dave Airlie <airlied@redhat.com>, Greg KH <greg@suse.de>,
	linux-kernel@vger.kernel.org, dri-devel@lists.sf.net
Subject: [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
Date: Tue, 21 Dec 2010 11:41:16 +1000	[thread overview]
Message-ID: <1292895677-4242-3-git-send-email-airlied__42024.5445603088$1292895789$gmane$org@gmail.com> (raw)
In-Reply-To: <1292895677-4242-1-git-send-email-airlied@gmail.com>

From: Dave Airlie <airlied@redhat.com>

With framebuffer handover and multiple GPUs, we get into a
position where the fbcon unbinds the vesafb framebuffer for GPU 1,
but we still have a radeon framebuffer bound from GPU 0, so
we don't unregister the console driver. Then when we tried to bind
the new radeon framebuffer for GPU1 we never get to the bind
call as we fail due to the console being registered already.

This changes the return value to -EBUSY when the driver is
already registered and continues to bind for -EBUSY.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@suse.de>
---
 drivers/tty/vt/vt.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index a8ec48e..d781496 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
 
 		/* already registered */
 		if (con_driver->con == csw)
-			retval = -EINVAL;
+			retval = -EBUSY;
 	}
 
 	if (retval)
@@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
 	int err;
 
 	err = register_con_driver(csw, first, last);
-
+	/* if we get an busy error we still want to bind the console driver
+	 * and return success, as we may have unbound the console driver
+	 * but not unregistered it.
+	 */
+	if (err == -EBUSY)
+		err = 0;
 	if (!err)
 		bind_con_driver(csw, first, last, deflt);
 
-- 
1.7.1


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

  parent reply	other threads:[~2010-12-21  1:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21  1:41 vt/fbcon binding and handover fixes Dave Airlie
2010-12-21  1:41 ` Dave Airlie
2010-12-21  1:41 ` [PATCH 1/3] fb: fix overlapping test off-by-one Dave Airlie
2010-12-21  1:41 ` Dave Airlie
2010-12-21  1:41 ` Dave Airlie
2010-12-21  1:41   ` Dave Airlie
2010-12-21  7:29   ` Michel Dänzer
2010-12-21  7:29   ` Michel Dänzer
2010-12-21  7:29   ` Michel Dänzer
2010-12-21  7:29     ` Michel Dänzer
2010-12-24  3:28     ` Paul Mundt
2010-12-24  3:28     ` Paul Mundt
2010-12-24  3:28     ` Paul Mundt
2010-12-24  3:28       ` Paul Mundt
2010-12-23 16:40   ` [PATCH] Update fbdev fb_fix_screeninfo James Simmons
2010-12-21  1:41 ` Dave Airlie [this message]
2010-12-21  1:41 ` [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time Dave Airlie
2010-12-21  1:41 ` Dave Airlie
2010-12-21  1:41   ` Dave Airlie
2011-01-06 23:57   ` Dave Airlie
2011-01-07  0:50     ` Greg KH
2011-01-07  0:52       ` Dave Airlie
2010-12-21  1:41 ` [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit Dave Airlie
2010-12-21  1:41 ` Dave Airlie
2010-12-21  1:41   ` Dave Airlie
2010-12-24  3:30   ` Paul Mundt
2010-12-24  3:30   ` Paul Mundt
2010-12-24  3:30   ` Paul Mundt
2010-12-24  3:30     ` Paul Mundt
2010-12-21  1:41 ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1292895677-4242-3-git-send-email-airlied__42024.5445603088$1292895789$gmane$org@gmail.com' \
    --to=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.sf.net \
    --cc=greg@suse.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.