Thread (10 messages) 10 messages, 4 authors, 2014-07-08

Re: [PATCH 5/5] drm/i915: Kick out vga console

flat view

From: Chris Wilson <hidden>
Date: 2014-06-30 07:00:16
Also in: dri-devel, intel-gfx, lkml
Subsystem: drm drivers, intel drm i915 driver (meteor lake, dg2 and older excluding poulsbo, moorestown and derivative), the rest · Maintainers: David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Linus Torvalds

Possibly related (same subject, not in this thread)

On Sat, Jun 28, 2014 at 11:55:19PM -0400, Ed Tomlinson wrote:
On Saturday 28 June 2014 15:28:22 Ed Tomlinson wrote:

Resend without html krud which causes list to bounce the message.
quoted
Hi

This commit ( a4de05268e674e8ed31df6348269e22d6c6a1803 ) hangs my boot with 3.16-git.  Reverting it lets the boot proceed. 

I have an i7 with a built-in i915 and an pcie r7 260x.  The R7 is the primary console.  The i915 is initialized
but does not have a physical display attached.

With the patch applied the boot stops at the messages:

[drm] Memory usable by graphics device = 2048M
[drm] Replacing VGA console driver
The issue looks like that we are ripping out the radeon fb_con whilst it
is active and that upsets everyone. In which case, I think the
compromise is:

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 5f44581..4915f1d 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1439,18 +1439,20 @@ static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 #else
 static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 {
-       int ret;
+       int ret = 0;
 
        DRM_INFO("Replacing VGA console driver\n");
 
        console_lock();
-       ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
-       if (ret = 0) {
-               ret = do_unregister_con_driver(&vga_con);
-
-               /* Ignore "already unregistered". */
-               if (ret = -ENODEV)
-                       ret = 0;
+       if (con_is_bound(&vga_con)) {
+               ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
+               if (ret = 0) {
+                       ret = do_unregister_con_driver(&vga_con);
+
+                       /* Ignore "already unregistered". */
+                       if (ret = -ENODEV)
+                               ret = 0;
+               }
        }
        console_unlock();

-Chris
-- 
Chris Wilson, Intel Open Source Technology Centre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help