[PATCH] drm/radeon: Fix an always-false-comparison

2011-04-01 Thread 'Liu Yuan
From: Liu Yuan 

In the function atom_op_delay() of drivers/gpu/drm/radeon/atom.c,
the comparison performed in the udelay() is always false due to
that the unsigned-char is compared to an integer 2.

Signed-off-by: Liu Yuan 
---
 drivers/gpu/drm/radeon/atom.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index 258fa5e..e248211 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -648,7 +648,7 @@ static void atom_op_compare(atom_exec_context *ctx, int 
*ptr, int arg)
 
 static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
 {
-   uint8_t count = U8((*ptr)++);
+   uint32_t count = U32((*ptr)++);
SDEBUG("   count: %d\n", count);
if (arg == ATOM_UNIT_MICROSEC)
udelay(count);
-- 
1.7.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Norbert Preining
Hi all,

adding dri-devel as I found it is actually not completely dead, 
but hanging in some i915 problem.

Copyied from screen:
Process ips-adjust (
Stack:
  
   
  ...
Call Trace:
  
  ... ? tick_program_event
  call_sortirq
  do_softirq
  irq_exit
  smp_apic_timer_interrupt
  apic_timer_interrupt
  
  ? _raw_spin_lock
  i915_gpu_busy
  ips_adjust
  ? show_cpu_temp
  kthread
  kernel_thread_helper
  ? kthread_worker_fn
  ? gs_change
Code: ...
(once more more or less the same as above)

Here the original message.

> I got a new laptop, Lenovo Thinkpad Edge (intel , intel graphic)
> and I am running 2.6.39-rc1 on it (but tried also 2.6.38).
> 
> Suspend to RAM, either by pm-suspend or by echo "mem" >/sys/..
> works, both wiht  running or from a recovery session where nothing
> else is running.
> 
> But wake-up hangs the machine. The video comes back, I see the last
> lines I typed before I suspended, but after that no keypress nor
> anything else (Sysrq) does work, but 4sec-hard-off. No traces in the
> log files.

Full logs etc:
kernel config:
http://www.logic.at/people/preining/lenovo/config.edge
dmesg output after boot:
http://www.logic.at/people/preining/lenovo/dmesg.edge
lsmod, lspci, lsusb
http://www.logic.at/people/preining/lenovo/lsmod.edge
http://www.logic.at/people/preining/lenovo/lspci.edge
http://www.logic.at/people/preining/lenovo/lsusb.edge
photo of the hang:
http://www.logic.at/people/preining/lenovo/i915-hang-after-resume.jpg

Hope that helps, looking forward to any suggestions

Best wishes

Norbert

Norbert Preiningpreining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094

SCREMBY (n.)
The dehydrated felt-tip pen attached by a string to the 'Don't Forget'
board in the kitchen which has never worked in living memory but which
no one can be bothered to throw away.
--- Douglas Adams, The Meaning of Liff
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 32402] Oops associated with radeon_unpin_work_func

2011-04-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=32402





--- Comment #2 from Stuart Foster   2011-04-01 08:12:41 
---
Created an attachment (id=52952)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=52952)
lspci -v details

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 35861] New: [r300g] Oilrush: whiter triangle between center of the screen and horizon

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35861

   Summary: [r300g] Oilrush: whiter triangle between center of the
screen and horizon
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: minor
  Priority: medium
 Component: Drivers/Gallium/r300
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: pavel.ondra...@email.cz


Created an attachment (id=45121)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45121)
terminal output

There is a strange triangle of whiter area and missing effects between screen
center and horizon in Oilrush.

I'm attaching terminal output, however I don't think there is anything
important, just a few of: 

Mesa warning: glDraw[Range]Elements(start 130, end 877, count 1650, type
0x1403, indices=0x1c2)
end is out of bounds (max=876)  Element Buffer 31 (size 3750)
This should probably be fixed in the application.
and 

Mesa: User error: GL_INVALID_VALUE in glTexSubImage2D(xoffset+width)
OpenGL error: invalid value

However both of those errors are also present with llvmpipe which renders fine
(not 100% fine, but this bug is not present there). 
RADEON_NOT_TCL=1 also solves this issue, where READEON_DEBUG=noopt has no
effect.

BTW you need to set MESA_EXTENSION_OVERRIDE="-GL_ARB_draw_instanced" when using
llvmpipe of software TCL otherwise you run into other troubles like: 

GLShader::loadVertex(): error in
"core/shaders/default/meshes/vertex_base.shader" file
defines:
UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_TEXTURE_3D,USE_ALPHA_FADE,USE_ENVIRONMENT,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,HAS_ARB_DRAW_INSTANCED,BASE_AMBIENT_REFLECTION_CUBE,AMBIENT,PAINT,OPACITY,MULTIPLY_0
0:194(39): error: `gl_InstanceID' undeclared
0:194(42): error: Operands to arithmetic operators must be numeric
0:194(19): error: cannot construct `ivec3' from a non-numeric data type
0:194(58): error: Operands to arithmetic operators must be numeric

and almost no rendering at all.

My system
GPU:RV530
mesa: 9f013a8233197d4a0482661cb37cfeac1a61b804
Kernel: 2.6.38

Oilrush version: 0.61

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 35861] [r300g] Oilrush: whiter triangle between center of the screen and horizon

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35861

--- Comment #1 from Pavel Ondračka  2011-04-01 
02:50:20 PDT ---
Created an attachment (id=45122)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45122)
screenshot

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Jesse Barnes
On Fri, 1 Apr 2011 14:15:11 +0900
Norbert Preining  wrote:

> Hi all,
> 
> adding dri-devel as I found it is actually not completely dead, 
> but hanging in some i915 problem.
> 
> Copyied from screen:
> Process ips-adjust (
> Stack:
>   
>
>   ...
> Call Trace:
>   
>   ... ? tick_program_event
>   call_sortirq
>   do_softirq
>   irq_exit
>   smp_apic_timer_interrupt
>   apic_timer_interrupt
>   
>   ? _raw_spin_lock
>   i915_gpu_busy
>   ips_adjust
>   ? show_cpu_temp
>   kthread
>   kernel_thread_helper
>   ? kthread_worker_fn
>   ? gs_change
> Code: ...
> (once more more or less the same as above)

Hm, ok so on resume we're checking GPU busyness, which is normal, but
end up hanging on the spinlock?  Do you see what scrolls by above the
text you took a picture of (probably a "task hung" message?).

Does this happen reliably?  Does a previous kernel work ok?

-- 
Jesse Barnes, Intel Open Source Technology Center

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34709

Michal Suchanek  changed:

   What|Removed |Added

Summary|with r300 (rv530) kms   |[bisected] with r300
   |loaded cannot suspend   |(rv530) kms loaded cannot
   |kernel 2.6.37+ with uswsusp |suspend kernel 2.6.37+ with
   ||uswsusp

--- Comment #6 from Michal Suchanek  2011-04-01 13:36:04 
PDT ---
It breaks two commits after 2.6.37-rc3.

Luckily it's in the rc range where the kernels build and boot, bisecting
something before rc with Linus tree is hell.

The first cut which was halfway between 2.6.36 and 2.6.37 would not boot and
had some oops in atl1 which I happen to use to connect to the box.

commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11
Author: Alex Deucher 
Date:   Fri Nov 19 23:27:04 2010 +

drm/radeon/kms: fix resume regression for some r5xx laptops

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #7 from Alex Deucher  2011-04-01 13:38:37 PDT ---
(In reply to comment #6)
> commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11
> Author: Alex Deucher 
> Date:   Fri Nov 19 23:27:04 2010 +
> 
> drm/radeon/kms: fix resume regression for some r5xx laptops

Are you saying that with this commit reverted it works?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #8 from Michal Suchanek  2011-04-01 14:20:24 
PDT ---
I did not try to revert it. It's way old. Just tried the kernel before and
after.

Note that this is very hardware specific, I get the issue with rv530 but not
rv515gl.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #9 from Alex Deucher  2011-04-01 14:32:20 PDT ---
(In reply to comment #8)
> I did not try to revert it. It's way old. Just tried the kernel before and
> after.
> 
> Note that this is very hardware specific, I get the issue with rv530 but not
> rv515gl.

So the commit before it worked and the one after it did not?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #10 from Michal Suchanek  2011-04-01 15:11:35 
PDT ---
Yes, it does not work with this commit.

I tried to patch a revert on top of 2.6.37 and the kernel suspends fine then.

commit 0c6a5be872fc2c2dc1774501429349ba03d8b2a6
Author: Michal Suchanek 
Date:   Fri Apr 1 23:24:17 2011 +0200

Revert "drm/radeon/kms: fix resume regression for some r5xx laptops"

This reverts commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11.

commit 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5
Author: Linus Torvalds 
Date:   Tue Jan 4 16:50:19 2011 -0800

Linux 2.6.37

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Norbert Preining
On Fr, 01 Apr 2011, Jesse Barnes wrote:
> > Copyied from screen:
> > Process ips-adjust (
> > Stack:
> >   
> >
> >   ...
> > Call Trace:
> >   
> >   ... ? tick_program_event
> >   call_sortirq
> >   do_softirq
> >   irq_exit
> >   smp_apic_timer_interrupt
> >   apic_timer_interrupt
> >   
> >   ? _raw_spin_lock
> >   i915_gpu_busy
> >   ips_adjust
> >   ? show_cpu_temp
> >   kthread
> >   kernel_thread_helper
> >   ? kthread_worker_fn
> >   ? gs_change
> > Code: ...
> > (once more more or less the same as above)
> 
> Hm, ok so on resume we're checking GPU busyness, which is normal, but
> end up hanging on the spinlock?  Do you see what scrolls by above the
> text you took a picture of (probably a "task hung" message?).

More than what I can see on the screen shot I cannot grasp.

> Does this happen reliably?  Does a previous kernel work ok?

Reliable: yes
Previous: I don't know, but I can try out some older git release.
   which one do you suggest?
  (I got the laptop recently so I don't have a long history with that one)

Best wishes

Norbert

Norbert Preiningpreining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094

SCRONKEY (n.)
Something that hits the window as a result of a violent sneeze.
--- Douglas Adams, The Meaning of Liff
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Jesse Barnes
On Sat, 2 Apr 2011 09:24:10 +0900
Norbert Preining  wrote:
> > Hm, ok so on resume we're checking GPU busyness, which is normal,
> > but end up hanging on the spinlock?  Do you see what scrolls by
> > above the text you took a picture of (probably a "task hung"
> > message?).
> 
> More than what I can see on the screen shot I cannot grasp.
> 
> > Does this happen reliably?  Does a previous kernel work ok?
> 
> Reliable: yes
> Previous: I don't know, but I can try out some older git release.
>which one do you suggest?
>   (I got the laptop recently so I don't have a long history with that
> one)

Well I'd start with something like 2.6.37, I think that's the first
release that had IPS.  At least it's good that you can reproduce it
easily...  Can you add something like this to your kernel to see why
the gpu_busy call might be hanging?  I'm guessing we hang trying to
take the spinlock; if so enabling lockdep debugging might tell us who
else took it.

Thanks,
Jesse

diff --git a/drivers/gpu/drm/i915/i915_dma.c
b/drivers/gpu/drm/i915/i915_dma.c index 8cb7f93..47fb29a 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1790,14 +1790,18 @@ bool i915_gpu_busy(void)
struct drm_i915_private *dev_priv;
bool ret = false;
 
+   DRM_ERROR("entering busy check, trying to take lock\n");
+   
spin_lock(&mchdev_lock);
if (!i915_mch_dev)
goto out_unlock;
+   DRM_ERROR("got lock, returning current busy status\n");
dev_priv = i915_mch_dev;
 
ret = dev_priv->busy;
 
 out_unlock:
+   DRM_ERROR("unlock & return\n");
spin_unlock(&mchdev_lock);
 
return ret;
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 35894] New: Displaying across 3 monitors with max resolution causes one monitor to enter power-saving mode (HD6870)

2011-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=35894

   Summary: Displaying across 3 monitors with max resolution
causes one monitor to enter power-saving mode (HD6870)
   Product: DRI
   Version: unspecified
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: woo...@gmail.com


Using arandr, or KDE's RandR manager, I'm trying to adjust my display to
stretch across 3 monitors. One of the monitors enters power-saving mode when I
try this. Monitors are, from left to right:

DVI-1 (1680x1050 LCD)
DisplayPort-1 (1920x1080 LCD)
DVI-0 (1680x1050 LCD)

Configuring a desktop with all monitors set to their maximum resolution causes
one of the two DVI-connected monitors to enter power-saving mode. The mouse
cursor will still "disappear" into this monitor as if it were enabled. No error
messages appear in either X.org.log or dmesg. It is non-deterministic as to
which monitor turns off of the two DVI-connected monitors.

I can configure a desktop with, for example, 1280x1024, 1920x1080, 1280x1024
for resolutions (left to right) and all three monitors will function properly.
I cannot use 1680x1050, 1280x1024, 1680x1050, as one of the DVI monitors will
enter power saving mode. 

I have tested, and this hardware configuration will function with the
proprietary fglrx driver, and under Windows, so the card/monitors do not appear
at fault.

I have tried the 2.6.38 release candidate kernels, and this feature has never
functioned correctly, so I don't think it's a regression.

HARDWARE:
PowerColor HD6870
AMD 1075T
12Gb RAM
Asus M4A89/GTD-PRO USB3
DVI-1: LG Flatron W2242TQ
DisplayPort-1: Dell UV22H
DVI-0: ASUS (unknown)

OS:
ArchLinux, 64-bit with:
Kernel26, 2.6.38.2-1
xf86-video-ati 6.14.1-1
xorg-server 1.10.0.901-1
libdrm 2.4.24-1
ati-dri 7.10.1-1

Please let me know if I can provide any additional details. I am willing to
apply patches to the kernel or other packages as needed to test.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 35861] New: [r300g] Oilrush: whiter triangle between center of the screen and horizon

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=35861

   Summary: [r300g] Oilrush: whiter triangle between center of the
screen and horizon
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: minor
  Priority: medium
 Component: Drivers/Gallium/r300
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: pavel.ondracka at email.cz


Created an attachment (id=45121)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45121)
terminal output

There is a strange triangle of whiter area and missing effects between screen
center and horizon in Oilrush.

I'm attaching terminal output, however I don't think there is anything
important, just a few of: 

Mesa warning: glDraw[Range]Elements(start 130, end 877, count 1650, type
0x1403, indices=0x1c2)
end is out of bounds (max=876)  Element Buffer 31 (size 3750)
This should probably be fixed in the application.
and 

Mesa: User error: GL_INVALID_VALUE in glTexSubImage2D(xoffset+width)
OpenGL error: invalid value

However both of those errors are also present with llvmpipe which renders fine
(not 100% fine, but this bug is not present there). 
RADEON_NOT_TCL=1 also solves this issue, where READEON_DEBUG=noopt has no
effect.

BTW you need to set MESA_EXTENSION_OVERRIDE="-GL_ARB_draw_instanced" when using
llvmpipe of software TCL otherwise you run into other troubles like: 

GLShader::loadVertex(): error in
"core/shaders/default/meshes/vertex_base.shader" file
defines:
UNKNOWN,QUALITY_LOW,MULTISAMPLE_0,USE_INSTANCING,USE_TEXTURE_3D,USE_ALPHA_FADE,USE_ENVIRONMENT,OPENGL,USE_PSEUDO_INSTANCING,USE_PSEUDO_TRANSFORM,HAS_ARB_DRAW_INSTANCED,BASE_AMBIENT_REFLECTION_CUBE,AMBIENT,PAINT,OPACITY,MULTIPLY_0
0:194(39): error: `gl_InstanceID' undeclared
0:194(42): error: Operands to arithmetic operators must be numeric
0:194(19): error: cannot construct `ivec3' from a non-numeric data type
0:194(58): error: Operands to arithmetic operators must be numeric

and almost no rendering at all.

My system
GPU:RV530
mesa: 9f013a8233197d4a0482661cb37cfeac1a61b804
Kernel: 2.6.38

Oilrush version: 0.61

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 35861] [r300g] Oilrush: whiter triangle between center of the screen and horizon

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=35861

--- Comment #1 from Pavel Ondra?ka  2011-04-01 
02:50:20 PDT ---
Created an attachment (id=45122)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45122)
screenshot

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Jesse Barnes
On Fri, 1 Apr 2011 14:15:11 +0900
Norbert Preining  wrote:

> Hi all,
> 
> adding dri-devel as I found it is actually not completely dead, 
> but hanging in some i915 problem.
> 
> Copyied from screen:
> Process ips-adjust (
> Stack:
>   
>
>   ...
> Call Trace:
>   
>   ... ? tick_program_event
>   call_sortirq
>   do_softirq
>   irq_exit
>   smp_apic_timer_interrupt
>   apic_timer_interrupt
>   
>   ? _raw_spin_lock
>   i915_gpu_busy
>   ips_adjust
>   ? show_cpu_temp
>   kthread
>   kernel_thread_helper
>   ? kthread_worker_fn
>   ? gs_change
> Code: ...
> (once more more or less the same as above)

Hm, ok so on resume we're checking GPU busyness, which is normal, but
end up hanging on the spinlock?  Do you see what scrolls by above the
text you took a picture of (probably a "task hung" message?).

Does this happen reliably?  Does a previous kernel work ok?

-- 
Jesse Barnes, Intel Open Source Technology Center

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34709

Michal Suchanek  changed:

   What|Removed |Added

Summary|with r300 (rv530) kms   |[bisected] with r300
   |loaded cannot suspend   |(rv530) kms loaded cannot
   |kernel 2.6.37+ with uswsusp |suspend kernel 2.6.37+ with
   ||uswsusp

--- Comment #6 from Michal Suchanek  2011-04-01 13:36:04 
PDT ---
It breaks two commits after 2.6.37-rc3.

Luckily it's in the rc range where the kernels build and boot, bisecting
something before rc with Linus tree is hell.

The first cut which was halfway between 2.6.36 and 2.6.37 would not boot and
had some oops in atl1 which I happen to use to connect to the box.

commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11
Author: Alex Deucher 
Date:   Fri Nov 19 23:27:04 2010 +

drm/radeon/kms: fix resume regression for some r5xx laptops

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #7 from Alex Deucher  2011-04-01 13:38:37 PDT 
---
(In reply to comment #6)
> commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11
> Author: Alex Deucher 
> Date:   Fri Nov 19 23:27:04 2010 +
> 
> drm/radeon/kms: fix resume regression for some r5xx laptops

Are you saying that with this commit reverted it works?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #8 from Michal Suchanek  2011-04-01 14:20:24 
PDT ---
I did not try to revert it. It's way old. Just tried the kernel before and
after.

Note that this is very hardware specific, I get the issue with rv530 but not
rv515gl.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #9 from Alex Deucher  2011-04-01 14:32:20 PDT 
---
(In reply to comment #8)
> I did not try to revert it. It's way old. Just tried the kernel before and
> after.
> 
> Note that this is very hardware specific, I get the issue with rv530 but not
> rv515gl.

So the commit before it worked and the one after it did not?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 34709] [bisected] with r300 (rv530) kms loaded cannot suspend kernel 2.6.37+ with uswsusp

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34709

--- Comment #10 from Michal Suchanek  2011-04-01 
15:11:35 PDT ---
Yes, it does not work with this commit.

I tried to patch a revert on top of 2.6.37 and the kernel suspends fine then.

commit 0c6a5be872fc2c2dc1774501429349ba03d8b2a6
Author: Michal Suchanek 
Date:   Fri Apr 1 23:24:17 2011 +0200

Revert "drm/radeon/kms: fix resume regression for some r5xx laptops"

This reverts commit f24d86f1a49505cdea56728b853a5d0a3f8e3d11.

commit 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5
Author: Linus Torvalds 
Date:   Tue Jan 4 16:50:19 2011 -0800

Linux 2.6.37

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Jesse Barnes
On Sat, 2 Apr 2011 09:24:10 +0900
Norbert Preining  wrote:
> > Hm, ok so on resume we're checking GPU busyness, which is normal,
> > but end up hanging on the spinlock?  Do you see what scrolls by
> > above the text you took a picture of (probably a "task hung"
> > message?).
> 
> More than what I can see on the screen shot I cannot grasp.
> 
> > Does this happen reliably?  Does a previous kernel work ok?
> 
> Reliable: yes
> Previous: I don't know, but I can try out some older git release.
>which one do you suggest?
>   (I got the laptop recently so I don't have a long history with that
> one)

Well I'd start with something like 2.6.37, I think that's the first
release that had IPS.  At least it's good that you can reproduce it
easily...  Can you add something like this to your kernel to see why
the gpu_busy call might be hanging?  I'm guessing we hang trying to
take the spinlock; if so enabling lockdep debugging might tell us who
else took it.

Thanks,
Jesse

diff --git a/drivers/gpu/drm/i915/i915_dma.c
b/drivers/gpu/drm/i915/i915_dma.c index 8cb7f93..47fb29a 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1790,14 +1790,18 @@ bool i915_gpu_busy(void)
struct drm_i915_private *dev_priv;
bool ret = false;

+   DRM_ERROR("entering busy check, trying to take lock\n");
+   
spin_lock(&mchdev_lock);
if (!i915_mch_dev)
goto out_unlock;
+   DRM_ERROR("got lock, returning current busy status\n");
dev_priv = i915_mch_dev;

ret = dev_priv->busy;

 out_unlock:
+   DRM_ERROR("unlock & return\n");
spin_unlock(&mchdev_lock);

return ret;


[Bug 35894] New: Displaying across 3 monitors with max resolution causes one monitor to enter power-saving mode (HD6870)

2011-04-01 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=35894

   Summary: Displaying across 3 monitors with max resolution
causes one monitor to enter power-saving mode (HD6870)
   Product: DRI
   Version: unspecified
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: woogie at gmail.com


Using arandr, or KDE's RandR manager, I'm trying to adjust my display to
stretch across 3 monitors. One of the monitors enters power-saving mode when I
try this. Monitors are, from left to right:

DVI-1 (1680x1050 LCD)
DisplayPort-1 (1920x1080 LCD)
DVI-0 (1680x1050 LCD)

Configuring a desktop with all monitors set to their maximum resolution causes
one of the two DVI-connected monitors to enter power-saving mode. The mouse
cursor will still "disappear" into this monitor as if it were enabled. No error
messages appear in either X.org.log or dmesg. It is non-deterministic as to
which monitor turns off of the two DVI-connected monitors.

I can configure a desktop with, for example, 1280x1024, 1920x1080, 1280x1024
for resolutions (left to right) and all three monitors will function properly.
I cannot use 1680x1050, 1280x1024, 1680x1050, as one of the DVI monitors will
enter power saving mode. 

I have tested, and this hardware configuration will function with the
proprietary fglrx driver, and under Windows, so the card/monitors do not appear
at fault.

I have tried the 2.6.38 release candidate kernels, and this feature has never
functioned correctly, so I don't think it's a regression.

HARDWARE:
PowerColor HD6870
AMD 1075T
12Gb RAM
Asus M4A89/GTD-PRO USB3
DVI-1: LG Flatron W2242TQ
DisplayPort-1: Dell UV22H
DVI-0: ASUS (unknown)

OS:
ArchLinux, 64-bit with:
Kernel26, 2.6.38.2-1
xf86-video-ati 6.14.1-1
xorg-server 1.10.0.901-1
libdrm 2.4.24-1
ati-dri 7.10.1-1

Please let me know if I can provide any additional details. I am willing to
apply patches to the kernel or other packages as needed to test.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 32402] Oops associated with radeon_unpin_work_func

2011-04-01 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=32402





--- Comment #2 from Stuart Foster   2011-04-01 
08:12:41 ---
Created an attachment (id=52952)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=52952)
lspci -v details

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon: Fix an always-false-comparison

2011-04-01 Thread 'Liu Yuan
From: Liu Yuan 

In the function atom_op_delay() of drivers/gpu/drm/radeon/atom.c,
the comparison performed in the udelay() is always false due to
that the unsigned-char is compared to an integer 2.

Signed-off-by: Liu Yuan 
---
 drivers/gpu/drm/radeon/atom.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index 258fa5e..e248211 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -648,7 +648,7 @@ static void atom_op_compare(atom_exec_context *ctx, int 
*ptr, int arg)

 static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
 {
-   uint8_t count = U8((*ptr)++);
+   uint32_t count = U32((*ptr)++);
SDEBUG("   count: %d\n", count);
if (arg == ATOM_UNIT_MICROSEC)
udelay(count);
-- 
1.7.1



Lenovo resume from suspends hangs in i915_gpu_busy or so

2011-04-01 Thread Norbert Preining
Hi all,

adding dri-devel as I found it is actually not completely dead, 
but hanging in some i915 problem.

Copyied from screen:
Process ips-adjust (
Stack:
  
   
  ...
Call Trace:
  
  ... ? tick_program_event
  call_sortirq
  do_softirq
  irq_exit
  smp_apic_timer_interrupt
  apic_timer_interrupt
  
  ? _raw_spin_lock
  i915_gpu_busy
  ips_adjust
  ? show_cpu_temp
  kthread
  kernel_thread_helper
  ? kthread_worker_fn
  ? gs_change
Code: ...
(once more more or less the same as above)

Here the original message.

> I got a new laptop, Lenovo Thinkpad Edge (intel , intel graphic)
> and I am running 2.6.39-rc1 on it (but tried also 2.6.38).
> 
> Suspend to RAM, either by pm-suspend or by echo "mem" >/sys/..
> works, both wiht  running or from a recovery session where nothing
> else is running.
> 
> But wake-up hangs the machine. The video comes back, I see the last
> lines I typed before I suspended, but after that no keypress nor
> anything else (Sysrq) does work, but 4sec-hard-off. No traces in the
> log files.

Full logs etc:
kernel config:
http://www.logic.at/people/preining/lenovo/config.edge
dmesg output after boot:
http://www.logic.at/people/preining/lenovo/dmesg.edge
lsmod, lspci, lsusb
http://www.logic.at/people/preining/lenovo/lsmod.edge
http://www.logic.at/people/preining/lenovo/lspci.edge
http://www.logic.at/people/preining/lenovo/lsusb.edge
photo of the hang:
http://www.logic.at/people/preining/lenovo/i915-hang-after-resume.jpg

Hope that helps, looking forward to any suggestions

Best wishes

Norbert

Norbert Preiningpreining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094

SCREMBY (n.)
The dehydrated felt-tip pen attached by a string to the 'Don't Forget'
board in the kitchen which has never worked in living memory but which
no one can be bothered to throw away.
--- Douglas Adams, The Meaning of Liff