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 , 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 

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 unre

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 

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