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

2014-07-08 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 10:53:16PM -0400, Ed Tomlinson wrote:
 Hi Daniel,
 
 The patch below also works.  You can use my Tested By for it.

Thanks a lot for testing, patch submitted and should get forwarded asap.
 
 Thanks
 Ed Tomlinson edt...@gmail.com
 
 PS. I _really_ need to get a serial console working on my i7 box.

Usually this doesn't help a lot with gfx initialization issues since we do
an awful lot of setup while holding the console_lock. Which prevents any
dmesg output on any console :(

Cheers, Daniel

 
 On Monday 07 July 2014 14:26:54 Daniel Vetter wrote:
  On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote:
   Daniel,
   
   I am not quite sure I understand what you want me to test?
   Do you want me to try it without:
   
 +   if (ret == 0) {
 +   ret = do_unregister_con_driver(vga_con);
  
  Below the diff of what I mean.
  -Daniel
  
  
  diff --git a/drivers/gpu/drm/i915/i915_dma.c 
  b/drivers/gpu/drm/i915/i915_dma.c
  index 5e583a1838f8..bd8517151479 100644
  --- a/drivers/gpu/drm/i915/i915_dma.c
  +++ b/drivers/gpu/drm/i915/i915_dma.c
  @@ -1466,12 +1466,13 @@ 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 (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);
   
  
 
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-07-07 Thread Daniel Vetter
On Mon, Jun 30, 2014 at 07:59:55AM +0100, Chris Wilson wrote:
 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.
  
   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);

Hm, we should only conditionalize the take_over_console - unregistering
vga_con is kinda the point to make sure it's gone for real. Ed, can you
please retest with the if (con_is_bound) check just for the
do_take_over_console call?

Still puzzled wtf is going on here since as David says this should be a
no-op.

Thanks, Daniel
 +
 +   /* Ignore already unregistered. */
 +   if (ret == -ENODEV)
 +   ret = 0;
 +   }
 }
 console_unlock();
 
 -Chris
 
 -- 
 Chris Wilson, Intel Open Source Technology Centre
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-07-07 Thread Ed Tomlinson
Daniel,

I am not quite sure I understand what you want me to test?
Do you want me to try it without:

  +   if (ret == 0) {
  +   ret = do_unregister_con_driver(vga_con);

Thanks
Ed


On Monday 07 July 2014 10:48:26 Daniel Vetter wrote:
 On Mon, Jun 30, 2014 at 07:59:55AM +0100, Chris Wilson wrote:
  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.
   
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);
 
 Hm, we should only conditionalize the take_over_console - unregistering
 vga_con is kinda the point to make sure it's gone for real. Ed, can you
 please retest with the if (con_is_bound) check just for the
 do_take_over_console call?
 
 Still puzzled wtf is going on here since as David says this should be a
 no-op.
 
 Thanks, Daniel
  +
  +   /* Ignore already unregistered. */
  +   if (ret == -ENODEV)
  +   ret = 0;
  +   }
  }
  console_unlock();
  
  -Chris
  
 
 

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-07-07 Thread Ed Tomlinson
Daniel,

Just to be sure.  The intel card here should not be claiming the real console.  
It does
not have an output device and the bios set set so the radeon is the primary 
device.

Ed


On Monday 07 July 2014 10:48:26 Daniel Vetter wrote:
 On Mon, Jun 30, 2014 at 07:59:55AM +0100, Chris Wilson wrote:
  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.
   
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);
 
 Hm, we should only conditionalize the take_over_console - unregistering
 vga_con is kinda the point to make sure it's gone for real. Ed, can you
 please retest with the if (con_is_bound) check just for the
 do_take_over_console call?
 
 Still puzzled wtf is going on here since as David says this should be a
 no-op.
 
 Thanks, Daniel
  +
  +   /* Ignore already unregistered. */
  +   if (ret == -ENODEV)
  +   ret = 0;
  +   }
  }
  console_unlock();
  
  -Chris
  
 
 

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-07-07 Thread Ed Tomlinson
Hi Daniel,

The patch below also works.  You can use my Tested By for it.

Thanks
Ed Tomlinson edt...@gmail.com

PS. I _really_ need to get a serial console working on my i7 box.

On Monday 07 July 2014 14:26:54 Daniel Vetter wrote:
 On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote:
  Daniel,
  
  I am not quite sure I understand what you want me to test?
  Do you want me to try it without:
  
+   if (ret == 0) {
+   ret = do_unregister_con_driver(vga_con);
 
 Below the diff of what I mean.
 -Daniel
 
 
 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
 index 5e583a1838f8..bd8517151479 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
 @@ -1466,12 +1466,13 @@ 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 (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);
  
 

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-07-01 Thread Ed Tomlinson
Hi Chris,

I had to rediff to get a patch that applies...  I am not hanging with this 
applied - it
does look like the i915 is starting is initialization later boot the new kernel.

[2.389796] [drm] Radeon Display Connectors
[2.389798] [drm] Connector 0:
[2.389799] [drm]   DP-1
[2.389799] [drm]   HPD2
[2.389801] [drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 
0x653c
[2.389802] [drm]   Encoders:
[2.389803] [drm] DFP1: INTERNAL_UNIPHY2
[2.389804] [drm] Connector 1:
[2.389805] [drm]   HDMI-A-1
[2.389805] [drm]   HPD3
[2.389806] [drm]   DDC: 0x6550 0x6550 0x6554 0x6554 0x6558 0x6558 0x655c 
0x655c
[2.389807] [drm]   Encoders:
[2.389808] [drm] DFP2: INTERNAL_UNIPHY2
[2.389809] [drm] Connector 2:
[2.389810] [drm]   DVI-D-1
[2.389811] [drm]   HPD1
[2.389812] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568 0x656c 
0x656c
[2.389813] [drm]   Encoders:
[2.389814] [drm] DFP3: INTERNAL_UNIPHY1
[2.389815] [drm] Connector 3:
[2.389815] [drm]   DVI-I-1
[2.389816] [drm]   HPD6
[2.389817] [drm]   DDC: 0x6580 0x6580 0x6584 0x6584 0x6588 0x6588 0x658c 
0x658c
[2.389818] [drm]   Encoders:
[2.389819] [drm] DFP4: INTERNAL_UNIPHY
[2.389820] [drm] CRT1: INTERNAL_KLDSCP_DAC1
[2.435689] raid6: avx2x2   24564 MB/s
[2.435691] Switched to clocksource tsc
[2.489087] usb 1-8: new low-speed USB device number 7 using xhci_hcd
[2.492403] raid6: avx2x4   34887 MB/s
[2.492404] raid6: using algorithm avx2x4 (34887 MB/s)
[2.492405] raid6: using avx2x2 recovery algorithm
[2.492789] xor: automatically using best checksumming function:
[2.502557] Adding 5779452k swap on /dev/sdb2.  Priority:-2 extents:1 
across:5779452k FS
[2.511532] [drm] fb mappable at 0xE098E000
[2.511536] [drm] vram apper at 0xE000
[2.511538] [drm] size 9216000
[2.511539] [drm] fb depth is 24
[2.511541] [drm]pitch is 7680
[2.511590] fbcon: radeondrmfb (fb0) is primary device
[2.516691] nct6775: Found NCT6776D/F or compatible chip at 0x2e:0x290
[2.525778]avx   : 41474.400 MB/sec
[2.532408] Console: switching to colour frame buffer device 240x75
[2.535567] radeon :01:00.0: fb0: radeondrmfb frame buffer device
[2.535567] radeon :01:00.0: registered panic notifier
[2.544968] Btrfs loaded
[2.545276] BTRFS: device fsid 9d4254aa-6715-4fa8-986a-1af0d51768ad devid 1 
transid 308068 /dev/sdc1
[2.545739] BTRFS: device fsid 9d4254aa-6715-4fa8-986a-1af0d51768ad devid 2 
transid 308068 /dev/sdb1
[2.552946] [drm] Initialized radeon 2.39.0 20080528 for :01:00.0 on 
minor 0
[2.553248] [drm] Memory usable by graphics device = 2048M
[2.553273] [drm] Replacing VGA console driver
[2.572539] i915 :00:02.0: irq 46 for MSI/MSI-X
[2.572546] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[2.572565] [drm] Driver supports precise vblank timestamp query.

If you are happy with this you can give this patch my tested by.

Thanks
Ed Tomlinson

On Monday 30 June 2014 07:59:55 Chris Wilson wrote:
 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.
  
   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 

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

2014-06-30 Thread David Herrmann
Hi

On Mon, Jun 30, 2014 at 8:59 AM, Chris Wilson ch...@chris-wilson.co.uk wrote:
 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.

  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:

do_take_over_console() should only touch console-drivers like fbcon.
How does this affect the underlying fbdev device? Ripping out active
or inactive fbcon should be just fine, shouldn't it?

Given that this hard-locks at kick_out_vgacon(), this looks more like
a dead-lock to me.

Thanks
David
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-06-29 Thread Ed Tomlinson
On Saturday 28 June 2014 15:28:22 Ed Tomlinson wrote:

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

 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
 
 and I need to interrupt or power off the box to get it back.
 
 (I did not notice messages about the R7 but they could have easily been 
 missed - this box does not have a serial console)
 
 Without the patch I get:
 
 Jun 28 14:53:54 localhost kernel: [2.075351] e1000e: Intel(R) PRO/1000 
 Network Driver - 2.3.2-k
 Jun 28 14:53:54 localhost kernel: [2.075796] [drm] Initialized drm 1.1.0 
 20060810
 Jun 28 14:53:54 localhost kernel: [2.075958] microcode: CPU0 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077289] microcode: CPU1 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077299] microcode: CPU2 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077307] microcode: CPU3 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077315] microcode: CPU4 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077325] microcode: CPU5 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077335] microcode: CPU6 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077342] microcode: CPU7 sig=0x306c3, 
 pf=0x2, revision=0x17
 Jun 28 14:53:54 localhost kernel: [2.077378] microcode: Microcode Update 
 Driver: v2.00 tig...@aivazian.fsnet.co.uk, Peter Oruba
 Jun 28 14:53:54 localhost kernel: [2.079726] input: PC Speaker as 
 /devices/platform/pcspkr/input/input4
 Jun 28 14:53:54 localhost kernel: [2.083930] e1000e: Copyright(c) 1999 - 
 2014 Intel Corporation.
 Jun 28 14:53:54 localhost kernel: [2.084787] ACPI Warning: SystemIO range 
 0xf040-0xf05f conflicts with OpRegion 
 0xf040-0xf04f (\_SB_.PCI0.SBUS.SMBI) 
 (20140424/utaddress-258)
 Jun 28 14:53:54 localhost kernel: [2.084788] ACPI: If an ACPI driver is 
 available for this device, you should use it instead of the native driver
 Jun 28 14:53:54 localhost kernel: [2.084894] e1000e :00:19.0: 
 Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
 Jun 28 14:53:54 localhost kernel: [2.084905] e1000e :00:19.0: irq 44 
 for MSI/MSI-X
 Jun 28 14:53:54 localhost kernel: [2.096721] iTCO_vendor_support: 
 vendor-support=0
 Jun 28 14:53:54 localhost kernel: [2.096780] AVX2 version of gcm_enc/dec 
 engaged.
 Jun 28 14:53:54 localhost kernel: [2.098512] iTCO_wdt: Intel TCO WatchDog 
 Timer Driver v1.11
 Jun 28 14:53:54 localhost kernel: [2.099042] iTCO_wdt: Found a Lynx Point 
 TCO device (Version=2, TCOBASE=0x1860)
 Jun 28 14:53:54 localhost kernel: [2.099561] iTCO_wdt: initialized. 
 heartbeat=30 sec (nowayout=0)
 Jun 28 14:53:54 localhost kernel: [2.100401] [drm] radeon kernel 
 modesetting enabled.
 Jun 28 14:53:54 localhost kernel: [2.100918] checking generic (e000 
 30) vs hw (e000 1000)
 Jun 28 14:53:54 localhost kernel: [2.100919] fb: switching to radeondrmfb 
 from simple
 Jun 28 14:53:54 localhost kernel: [2.101372] Console: switching to colour 
 dummy device 80x25
 Jun 28 14:53:54 localhost kernel: [2.101527] [drm] initializing kernel 
 modesetting (BONAIRE 0x1002:0x6658 0x174B:0xE253).
 Jun 28 14:53:54 localhost kernel: [2.101534] [drm] register mmio base: 
 0xF080
 Jun 28 14:53:54 localhost kernel: [2.101535] [drm] register mmio size: 
 262144
 Jun 28 14:53:54 localhost kernel: [2.101540] [drm] doorbell mmio base: 
 0xF000
 Jun 28 14:53:54 localhost kernel: [2.101541] [drm] doorbell mmio size: 
 8388608
 Jun 28 14:53:54 localhost kernel: [2.101579] ATOM BIOS: Bonaire
 Jun 28 14:53:54 localhost kernel: [2.101627] radeon :01:00.0: VRAM: 
 2048M 0x - 0x7FFF (2048M used)
 Jun 28 14:53:54 localhost kernel: [2.101629] radeon :01:00.0: GTT: 
 1024M 0x8000 - 0xBFFF
 Jun 28 14:53:54 localhost kernel: [2.101630] [drm] Detected VRAM 
 RAM=2048M, BAR=256M
 Jun 28 14:53:54 localhost kernel: [2.101631] [drm] RAM width 128bits DDR
 Jun 28 14:53:54 localhost kernel: [2.101659] [TTM] Zone  kernel: 
 Available graphics memory: 8145364 kiB
 Jun 28 14:53:54 localhost kernel: [2.101660] [TTM] Zone   dma32: 
 Available graphics memory: 2097152 kiB
 Jun 28 14:53:54 localhost kernel: [2.101662] [TTM] Initializing pool 
 allocator
 Jun 28 14:53:54 localhost kernel: 

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

2014-06-09 Thread Tomi Valkeinen
Hi,

On 06/06/14 18:20, Daniel Vetter wrote:
 Tomi/Jean can you please ack merging this through drm-intel trees? It
 just exports the vga and dummy consoles so that i915 can do what it
 needs to do.

Acked-by: Tomi Valkeinen tomi.valkei...@ti.com

 Tomi




signature.asc
Description: OpenPGP digital signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-06-06 Thread David Herrmann
Hi

On Thu, Jun 5, 2014 at 4:58 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote:
 Touching the VGA resources on an IVB EFI machine causes hard hangs when
 we then kick out the efifb. Ouch.

 Apparently this also prevents unclaimed register errors on hsw and
 hard machine hangs on my i855gm when trying to unbind fbcon.

 Also, we want this to make I915_FBDEV=n safe.

 v2: Rebase and pimp commit message.

 v3: We also need to unregister the vga console, otherwise the unbind
 of the fb console before module unload might resurrect it again.

 v4: Ignore errors when the vga console is already unregistered - this
 can happen when e.g. reloading i915.ko.

 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813
 Cc: David Herrmann dh.herrm...@gmail.com
 Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
 Cc: Tomi Valkeinen tomi.valkei...@ti.com
 Cc: linux-fb...@vger.kernel.org
 Cc: Jani Nikula jani.nik...@linux.intel.com
 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk (v1)
 Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
 ---
  drivers/gpu/drm/i915/i915_dma.c  | 43 
 +++-
  drivers/video/console/dummycon.c |  1 +
  drivers/video/console/vgacon.c   |  1 +
  3 files changed, 44 insertions(+), 1 deletion(-)

 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
 index 27fe65ac5940..bcb66ddd649e 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
 @@ -36,6 +36,8 @@
  #include i915_drv.h
  #include i915_trace.h
  #include linux/pci.h
 +#include linux/console.h
 +#include linux/vt.h
  #include linux/vgaarb.h
  #include linux/acpi.h
  #include linux/pnp.h
 @@ -1449,6 +1451,38 @@ static void i915_kick_out_firmware_fb(struct 
 drm_i915_private *dev_priv)
  }
  #endif

 +#if !defined(CONFIG_VGA_CONSOLE)
 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   return 0;
 +}
 +#elif !defined(CONFIG_DUMMY_CONSOLE)

Why not select DUMMY_CONSOLE if VT? It's really stupid to disable
DUMMY_CONSOLE.. Furthermore, we already rely on HW_CONSOLE_BINDING so
this should be safe.

Patch looks good to me:

Reviewed-by: David Herrmann dh.herrm...@gmail.com

Thanks
David

 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   return -ENODEV;
 +}
 +#else
 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   int ret;
 +
 +   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;
 +   }
 +   console_unlock();
 +
 +   return ret;
 +}
 +#endif
 +
  static void i915_dump_device_info(struct drm_i915_private *dev_priv)
  {
 const struct intel_device_info *info = dev_priv-info;
 @@ -1622,8 +1656,15 @@ int i915_driver_load(struct drm_device *dev, unsigned 
 long flags)
 if (ret)
 goto out_regs;

 -   if (drm_core_check_feature(dev, DRIVER_MODESET))
 +   if (drm_core_check_feature(dev, DRIVER_MODESET)) {
 +   ret = i915_kick_out_vgacon(dev_priv);
 +   if (ret) {
 +   DRM_ERROR(failed to remove conflicting VGA 
 console\n);
 +   goto out_gtt;
 +   }
 +
 i915_kick_out_firmware_fb(dev_priv);
 +   }

 pci_set_master(dev-pdev);

 diff --git a/drivers/video/console/dummycon.c 
 b/drivers/video/console/dummycon.c
 index b63860f7beab..40bec8d64b0a 100644
 --- a/drivers/video/console/dummycon.c
 +++ b/drivers/video/console/dummycon.c
 @@ -77,3 +77,4 @@ const struct consw dummy_con = {
  .con_set_palette = DUMMY,
  .con_scrolldelta = DUMMY,
  };
 +EXPORT_SYMBOL_GPL(dummy_con);
 diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
 index 9d8feac67637..84acd6223dc5 100644
 --- a/drivers/video/console/vgacon.c
 +++ b/drivers/video/console/vgacon.c
 @@ -1440,5 +1440,6 @@ const struct consw vga_con = {
 .con_build_attr = vgacon_build_attr,
 .con_invert_region = vgacon_invert_region,
  };
 +EXPORT_SYMBOL(vga_con);

  MODULE_LICENSE(GPL);
 --
 1.8.1.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2014-06-06 Thread Daniel Vetter
On Fri, Jun 06, 2014 at 09:28:03AM +0200, David Herrmann wrote:
 Hi
 
 On Thu, Jun 5, 2014 at 4:58 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote:
  Touching the VGA resources on an IVB EFI machine causes hard hangs when
  we then kick out the efifb. Ouch.
 
  Apparently this also prevents unclaimed register errors on hsw and
  hard machine hangs on my i855gm when trying to unbind fbcon.
 
  Also, we want this to make I915_FBDEV=n safe.
 
  v2: Rebase and pimp commit message.
 
  v3: We also need to unregister the vga console, otherwise the unbind
  of the fb console before module unload might resurrect it again.
 
  v4: Ignore errors when the vga console is already unregistered - this
  can happen when e.g. reloading i915.ko.
 
  Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813
  Cc: David Herrmann dh.herrm...@gmail.com
  Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
  Cc: Tomi Valkeinen tomi.valkei...@ti.com
  Cc: linux-fb...@vger.kernel.org
  Cc: Jani Nikula jani.nik...@linux.intel.com
  Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk (v1)
  Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
  ---
   drivers/gpu/drm/i915/i915_dma.c  | 43 
  +++-
   drivers/video/console/dummycon.c |  1 +
   drivers/video/console/vgacon.c   |  1 +
   3 files changed, 44 insertions(+), 1 deletion(-)
 
  diff --git a/drivers/gpu/drm/i915/i915_dma.c 
  b/drivers/gpu/drm/i915/i915_dma.c
  index 27fe65ac5940..bcb66ddd649e 100644
  --- a/drivers/gpu/drm/i915/i915_dma.c
  +++ b/drivers/gpu/drm/i915/i915_dma.c
  @@ -36,6 +36,8 @@
   #include i915_drv.h
   #include i915_trace.h
   #include linux/pci.h
  +#include linux/console.h
  +#include linux/vt.h
   #include linux/vgaarb.h
   #include linux/acpi.h
   #include linux/pnp.h
  @@ -1449,6 +1451,38 @@ static void i915_kick_out_firmware_fb(struct 
  drm_i915_private *dev_priv)
   }
   #endif
 
  +#if !defined(CONFIG_VGA_CONSOLE)
  +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
  +{
  +   return 0;
  +}
  +#elif !defined(CONFIG_DUMMY_CONSOLE)
 
 Why not select DUMMY_CONSOLE if VT? It's really stupid to disable
 DUMMY_CONSOLE.. Furthermore, we already rely on HW_CONSOLE_BINDING so
 this should be safe.

Iirc this lead kconfig to complain about dep loops ... And I've tried to
figure it out, but I think it's actually impossible. So I let it be with
the -ENODEV to make sure if it's not impossible any more we'll catch it.
-Daniel

 
 Patch looks good to me:
 
 Reviewed-by: David Herrmann dh.herrm...@gmail.com
 
 Thanks
 David
 
  +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
  +{
  +   return -ENODEV;
  +}
  +#else
  +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
  +{
  +   int ret;
  +
  +   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;
  +   }
  +   console_unlock();
  +
  +   return ret;
  +}
  +#endif
  +
   static void i915_dump_device_info(struct drm_i915_private *dev_priv)
   {
  const struct intel_device_info *info = dev_priv-info;
  @@ -1622,8 +1656,15 @@ int i915_driver_load(struct drm_device *dev, 
  unsigned long flags)
  if (ret)
  goto out_regs;
 
  -   if (drm_core_check_feature(dev, DRIVER_MODESET))
  +   if (drm_core_check_feature(dev, DRIVER_MODESET)) {
  +   ret = i915_kick_out_vgacon(dev_priv);
  +   if (ret) {
  +   DRM_ERROR(failed to remove conflicting VGA 
  console\n);
  +   goto out_gtt;
  +   }
  +
  i915_kick_out_firmware_fb(dev_priv);
  +   }
 
  pci_set_master(dev-pdev);
 
  diff --git a/drivers/video/console/dummycon.c 
  b/drivers/video/console/dummycon.c
  index b63860f7beab..40bec8d64b0a 100644
  --- a/drivers/video/console/dummycon.c
  +++ b/drivers/video/console/dummycon.c
  @@ -77,3 +77,4 @@ const struct consw dummy_con = {
   .con_set_palette = DUMMY,
   .con_scrolldelta = DUMMY,
   };
  +EXPORT_SYMBOL_GPL(dummy_con);
  diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
  index 9d8feac67637..84acd6223dc5 100644
  --- a/drivers/video/console/vgacon.c
  +++ b/drivers/video/console/vgacon.c
  @@ -1440,5 +1440,6 @@ const struct consw vga_con = {
  .con_build_attr = vgacon_build_attr,
  .con_invert_region = vgacon_invert_region,
   };
  +EXPORT_SYMBOL(vga_con);
 
   MODULE_LICENSE(GPL);
  --
  1.8.1.4
 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list

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

2014-06-06 Thread Daniel Vetter
Tomi/Jean can you please ack merging this through drm-intel trees? It
just exports the vga and dummy consoles so that i915 can do what it
needs to do.

Thanks, Daniel

On Thu, Jun 5, 2014 at 4:58 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote:
 Touching the VGA resources on an IVB EFI machine causes hard hangs when
 we then kick out the efifb. Ouch.

 Apparently this also prevents unclaimed register errors on hsw and
 hard machine hangs on my i855gm when trying to unbind fbcon.

 Also, we want this to make I915_FBDEV=n safe.

 v2: Rebase and pimp commit message.

 v3: We also need to unregister the vga console, otherwise the unbind
 of the fb console before module unload might resurrect it again.

 v4: Ignore errors when the vga console is already unregistered - this
 can happen when e.g. reloading i915.ko.

 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813
 Cc: David Herrmann dh.herrm...@gmail.com
 Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
 Cc: Tomi Valkeinen tomi.valkei...@ti.com
 Cc: linux-fb...@vger.kernel.org
 Cc: Jani Nikula jani.nik...@linux.intel.com
 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk (v1)
 Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
 ---
  drivers/gpu/drm/i915/i915_dma.c  | 43 
 +++-
  drivers/video/console/dummycon.c |  1 +
  drivers/video/console/vgacon.c   |  1 +
  3 files changed, 44 insertions(+), 1 deletion(-)

 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
 index 27fe65ac5940..bcb66ddd649e 100644
 --- a/drivers/gpu/drm/i915/i915_dma.c
 +++ b/drivers/gpu/drm/i915/i915_dma.c
 @@ -36,6 +36,8 @@
  #include i915_drv.h
  #include i915_trace.h
  #include linux/pci.h
 +#include linux/console.h
 +#include linux/vt.h
  #include linux/vgaarb.h
  #include linux/acpi.h
  #include linux/pnp.h
 @@ -1449,6 +1451,38 @@ static void i915_kick_out_firmware_fb(struct 
 drm_i915_private *dev_priv)
  }
  #endif

 +#if !defined(CONFIG_VGA_CONSOLE)
 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   return 0;
 +}
 +#elif !defined(CONFIG_DUMMY_CONSOLE)
 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   return -ENODEV;
 +}
 +#else
 +static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
 +{
 +   int ret;
 +
 +   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;
 +   }
 +   console_unlock();
 +
 +   return ret;
 +}
 +#endif
 +
  static void i915_dump_device_info(struct drm_i915_private *dev_priv)
  {
 const struct intel_device_info *info = dev_priv-info;
 @@ -1622,8 +1656,15 @@ int i915_driver_load(struct drm_device *dev, unsigned 
 long flags)
 if (ret)
 goto out_regs;

 -   if (drm_core_check_feature(dev, DRIVER_MODESET))
 +   if (drm_core_check_feature(dev, DRIVER_MODESET)) {
 +   ret = i915_kick_out_vgacon(dev_priv);
 +   if (ret) {
 +   DRM_ERROR(failed to remove conflicting VGA 
 console\n);
 +   goto out_gtt;
 +   }
 +
 i915_kick_out_firmware_fb(dev_priv);
 +   }

 pci_set_master(dev-pdev);

 diff --git a/drivers/video/console/dummycon.c 
 b/drivers/video/console/dummycon.c
 index b63860f7beab..40bec8d64b0a 100644
 --- a/drivers/video/console/dummycon.c
 +++ b/drivers/video/console/dummycon.c
 @@ -77,3 +77,4 @@ const struct consw dummy_con = {
  .con_set_palette = DUMMY,
  .con_scrolldelta = DUMMY,
  };
 +EXPORT_SYMBOL_GPL(dummy_con);
 diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
 index 9d8feac67637..84acd6223dc5 100644
 --- a/drivers/video/console/vgacon.c
 +++ b/drivers/video/console/vgacon.c
 @@ -1440,5 +1440,6 @@ const struct consw vga_con = {
 .con_build_attr = vgacon_build_attr,
 .con_invert_region = vgacon_invert_region,
  };
 +EXPORT_SYMBOL(vga_con);

  MODULE_LICENSE(GPL);
 --
 1.8.1.4




-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console

2014-06-05 Thread Daniel Vetter
Touching the VGA resources on an IVB EFI machine causes hard hangs when
we then kick out the efifb. Ouch.

Apparently this also prevents unclaimed register errors on hsw and
hard machine hangs on my i855gm when trying to unbind fbcon.

Also, we want this to make I915_FBDEV=n safe.

v2: Rebase and pimp commit message.

v3: We also need to unregister the vga console, otherwise the unbind
of the fb console before module unload might resurrect it again.

v4: Ignore errors when the vga console is already unregistered - this
can happen when e.g. reloading i915.ko.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813
Cc: David Herrmann dh.herrm...@gmail.com
Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
Cc: Tomi Valkeinen tomi.valkei...@ti.com
Cc: linux-fb...@vger.kernel.org
Cc: Jani Nikula jani.nik...@linux.intel.com
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk (v1)
Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
---
 drivers/gpu/drm/i915/i915_dma.c  | 43 +++-
 drivers/video/console/dummycon.c |  1 +
 drivers/video/console/vgacon.c   |  1 +
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 27fe65ac5940..bcb66ddd649e 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -36,6 +36,8 @@
 #include i915_drv.h
 #include i915_trace.h
 #include linux/pci.h
+#include linux/console.h
+#include linux/vt.h
 #include linux/vgaarb.h
 #include linux/acpi.h
 #include linux/pnp.h
@@ -1449,6 +1451,38 @@ static void i915_kick_out_firmware_fb(struct 
drm_i915_private *dev_priv)
 }
 #endif
 
+#if !defined(CONFIG_VGA_CONSOLE)
+static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
+{
+   return 0;
+}
+#elif !defined(CONFIG_DUMMY_CONSOLE)
+static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
+{
+   return -ENODEV;
+}
+#else
+static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
+{
+   int ret;
+
+   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;
+   }
+   console_unlock();
+
+   return ret;
+}
+#endif
+
 static void i915_dump_device_info(struct drm_i915_private *dev_priv)
 {
const struct intel_device_info *info = dev_priv-info;
@@ -1622,8 +1656,15 @@ int i915_driver_load(struct drm_device *dev, unsigned 
long flags)
if (ret)
goto out_regs;
 
-   if (drm_core_check_feature(dev, DRIVER_MODESET))
+   if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+   ret = i915_kick_out_vgacon(dev_priv);
+   if (ret) {
+   DRM_ERROR(failed to remove conflicting VGA console\n);
+   goto out_gtt;
+   }
+
i915_kick_out_firmware_fb(dev_priv);
+   }
 
pci_set_master(dev-pdev);
 
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index b63860f7beab..40bec8d64b0a 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -77,3 +77,4 @@ const struct consw dummy_con = {
 .con_set_palette = DUMMY,
 .con_scrolldelta = DUMMY,
 };
+EXPORT_SYMBOL_GPL(dummy_con);
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 9d8feac67637..84acd6223dc5 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -1440,5 +1440,6 @@ const struct consw vga_con = {
.con_build_attr = vgacon_build_attr,
.con_invert_region = vgacon_invert_region,
 };
+EXPORT_SYMBOL(vga_con);
 
 MODULE_LICENSE(GPL);
-- 
1.8.1.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx