* [3.14-rc1] cirrus driver problem (qemu)
@ 2014-02-03 15:34 Sabrina Dubroca
2014-02-04 3:20 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Sabrina Dubroca @ 2014-02-03 15:34 UTC (permalink / raw)
To: Dave Airlie, dri-devel; +Cc: linux-kernel
When I boot 3.14-rc1 in qemu, I get the trace below. The console stops
updating and I don't get a login prompt. I can login, but I can't see
what I'm doing. I can login normally via SSH.
If I revert the last commit in drivers/gpu/drm/cirrus:
f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep
the problem is solved.
[ 1.749341] ------------[ cut here ]------------
[ 1.749347] WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:856 mutex_trylock+0x1e5/0x250()
[ 1.749348] DEBUG_LOCKS_WARN_ON(in_interrupt())
[ 1.749360] Modules linked in: ppdev cirrus syscopyarea sysfillrect sysimgblt drm_kms_helper evdev psmouse microcode serio_raw pcspkr ttm e1000 parport_pc parport processor button intel_agp drm intel_gtt i2c_piix4 ipv6 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic pata_acpi ata_piix 9pnet_virtio 9pnet libata scsi_mod
[ 1.749362] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-rc1-t1 #34
[ 1.749364] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 1.749366] 0000000000000009 ffff88001fc038c8 ffffffff814e8456 ffff88001fc03910
[ 1.749367] ffff88001fc03900 ffffffff8106a0dd ffff88001d3ff990 0000000000000010
[ 1.749368] 0000000000000000 00000000000001e0 ffff88001cc3b000 ffff88001fc03960
[ 1.749369] Call Trace:
[ 1.749372] <IRQ> [<ffffffff814e8456>] dump_stack+0x4d/0x6f
[ 1.749374] [<ffffffff8106a0dd>] warn_slowpath_common+0x7d/0xa0
[ 1.749375] [<ffffffff8106a14c>] warn_slowpath_fmt+0x4c/0x50
[ 1.749377] [<ffffffff814ebf45>] mutex_trylock+0x1e5/0x250
[ 1.749380] [<ffffffffa037888c>] cirrus_dirty_update+0x7c/0x2f0 [cirrus]
[ 1.749381] [<ffffffffa0378b2f>] cirrus_imageblit+0x2f/0x40 [cirrus]
[ 1.749388] [<ffffffff813188f4>] soft_cursor+0x1b4/0x250
[ 1.749390] [<ffffffff813181a3>] bit_cursor+0x613/0x650
[ 1.749391] [<ffffffff81313891>] ? get_color.isra.15+0x31/0x140
[ 1.749392] [<ffffffff8131442b>] fbcon_cursor+0x13b/0x1c0
[ 1.749393] [<ffffffff81317b90>] ? update_attr.isra.2+0x90/0x90
[ 1.749398] [<ffffffff81380fd8>] hide_cursor+0x28/0xa0
[ 1.749400] [<ffffffff81382428>] vt_console_print+0x398/0x3d0
[ 1.749405] [<ffffffff810bc0af>] ? print_prefix+0x6f/0xb0
[ 1.749407] [<ffffffff810bcc03>] call_console_drivers.constprop.18+0x93/0x110
[ 1.749409] [<ffffffff810bd33f>] console_unlock+0x3cf/0x410
[ 1.749410] [<ffffffff810bd501>] vprintk_emit+0x181/0x4f0
[ 1.749412] [<ffffffff814e60dd>] printk+0x54/0x56
[ 1.749414] [<ffffffff81397bca>] credit_entropy_bits+0x2ea/0x300
[ 1.749415] [<ffffffff81398166>] ? mix_pool_bytes.constprop.30+0x56/0xc0
[ 1.749416] [<ffffffff8139866e>] add_timer_randomness+0xee/0x120
[ 1.749418] [<ffffffff81399463>] add_disk_randomness+0x33/0xb0
[ 1.749424] [<ffffffff8127d4bc>] blk_update_bidi_request+0x5c/0x80
[ 1.749426] [<ffffffff8127d79f>] blk_end_bidi_request+0x1f/0x60
[ 1.749427] [<ffffffff8127d7f0>] blk_end_request+0x10/0x20
[ 1.749433] [<ffffffffa0009db9>] scsi_io_completion+0xa9/0x640 [scsi_mod]
[ 1.749436] [<ffffffffa00014b2>] scsi_finish_command+0xa2/0xe0 [scsi_mod]
[ 1.749440] [<ffffffffa0009c1e>] scsi_softirq_done+0x10e/0x130 [scsi_mod]
[ 1.749441] [<ffffffff81283fb3>] blk_done_softirq+0x93/0xb0
[ 1.749443] [<ffffffff8106ee15>] __do_softirq+0x105/0x2f0
[ 1.749444] [<ffffffff8106f2b2>] irq_exit+0x92/0xc0
[ 1.749446] [<ffffffff814fa798>] do_IRQ+0x58/0xf0
[ 1.749447] [<ffffffff814f03ad>] common_interrupt+0x6d/0x6d
[ 1.749450] <EOI> [<ffffffff810546d6>] ? native_safe_halt+0x6/0x10
[ 1.749453] [<ffffffff8102047d>] default_idle+0x2d/0x110
[ 1.749454] [<ffffffff81020e9e>] arch_cpu_idle+0x2e/0x40
[ 1.749455] [<ffffffff810bec05>] cpu_startup_entry+0xa5/0x2e0
[ 1.749464] [<ffffffff81ae2120>] ? early_idt_handlers+0x120/0x120
[ 1.749466] [<ffffffff814daad4>] rest_init+0x84/0x90
[ 1.749467] [<ffffffff81ae2fa9>] start_kernel+0x443/0x44e
[ 1.749468] [<ffffffff81ae296f>] ? repair_env_string+0x5c/0x5c
[ 1.749469] [<ffffffff81ae25f6>] x86_64_start_reservations+0x2a/0x2c
[ 1.749470] [<ffffffff81ae2761>] x86_64_start_kernel+0x169/0x178
[ 1.749471] ---[ end trace d478ba7c30908d4d ]---
--
Sabrina Dubroca
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [3.14-rc1] cirrus driver problem (qemu)
2014-02-03 15:34 [3.14-rc1] cirrus driver problem (qemu) Sabrina Dubroca
@ 2014-02-04 3:20 ` Dave Airlie
2014-02-04 22:53 ` Sabrina Dubroca
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2014-02-04 3:20 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: Dave Airlie, dri-devel, LKML
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
On Tue, Feb 4, 2014 at 1:34 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> When I boot 3.14-rc1 in qemu, I get the trace below. The console stops
> updating and I don't get a login prompt. I can login, but I can't see
> what I'm doing. I can login normally via SSH.
>
> If I revert the last commit in drivers/gpu/drm/cirrus:
>
> f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep
>
> the problem is solved.
>
Hi does the attach patch fix it?
Dave.
[-- Attachment #2: 0001-drm-add-in_interrupt-to-drm_can_sleep-list-of-things.patch --]
[-- Type: text/x-patch, Size: 2532 bytes --]
From c6feb881e00c8db9f9f73d099a08e86c5af79d50 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 4 Feb 2014 13:19:08 +1000
Subject: [PATCH] drm: add in_interrupt to drm_can_sleep list of things
This should stop us taking locks when we shouldn't in the console drivers,
[ 1.749341] ------------[ cut here ]------------
[ 1.749347] WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:856 mutex_trylock+0x1e5/0x250()
[ 1.749348] DEBUG_LOCKS_WARN_ON(in_interrupt())
[ 1.749360] Modules linked in: ppdev cirrus syscopyarea sysfillrect sysimgblt drm_kms_helper evdev psmouse microcode serio_raw pcspkr ttm e1000 parport_pc parport processor button intel_agp drm intel_gtt i2c_piix4 ipv6 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic pata_acpi ata_piix 9pnet_virtio 9pnet libata scsi_mod
[ 1.749362] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-rc1-t1 #34
[ 1.749364] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 1.749366] 0000000000000009 ffff88001fc038c8 ffffffff814e8456 ffff88001fc03910
[ 1.749367] ffff88001fc03900 ffffffff8106a0dd ffff88001d3ff990 0000000000000010
[ 1.749368] 0000000000000000 00000000000001e0 ffff88001cc3b000 ffff88001fc03960
[ 1.749369] Call Trace:
[ 1.749372] <IRQ> [<ffffffff814e8456>] dump_stack+0x4d/0x6f
[ 1.749374] [<ffffffff8106a0dd>] warn_slowpath_common+0x7d/0xa0
[ 1.749375] [<ffffffff8106a14c>] warn_slowpath_fmt+0x4c/0x50
[ 1.749377] [<ffffffff814ebf45>] mutex_trylock+0x1e5/0x250
[ 1.749380] [<ffffffffa037888c>] cirrus_dirty_update+0x7c/0x2f0 [cirrus]
[ 1.749381] [<ffffffffa0378b2f>] cirrus_imageblit+0x2f/0x40 [cirrus]
[ 1.749388] [<ffffffff813188f4>] soft_cursor+0x1b4/0x250
[ 1.749390] [<ffffffff813181a3>] bit_cursor+0x613/0x650
[ 1.749391] [<ffffffff81313891>] ? get_color.isra.15+0x31/0x140
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
include/drm/drmP.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1d4a920..3a98664 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1665,7 +1665,7 @@ extern void drm_platform_exit(struct drm_driver *driver, struct platform_device
/* returns true if currently okay to sleep */
static __inline__ bool drm_can_sleep(void)
{
- if (in_atomic() || in_dbg_master() || irqs_disabled())
+ if (in_atomic() || in_dbg_master() || in_interrupt() || irqs_disabled())
return false;
return true;
}
--
1.8.4.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [3.14-rc1] cirrus driver problem (qemu)
2014-02-04 3:20 ` Dave Airlie
@ 2014-02-04 22:53 ` Sabrina Dubroca
2014-02-05 4:50 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Sabrina Dubroca @ 2014-02-04 22:53 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, dri-devel, LKML
2014-02-04, 13:20:54 +1000, Dave Airlie wrote:
> On Tue, Feb 4, 2014 at 1:34 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> > When I boot 3.14-rc1 in qemu, I get the trace below. The console stops
> > updating and I don't get a login prompt. I can login, but I can't see
> > what I'm doing. I can login normally via SSH.
> >
> > If I revert the last commit in drivers/gpu/drm/cirrus:
> >
> > f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep
> >
> > the problem is solved.
> >
>
> Hi does the attach patch fix it?
>
> Dave.
Same problem. Didn't you reverse the logic on in_interrupt, compared
to the old "if (!in_interrupt())" ? It looks like drm_can_sleep() is
false when in_interrupt() is true.
I modified your patch as below. Display doesn't freeze, but I still
get the warning.
Thanks,
Sabrina
---
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 04086c5..6ab14455f 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1696,7 +1696,7 @@ extern int drm_platform_init(struct drm_driver *driver, struct platform_device *
/* returns true if currently okay to sleep */
static __inline__ bool drm_can_sleep(void)
{
- if (in_atomic() || in_dbg_master() || irqs_disabled())
+ if (in_atomic() || in_dbg_master() || !in_interrupt() || irqs_disabled())
return false;
return true;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [3.14-rc1] cirrus driver problem (qemu)
2014-02-04 22:53 ` Sabrina Dubroca
@ 2014-02-05 4:50 ` Dave Airlie
2014-02-05 8:24 ` Sabrina Dubroca
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2014-02-05 4:50 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: Dave Airlie, dri-devel, LKML
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
On Wed, Feb 5, 2014 at 8:53 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> 2014-02-04, 13:20:54 +1000, Dave Airlie wrote:
>> On Tue, Feb 4, 2014 at 1:34 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
>> > When I boot 3.14-rc1 in qemu, I get the trace below. The console stops
>> > updating and I don't get a login prompt. I can login, but I can't see
>> > what I'm doing. I can login normally via SSH.
>> >
>> > If I revert the last commit in drivers/gpu/drm/cirrus:
>> >
>> > f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep
>> >
>> > the problem is solved.
>> >
>>
>> Hi does the attach patch fix it?
>>
>> Dave.
>
>
> Same problem. Didn't you reverse the logic on in_interrupt, compared
> to the old "if (!in_interrupt())" ? It looks like drm_can_sleep() is
> false when in_interrupt() is true.
>
> I modified your patch as below. Display doesn't freeze, but I still
> get the warning.
Oh wow I totally screwed up there, you are right, logic inversion.
Can you try the attached?
without the in_interrupt addition.
Dave.
[-- Attachment #2: 0001-drm-mgag200-ast-cirrus-fix-regression-with-drm_can_s.patch --]
[-- Type: text/x-patch, Size: 2030 bytes --]
From c39a8bdd2586c616e9b3746db128180d4e0ca8ec Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 5 Feb 2014 14:47:45 +1000
Subject: [PATCH] drm/mgag200,ast,cirrus: fix regression with drm_can_sleep
conversion
I totally sign inverted my way out of this one.
Reported-by: "Sabrina Dubroca" <sd@queasysnail.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/ast/ast_fb.c | 2 +-
drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +-
drivers/gpu/drm/mgag200/mgag200_fb.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 3f65dd6..a28640f 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -65,7 +65,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
* then the BO is being moved and we should
* store up the damage until later.
*/
- if (!drm_can_sleep())
+ if (drm_can_sleep())
ret = ast_bo_reserve(bo, true);
if (ret) {
if (ret != -EBUSY)
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index 2fd4a92..32bbba0 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -39,7 +39,7 @@ static void cirrus_dirty_update(struct cirrus_fbdev *afbdev,
* then the BO is being moved and we should
* store up the damage until later.
*/
- if (!drm_can_sleep())
+ if (drm_can_sleep())
ret = cirrus_bo_reserve(bo, true);
if (ret) {
if (ret != -EBUSY)
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index f9adc27..13b7dd8 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -41,7 +41,7 @@ static void mga_dirty_update(struct mga_fbdev *mfbdev,
* then the BO is being moved and we should
* store up the damage until later.
*/
- if (!drm_can_sleep())
+ if (drm_can_sleep())
ret = mgag200_bo_reserve(bo, true);
if (ret) {
if (ret != -EBUSY)
--
1.8.4.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [3.14-rc1] cirrus driver problem (qemu)
2014-02-05 4:50 ` Dave Airlie
@ 2014-02-05 8:24 ` Sabrina Dubroca
0 siblings, 0 replies; 5+ messages in thread
From: Sabrina Dubroca @ 2014-02-05 8:24 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, dri-devel, LKML
2014-02-05, 14:50:18 +1000, Dave Airlie wrote:
> On Wed, Feb 5, 2014 at 8:53 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> > 2014-02-04, 13:20:54 +1000, Dave Airlie wrote:
> >> On Tue, Feb 4, 2014 at 1:34 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> >> > When I boot 3.14-rc1 in qemu, I get the trace below. The console stops
> >> > updating and I don't get a login prompt. I can login, but I can't see
> >> > what I'm doing. I can login normally via SSH.
> >> >
> >> > If I revert the last commit in drivers/gpu/drm/cirrus:
> >> >
> >> > f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep
> >> >
> >> > the problem is solved.
> >> >
> >>
> >> Hi does the attach patch fix it?
> >>
> >> Dave.
> >
> >
> > Same problem. Didn't you reverse the logic on in_interrupt, compared
> > to the old "if (!in_interrupt())" ? It looks like drm_can_sleep() is
> > false when in_interrupt() is true.
> >
> > I modified your patch as below. Display doesn't freeze, but I still
> > get the warning.
>
> Oh wow I totally screwed up there, you are right, logic inversion.
>
> Can you try the attached?
>
> without the in_interrupt addition.
>
> Dave.
It works, thanks!
No freeze, no warning.
Sabrina
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-05 8:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 15:34 [3.14-rc1] cirrus driver problem (qemu) Sabrina Dubroca
2014-02-04 3:20 ` Dave Airlie
2014-02-04 22:53 ` Sabrina Dubroca
2014-02-05 4:50 ` Dave Airlie
2014-02-05 8:24 ` Sabrina Dubroca
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox