Re: [PATCH] rate limit drm:radeon_cp_idle/reset errors

Previous thread: Uniquely identify and Motherboard Model. by James Courtier-Dutton on Saturday, September 6, 2008 - 2:09 am. (2 messages)

Next thread: SOS new timer: by Raz on Saturday, September 6, 2008 - 2:35 am. (1 message)
From: Roberto Oppedisano
Date: Saturday, September 6, 2008 - 2:19 am

When switching from kwin composite wm (KDE 4.1) to compiz I often hit the
following error:

Sep  6 10:24:31 poppero1 kernel: [  186.138203] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.138568] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held  0 owner f726bc80 f68f6840

probably due to broken X drivers/apps; after hitting this the error my laptop
(hp nx7010) is totally unresponsitive to keyboard/mouse, also if it can be 
shut down via the power button:

Sep  6 10:24:59 poppero1 powersave-wm_shutdown[4843]: DIAG: Process script for event button.power ID 10
Sep  6 10:24:59 poppero1 powersave-wm_shutdown[4843]: INFO: Event: BUTTON_POWER occured.
Sep  6 10:24:59 poppero1 powersave-wm_shutdown[4843]: INFO: Parameters: Event - button.power; Current Active Scheme: scheme_performance - ACPI event line: button/power PWRF 00000080
00000001
Sep  6 10:25:00 poppero1 shutdown[4852]: shutting down for system halt
...

Without the attached patch, which rate limits DRM_ERROR, the syslog is flooded
by thuosands of messages; here's the output with the patch applied.

Sep  6 10:24:31 poppero1 kernel: [  186.138774] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.138968] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.139214] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.139408] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.139601] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held  0 owner f726bc80 f68f6840
Sep  6 10:24:31 poppero1 kernel: [  186.139866] [drm:radeon_cp_reset] ...
From: Andrew Morton
Date: Monday, September 8, 2008 - 9:08 pm

Which kernel version(s)?
--

From: Roberto Oppedisano
Date: Tuesday, September 9, 2008 - 12:37 am

This is against vanilla current git. 

Linux poppero1 2.6.27-rc5-00000-g7686ad5-dirty #1 PREEMPT Sun Sep 7 08:47:08 CEST 2008 i686 GNU/Linux

R

--

From: Andrew Morton
Date: Tuesday, September 9, 2008 - 1:12 am

Thanks.  I should have asked earlier: was 2.6.26 OK?  Any other kernels
tested?

--

From: Dave Airlie
Date: Tuesday, September 9, 2008 - 1:15 am

This looks like a userspace problem, some app is accessing the drm file 
descriptror without holding the drm lock, this is very illegal.

Its probably a race between the X server and the AIGLX driver.

Dave.
--

From: Roberto Oppedisano
Date: Tuesday, September 9, 2008 - 3:08 am

I also think it's a userspace problem. I found it while playing with
KDE4.1 kwin/Compiz, less than a month ago, always running on a current
vanilla git kernel: I noticed the syslog storm only recently (my bad,
because judging from the disk light I think it has always been there).

If you think it's useful I can do some test with older kernels (will
take some time btw).
R
--

Previous thread: Uniquely identify and Motherboard Model. by James Courtier-Dutton on Saturday, September 6, 2008 - 2:09 am. (2 messages)

Next thread: SOS new timer: by Raz on Saturday, September 6, 2008 - 2:35 am. (1 message)