[RFC libdrm] Use __sync_val_compare_and_swap to implement DRM_CAS

2010-10-28 Thread Matt Turner
Can we use gcc's __sync_val_compare_and_swap to implement DRM_CAS?
(If so, do we actually need the __sync_val version, or can we use
__sync_bool?)

I just threw the patch together in two minutes, so I've got no idea
if it's right, just looking for feedback. The purpose of this is to
remove a lot of inline assembly that hasn't been touched since the
file was added in 2004, including some awesome already-assembled
SPARC instructions.

Apparently someone had this idea before me. Way before me, as this
code already exists in the Itanium section, though commented out for
some reason long forgotten.

I don't have any idea when gcc added this. I just said 4.0, but this
must be wrong, given the previous paragraph.

http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html
---
 xf86drm.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xf86drm.h b/xf86drm.h
index 9b89f56..1459b5a 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -333,7 +333,12 @@ typedef struct _drmSetVersion {
 #define DRM_LOCK_HELD  0x8000U /**< Hardware lock is held */
 #define DRM_LOCK_CONT  0x4000U /**< Hardware lock is contended */

-#if defined(__GNUC__) && (__GNUC__ >= 2)
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+
+#define DRM_CAS(lock, old, new, __ret) \
+   __ret = __sync_val_compare_and_swap(i&__drm_dummy_lock(lock), (old), 
(new)) != (old)
+
+#elif defined(__GNUC__) && (__GNUC__ >= 2)
 # if defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || 
defined(__amd64__)
/* Reflect changes here to drmP.h */
 #define DRM_CAS(lock,old,new,__ret)\
-- 
1.7.2.2

-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20101028/91650346/attachment.pgp>


[Bug 13875] SiS DRI lacks WMB support on SPARC (MIPS and any other non-x86 architecture)

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=13875

Matt Turner  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #6 from Matt Turner  2010-10-28 19:05:53 PDT 
---
Marking as WONTFIX. Feel free to reopen, but preferably, if you care, send a
patch.

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


[PATCH] drm/radeon/kms/evergreen: add missing pm.vblank_sync update in vbl handler

2010-10-28 Thread Alex Deucher
Should fix dynpm problems on evergreen boards

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/radeon/evergreen.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index f12a5b3..9947fd5 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2295,6 +2295,7 @@ restart_ih:
case 0: /* D1 vblank */
if (disp_int & LB_D1_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 0);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int &= ~LB_D1_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D1 vblank\n");
@@ -2316,6 +2317,7 @@ restart_ih:
case 0: /* D2 vblank */
if (disp_int_cont & LB_D2_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 1);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int_cont &= 
~LB_D2_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D2 vblank\n");
@@ -2337,6 +2339,7 @@ restart_ih:
case 0: /* D3 vblank */
if (disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 2);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int_cont2 &= 
~LB_D3_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D3 vblank\n");
@@ -2358,6 +2361,7 @@ restart_ih:
case 0: /* D4 vblank */
if (disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 3);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int_cont3 &= 
~LB_D4_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D4 vblank\n");
@@ -2379,6 +2383,7 @@ restart_ih:
case 0: /* D5 vblank */
if (disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 4);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int_cont4 &= 
~LB_D5_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D5 vblank\n");
@@ -2400,6 +2405,7 @@ restart_ih:
case 0: /* D6 vblank */
if (disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev->ddev, 5);
+   rdev->pm.vblank_sync = true;
wake_up(>irq.vblank_queue);
disp_int_cont5 &= 
~LB_D6_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D6 vblank\n");
-- 
1.7.1.1



[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #50 from Tom Stellard  2010-10-28 18:37:32 
PDT ---
In radeon_optimize.c starting at line 660, there are three optimization
functions: constant_folding, peephole, and copy_propagate.  You could try
commenting these out one at a time to see which one is causing the problem. 
Note: when you comment out the peephole function make sure to comment out the
continue statement below it, like this:

//if(peephole(c, cur))
// continue;

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


[Bug 31193] [regression] aa43176e break water reflections

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31193

--- Comment #1 from Tom Stellard  2010-10-28 18:19:59 
PDT ---
Hi, can you post the output of RADEON_DEBUG=fp,pstat with commit
aa43176ebd26227947b07221f4e475c52bd7a76b and also with the commit right before
that one?

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


[Bug 31046] [r600g, tiling] visual errors and GPU resets

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31046

--- Comment #4 from Tobias Jakobi  2010-10-28 16:49:17 
PDT ---
OK, so I just found some time to retest the issues.

Again mesa, libdrm and xf86-video-ati are git master. I'm also using drm-next
(not drm-r-t) this time, since it looks like it's more up to date.

However with this config mipmapping seems to be broken in all configs. I have
mipmap render errors (which disappear in quake-engine based games when setting
gl_texturemode to either GL_NEAREST or GL_LINEAR) with r600 classic and
gallium, doesn't matter what I choose.

R600_FORCE_TILING introduced even more errors, so I switched it off again right
away. But the problems with mipmaps stay.

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


[PATCH] DRM: ignore invalid EDID extensions

2010-10-28 Thread Marius Gröger
On 28.10.2010 11:12, wrote sam tygier:
> Without this patch i get no display (X or VT) on myEIZO S2242W monitor
> when using KMS
>
> This was discussed back in september, this is the second version of the
> patch based on ajax's comments. i have opened a bug for the issue:
> https://bugs.freedesktop.org/show_bug.cgi?id=31154

Might this even be a cure for the bug in recent drm that ignores all 
50Hz modes? The patch looks like that--without it--there isn't even an 
error displayed upon hitting a bad EDID record. I'm sorry I can't try 
this out at the moment though.

Regards,
Marius



[Bug 31154] EIZO S2242W has invalid extension block, no display

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31154

--- Comment #3 from sam tygier  2010-10-28 15:36:56 
PDT ---
tested with fresh torvalds/linux-2.6.git kernel,
81280572ca6f54009edfa4deee563e8678784218

the issue is still present, and the patch still applies cleanly and fixes it.

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


-tip: origin tree build failure (Was: [git pull] drm tree for merge window)

2010-10-28 Thread Ingo Molnar

* Dave Airlie  wrote:

> > Lee, Chun-Yi (1):
> >   gpu: Add Intel GMA500(Poulsbo) Stub Driver

Today's -tip fails to build due to upstream commit e26fd11 ("gpu: Add Intel 
GMA500(Poulsbo) Stub Driver"), committed two days ago and merged yesterday, on
x86 allmodconfig with BACKLIGHT_CLASS_DEVICE disabled:

 drivers/built-in.o: In function `acpi_video_bus_put_one_device':
 video.c:(.text+0x7d26f): undefined reference to `backlight_device_unregister'
 drivers/built-in.o: In function `acpi_video_switch_brightness':
 video.c:(.text+0x7d6f5): undefined reference to `backlight_force_update'
 drivers/built-in.o: In function `acpi_video_device_find_cap':
 video.c:(.text+0x7dfdb): undefined reference to `backlight_device_register'

drivers/gpu/stub/Kconfig selects ACPI_VIDEO, but ACPI_VIDEO is a complex 
interactive 
Kconfig option with a lot of dependencies:

 config ACPI_VIDEO
tristate "Video"
depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
depends on INPUT
select THERMAL
help
  This driver implements the ACPI Extensions For Display Adapters

and if any of its dependencies are not met, we get a build failure. This 
problem was 
apparently realized in the driver at a certain stage:

 config STUB_POULSBO
tristate "Intel GMA500 Stub Driver"
depends on PCI
# Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select ACPI_VIDEO if ACPI

but not fully understood and not fully fixed.

As a quick fix select these secondary dependencies, like 
drivers/gpu/drm/Kconfig 
does:

 config DRM_I915
tristate "i915 driver"
depends on AGP_INTEL
select SHMEM
select DRM_KMS_HELPER
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
# i915 depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select VIDEO_OUTPUT_CONTROL if ACPI
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
select ACPI_VIDEO if ACPI
select ACPI_BUTTON if ACPI
help
  Choose this option if you have a system that has Intel 830M, 845G,
  852GM, 855GM 865G or 915G integrated graphics.  If M is selected, the

But it's arguably not particularly nice looking, so maybe this area of code is 
ripe 
for a Kconfig restructuring/cleanup.

Signed-off-by: Ingo Molnar 
---
 drivers/gpu/stub/Kconfig |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/stub/Kconfig b/drivers/gpu/stub/Kconfig
index 742c423..0e1edd7 100644
--- a/drivers/gpu/stub/Kconfig
+++ b/drivers/gpu/stub/Kconfig
@@ -3,6 +3,9 @@ config STUB_POULSBO
depends on PCI
# Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+   select VIDEO_OUTPUT_CONTROL if ACPI
+   select BACKLIGHT_CLASS_DEVICE if ACPI
+   select INPUT if ACPI
select ACPI_VIDEO if ACPI
help
  Choose this option if you have a system that has Intel GMA500


[Bug 30009] [r300g] radeon: The kernel rejected CS

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30009

--- Comment #12 from Gerwin  2010-10-28 12:22:19 
PDT ---
I had this bug in nexuiz too, but not anymore with the v2.6.36-rc8-maverick
kernel.

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


[Bug 31037] [r300g] Unwanted checkerboard effect on sprites / textures

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31037

Gerwin  changed:

   What|Removed |Added

Summary|[r300g] Checkerboard effect |[r300g] Unwanted
   |on sprites / textures   |checkerboard effect on
   ||sprites / textures

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


[Bug 30167] Heroes of Newerth: Setting shader quality to medium results in corrupt rendering

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30167

--- Comment #14 from Sven Arvidsson  2010-10-28 12:11:11 PDT ---
(In reply to comment #13)
> Can you try this again with the latest version of mesa from git?

No change I'm afraid.

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #49 from Pavel Ondra?ka  2010-10-28 12:03:21 
PDT ---
(In reply to comment #48)
> If you disable the register allocation, you must enable the dumb register
> allocation instead. Otherwise nearly nothing will work.

Thanks, this did the trick, however bug is still present as expected.

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #48 from Marek Ol??k  2010-10-28 11:39:17 PDT 
---
If you disable the register allocation, you must enable the dumb register
allocation instead. Otherwise nearly nothing will work.

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


-tip: origin tree build failure (Was: [git pull] drm tree for merge window)

2010-10-28 Thread Phil Turmel
On 10/28/2010 09:12 AM, Ingo Molnar wrote:
> 
> * Dave Airlie  wrote:
> 
>>> Lee, Chun-Yi (1):
>>>   gpu: Add Intel GMA500(Poulsbo) Stub Driver
> 
> Today's -tip fails to build due to upstream commit e26fd11 ("gpu: Add Intel 
> GMA500(Poulsbo) Stub Driver"), committed two days ago and merged yesterday, on
> x86 allmodconfig with BACKLIGHT_CLASS_DEVICE disabled:
> 
>  drivers/built-in.o: In function `acpi_video_bus_put_one_device':
>  video.c:(.text+0x7d26f): undefined reference to `backlight_device_unregister'
>  drivers/built-in.o: In function `acpi_video_switch_brightness':
>  video.c:(.text+0x7d6f5): undefined reference to `backlight_force_update'
>  drivers/built-in.o: In function `acpi_video_device_find_cap':
>  video.c:(.text+0x7dfdb): undefined reference to `backlight_device_register'
> 
> drivers/gpu/stub/Kconfig selects ACPI_VIDEO, but ACPI_VIDEO is a complex 
> interactive 
> Kconfig option with a lot of dependencies:
> 
>  config ACPI_VIDEO
>   tristate "Video"
>   depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
>   depends on INPUT
>   select THERMAL
>   help
> This driver implements the ACPI Extensions For Display Adapters
> 
> and if any of its dependencies are not met, we get a build failure. This 
> problem was 
> apparently realized in the driver at a certain stage:
> 
>  config STUB_POULSBO
> tristate "Intel GMA500 Stub Driver"
> depends on PCI
> # Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
> # but for select to work, need to select ACPI_VIDEO's dependencies, 
> ick
> select ACPI_VIDEO if ACPI
> 
> but not fully understood and not fully fixed.

I submitted a nouveau patch that does this as well.  Part of the same merge.  I 
was
copying from the Intel driver but didn't catch the comment on the dependencies.

(Added Francisco to the CC: list)

> As a quick fix select these secondary dependencies, like 
> drivers/gpu/drm/Kconfig 
> does:
> 
>  config DRM_I915
>   tristate "i915 driver"
>   depends on AGP_INTEL
>   select SHMEM
>   select DRM_KMS_HELPER
>   select FB_CFB_FILLRECT
>   select FB_CFB_COPYAREA
>   select FB_CFB_IMAGEBLIT
>   # i915 depends on ACPI_VIDEO when ACPI is enabled
>   # but for select to work, need to select ACPI_VIDEO's dependencies, ick
>   select VIDEO_OUTPUT_CONTROL if ACPI
>   select BACKLIGHT_CLASS_DEVICE if ACPI
>   select INPUT if ACPI
>   select ACPI_VIDEO if ACPI
>   select ACPI_BUTTON if ACPI
>   help
> Choose this option if you have a system that has Intel 830M, 845G,
> 852GM, 855GM 865G or 915G integrated graphics.  If M is selected, the
> 
> But it's arguably not particularly nice looking, so maybe this area of code 
> is ripe 
> for a Kconfig restructuring/cleanup.

I have no idea what such a cleanup would look like, but I'm guessing the 
following is
needed for nouveau in the meantime:

Signed-off-by: Philip J. Turmel 
---

The build fix for nouveau's use of acpi_video_get_edid omitted the
dependencies of ACPI_VIDEO.

diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 72730e9..c33ecb6 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -11,6 +11,9 @@ config DRM_NOUVEAU
select FRAMEBUFFER_CONSOLE if !EMBEDDED
select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
select ACPI_VIDEO if ACPI
+   select VIDEO_OUTPUT_CONTROL if ACPI
+   select BACKLIGHT_CLASS_DEVICE if ACPI
+   select INPUT if ACPI
help
  Choose this option for open-source nVidia support.



[Bug 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30011

--- Comment #6 from Marek Ol??k  2010-10-28 11:32:07 PDT 
---
Could you please bisect what fixed it so that we can commit the fix to 7.9 as
well?

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #47 from Pavel Ondra?ka  2010-10-28 11:32:04 
PDT ---
(In reply to comment #46)
> In src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.c around line 120, there 
> is
> a list of compiler passes.  Three of these passes(deadcode, dataflow optimize,
> and register allocation) are disabled when running with RADEON_DEBUG=noopt. 
> You could try commenting out these passes one a time to see which one is
> causing the bug.  When you are testing this way _don't_ use RADEON_DEBUG=noopt

deadcode pass commented out - no change
dataflow optimize pass commented out - shadows are ok
register allocation commented out - corruption everywhere (are you sure this is
disabled with RADEON_DEBUG=noopt?)

So it looks like the bug is caused by dataflow optimize pass.

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


[Bug 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30011

Rub?n Fern?ndez  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Rub?n Fern?ndez  2010-10-28 
11:02:32 PDT ---
(In reply to comment #4)
> Is this still an issue in Mesa 7.9 or the latest version from git?

In 7.9, yes; but, I just checked the latest git, and the issue seems solved
there.
All the failing applications now run (or fail for entirely different reasons)

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #46 from Tom Stellard  2010-10-28 10:42:30 
PDT ---
In src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.c around line 120, there is
a list of compiler passes.  Three of these passes(deadcode, dataflow optimize,
and register allocation) are disabled when running with RADEON_DEBUG=noopt. 
You could try commenting out these passes one a time to see which one is
causing the bug.  When you are testing this way _don't_ use RADEON_DEBUG=noopt

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


[PATCH] DRM: ignore invalid EDID extensions

2010-10-28 Thread sam tygier
Without this patch i get no display (X or VT) on myEIZO S2242W monitor when 
using KMS

This was discussed back in september, this is the second version of the patch 
based on ajax's comments. i have opened a bug for the issue:
https://bugs.freedesktop.org/show_bug.cgi?id=31154

Thanks

Sam

---

 From 33d4041a583c417c00f71a5453fed6cff5278de5 Mon Sep 17 00:00:00 2001
From: Sam Tygier 
Date: Thu, 23 Sep 2010 10:11:01 +0100
Subject: [PATCH] DRM: ignore invalid EDID extensions

Currently an invalid EDID extension will cause the whole EDID to be considered 
invalid. Instead just drop the invalid extensions, and return the valid ones. 
The base block is modified to claim to have the number valid extensions, and 
the check sum is updated.

For my EIZO S2242W the base block is fine, but the extension block is all 
zeros. Without this patch I get no X and no VTs.

  Signed-off-by: Sam Tygier 

---
  drivers/gpu/drm/drm_edid.c |   26 --
  1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 96e9631..2e208fa 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -241,7 +241,7 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned 
char *buf,
  .addr= DDC_ADDR,
  .flags= I2C_M_RD,
  .len= len,
-.buf= buf + start,
+.buf= buf,
  }
  };

@@ -254,7 +254,7 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned 
char *buf,
  static u8 *
  drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
  {
-int i, j = 0;
+int i, j = 0, valid_extensions = 0;
  u8 *block, *new;

  if ((block = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL)
@@ -281,14 +281,28 @@ drm_do_get_edid(struct drm_connector *connector, struct 
i2c_adapter *adapter)

  for (j = 1; j <= block[0x7e]; j++) {
  for (i = 0; i < 4; i++) {
-if (drm_do_probe_ddc_edid(adapter, block, j,
-  EDID_LENGTH))
+if (drm_do_probe_ddc_edid(adapter,
+  block + (valid_extensions + 1) * EDID_LENGTH,
+  j, EDID_LENGTH))
  goto out;
-if (drm_edid_block_valid(block + j * EDID_LENGTH))
+if (drm_edid_block_valid(block + (valid_extensions + 1) * 
EDID_LENGTH)) {
+valid_extensions++;
  break;
+}
  }
  if (i == 4)
-goto carp;
+dev_warn(connector->dev->dev,
+ "%s: Ignoring invalid EDID block %d.\n",
+ drm_get_connector_name(connector), j);
+}
+
+if (valid_extensions != block[0x7e]) {
+block[EDID_LENGTH-1] += block[0x7e] - valid_extensions;
+block[0x7e] = valid_extensions;
+new = krealloc(block, (valid_extensions + 1) * EDID_LENGTH, 
GFP_KERNEL);
+if (!new)
+goto out;
+block = new;
  }

  return block;
-- 
1.7.1


[Bug 31052] drm radeon modesetting enabled hits Linux kernel BUG null pointer

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31052

Chris  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Chris  2010-10-28 09:09:40 PDT ---
I can now enable KMS mode with the newest git tree from Linux 2.6 Linus, so
seems it was fixed somewhere between 2.6.36 and the current Linux git tree.

`

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


[Bug 31193] New: [regression] aa43176e break water reflections

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31193

   Summary: [regression] aa43176e break water reflections
   Product: Mesa
   Version: git
  Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Drivers/Gallium/r300
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: fabio.ped at libero.it


After aa43176ebd26227947b07221f4e475c52bd7a76b water reflections are broken in
0ad game: water is simply rendered white.

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


[git pull] drm fixes

2010-10-28 Thread Dave Airlie

Just three fixes from Alex for radeon kms issues, one longstanding bug on 
r200 cards since kms came about.

Dave.

The following changes since commit 135cba0dc399fdd47bd3ae305c1db75fcd77243f:

  vmwgfx: Implement a proper GMR eviction mechanism (2010-10-27 11:07:46 +1000)

are available in the git repository at:
  ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git 
drm-core-next

Alex Deucher (3):
  drm/radeon/kms: fix handling of tex lookup disable in cs checker on r2xx
  drm/radeon/kms: fix tiled db height calculation on 6xx/7xx
  drm/radeon/kms: enable unmappable vram for evergreen

 drivers/gpu/drm/radeon/evergreen_blit_kms.c |2 ++
 drivers/gpu/drm/radeon/r100.c   |3 +++
 drivers/gpu/drm/radeon/r100_track.h |1 +
 drivers/gpu/drm/radeon/r200.c   |2 ++
 drivers/gpu/drm/radeon/r600_cs.c|   14 --
 drivers/gpu/drm/radeon/radeon_reg.h |1 +
 6 files changed, 17 insertions(+), 6 deletions(-)


[Bug 29726] New CRTC ID query breaks Radeon DRM in Zaphod mode

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=29726

James Le Cuirot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #11 from James Le Cuirot  2010-10-28 
03:25:08 PDT ---
(In reply to comment #9)
> should be fixed on master DDX now.

I patched against 6.13.2 and it works great now. Thanks, Dave. :)

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #45 from Pavel Ondra?ka  2010-10-28 02:52:38 
PDT ---
(In reply to comment #44)
> Can you try again with the latest version of mesa from git?

No visible change with latest mesa from git.

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


[Bug 27744] atombios stuck in loop - during suspend

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=27744

--- Comment #37 from Tobias Kaminsky  2010-10-28 
00:54:30 PDT ---
(In reply to comment #33)
> Kernel: 2.6.36
> 
> $dmesg |grep atom
> [3.186893] ATOM BIOS: Sony
> [ 5155.577112] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than
> 5secs aborting
> [ 5155.577115] [drm:atom_execute_table_locked] *ERROR* atombios stuck 
> executing
> CD14 (len 67, WS 0, PS 0) @ 0xCD43
> 
> Right after booting the scrolling is smooth, but after hibernate to ram it is
> not.
> Sometimes it evens hangs while scrolling in Firefox...
> 
> 01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Redwood [Radeon
> HD 5600 Series] [1002:68c1]
> 
> xorg-server: 1.7.7
> 
> Should I try a newer one?
> 
> Thank you
> Tobias

Trying xorg-server 1.9.1 and xf86-video-ati from SVN lets me scroll smoothly in
X.
But I get several Segmentation faults while using it.

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


[Bug 30009] [r300g] radeon: The kernel rejected CS

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30009

--- Comment #11 from Tom Stellard  2010-10-28 00:50:05 
PDT ---
Is this still an issue in mesa 7.9 or the latest version from git?

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


[Bug 31152] Please backport r200 fix to r100 and r300c

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31152

--- Comment #2 from Fabio Pedretti  2010-10-28 00:49:35 
PDT ---
I can say that r300c is still crashing when resizing glxgears:

drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See
dmesg for more info.

[ 3429.186630] [drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for z
buffer (need 1053440 have 389120) !
[ 3429.186642] [drm:r100_cs_track_check] *ERROR* [drm] zbuffer (320 4 0 823)
[ 3429.186647] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

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


[Bug 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30011

--- Comment #4 from Tom Stellard  2010-10-28 00:47:26 
PDT ---
Is this still an issue in Mesa 7.9 or the latest version from git?

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


[Bug 30167] Heroes of Newerth: Setting shader quality to medium results in corrupt rendering

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30167

--- Comment #13 from Tom Stellard  2010-10-28 00:00:34 
PDT ---
Can you try this again with the latest version of mesa from git?

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


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #44 from Tom Stellard  2010-10-27 23:56:00 
PDT ---
Can you try again with the latest version of mesa from git?

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


[Bug 30761] White textures on people in sauerbraten

2010-10-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=30761

--- Comment #9 from Tom Stellard  2010-10-27 23:47:37 
PDT ---
Can you try the latest version of mesa from git?

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


[patch] i915: fix impossible BUG_ON() test

2010-10-28 Thread Dan Carpenter
obj_priv->pin_count is unsigned so the BUG_ON(obj_priv->pin_count < 0)
will never trigger.

Signed-off-by: Dan Carpenter 

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8eb8453..151d9c8 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4082,10 +4082,11 @@ i915_gem_object_unpin(struct drm_gem_object *obj)
struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);

WARN_ON(i915_verify_lists(dev));
-   obj_priv->pin_count--;
-   BUG_ON(obj_priv->pin_count < 0);
+   BUG_ON(obj_priv->pin_count == 0);
BUG_ON(obj_priv->gtt_space == NULL);

+   obj_priv->pin_count--;
+
/* If the object is no longer pinned, and is
 * neither active nor being flushed, then stick it on
 * the inactive list


[patch] i915: signedness bug in check_overlay_src()

2010-10-28 Thread Dan Carpenter
"depth" should be signed in case packed_depth_bytes() returns -EINVAL.

This probably doesn't make a difference at runtime.  In the original
code we would return -EINVAL later if (rec->offset_Y % 4294967274) is
non-zero.

Signed-off-by: Dan Carpenter 

diff --git a/drivers/gpu/drm/i915/intel_overlay.c 
b/drivers/gpu/drm/i915/intel_overlay.c
index afb96d2..02ff0a4 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -946,7 +946,9 @@ static int check_overlay_src(struct drm_device *dev,
 {
int uv_hscale = uv_hsubsampling(rec->flags);
int uv_vscale = uv_vsubsampling(rec->flags);
-   u32 stride_mask, depth, tmp;
+   u32 stride_mask;
+   int depth;
+   u32 tmp;

/* check src dimensions */
if (IS_845G(dev) || IS_I830(dev)) {


[Bug 30761] White textures on people in sauerbraten

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30761

--- Comment #9 from Tom Stellard tstel...@gmail.com 2010-10-27 23:47:37 PDT 
---
Can you try the latest version of mesa from git?

-- 
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 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #44 from Tom Stellard tstel...@gmail.com 2010-10-27 23:56:00 PDT 
---
Can you try again with the latest version of mesa from git?

-- 
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 30167] Heroes of Newerth: Setting shader quality to medium results in corrupt rendering

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30167

--- Comment #13 from Tom Stellard tstel...@gmail.com 2010-10-28 00:00:34 PDT 
---
Can you try this again with the latest version of mesa from git?

-- 
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 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30011

--- Comment #4 from Tom Stellard tstel...@gmail.com 2010-10-28 00:47:26 PDT 
---
Is this still an issue in Mesa 7.9 or the latest version from git?

-- 
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 31152] Please backport r200 fix to r100 and r300c

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31152

--- Comment #2 from Fabio Pedretti fabio@libero.it 2010-10-28 00:49:35 
PDT ---
I can say that r300c is still crashing when resizing glxgears:

drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See
dmesg for more info.

[ 3429.186630] [drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for z
buffer (need 1053440 have 389120) !
[ 3429.186642] [drm:r100_cs_track_check] *ERROR* [drm] zbuffer (320 4 0 823)
[ 3429.186647] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

-- 
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 30009] [r300g] radeon: The kernel rejected CS

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30009

--- Comment #11 from Tom Stellard tstel...@gmail.com 2010-10-28 00:50:05 PDT 
---
Is this still an issue in mesa 7.9 or the latest version from git?

-- 
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 27744] atombios stuck in loop - during suspend

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27744

--- Comment #37 from Tobias Kaminsky tob...@kaminsky.me 2010-10-28 00:54:30 
PDT ---
(In reply to comment #33)
 Kernel: 2.6.36
 
 $dmesg |grep atom
 [3.186893] ATOM BIOS: Sony
 [ 5155.577112] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than
 5secs aborting
 [ 5155.577115] [drm:atom_execute_table_locked] *ERROR* atombios stuck 
 executing
 CD14 (len 67, WS 0, PS 0) @ 0xCD43
 
 Right after booting the scrolling is smooth, but after hibernate to ram it is
 not.
 Sometimes it evens hangs while scrolling in Firefox...
 
 01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Redwood [Radeon
 HD 5600 Series] [1002:68c1]
 
 xorg-server: 1.7.7
 
 Should I try a newer one?
 
 Thank you
 Tobias

Trying xorg-server 1.9.1 and xf86-video-ati from SVN lets me scroll smoothly in
X.
But I get several Segmentation faults while using it.

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


[PATCH] DRM: ignore invalid EDID extensions

2010-10-28 Thread sam tygier

Without this patch i get no display (X or VT) on myEIZO S2242W monitor when 
using KMS

This was discussed back in september, this is the second version of the patch 
based on ajax's comments. i have opened a bug for the issue:
https://bugs.freedesktop.org/show_bug.cgi?id=31154

Thanks

Sam

---

From 33d4041a583c417c00f71a5453fed6cff5278de5 Mon Sep 17 00:00:00 2001
From: Sam Tygier samtyg...@yahoo.co.uk
Date: Thu, 23 Sep 2010 10:11:01 +0100
Subject: [PATCH] DRM: ignore invalid EDID extensions

Currently an invalid EDID extension will cause the whole EDID to be considered 
invalid. Instead just drop the invalid extensions, and return the valid ones. 
The base block is modified to claim to have the number valid extensions, and 
the check sum is updated.

For my EIZO S2242W the base block is fine, but the extension block is all 
zeros. Without this patch I get no X and no VTs.

 Signed-off-by: Sam Tygier samtyg...@yahoo.co.uk

---
 drivers/gpu/drm/drm_edid.c |   26 --
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 96e9631..2e208fa 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -241,7 +241,7 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned 
char *buf,
 .addr= DDC_ADDR,
 .flags= I2C_M_RD,
 .len= len,
-.buf= buf + start,
+.buf= buf,
 }
 };
 
@@ -254,7 +254,7 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,

 static u8 *
 drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
 {
-int i, j = 0;
+int i, j = 0, valid_extensions = 0;
 u8 *block, *new;
 
 if ((block = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL)

@@ -281,14 +281,28 @@ drm_do_get_edid(struct drm_connector *connector, struct 
i2c_adapter *adapter)
 
 for (j = 1; j = block[0x7e]; j++) {

 for (i = 0; i  4; i++) {
-if (drm_do_probe_ddc_edid(adapter, block, j,
-  EDID_LENGTH))
+if (drm_do_probe_ddc_edid(adapter,
+  block + (valid_extensions + 1) * EDID_LENGTH,
+  j, EDID_LENGTH))
 goto out;
-if (drm_edid_block_valid(block + j * EDID_LENGTH))
+if (drm_edid_block_valid(block + (valid_extensions + 1) * 
EDID_LENGTH)) {
+valid_extensions++;
 break;
+}
 }
 if (i == 4)
-goto carp;
+dev_warn(connector-dev-dev,
+ %s: Ignoring invalid EDID block %d.\n,
+ drm_get_connector_name(connector), j);
+}
+
+if (valid_extensions != block[0x7e]) {
+block[EDID_LENGTH-1] += block[0x7e] - valid_extensions;
+block[0x7e] = valid_extensions;
+new = krealloc(block, (valid_extensions + 1) * EDID_LENGTH, 
GFP_KERNEL);
+if (!new)
+goto out;
+block = new;
 }
 
 return block;

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


[Bug 31193] New: [regression] aa43176e break water reflections

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31193

   Summary: [regression] aa43176e break water reflections
   Product: Mesa
   Version: git
  Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Drivers/Gallium/r300
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: fabio@libero.it


After aa43176ebd26227947b07221f4e475c52bd7a76b water reflections are broken in
0ad game: water is simply rendered white.

-- 
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: [PATCH] DRM: ignore invalid EDID extensions

2010-10-28 Thread Marius Gröger

On 28.10.2010 11:12, wrote sam tygier:

Without this patch i get no display (X or VT) on myEIZO S2242W monitor
when using KMS

This was discussed back in september, this is the second version of the
patch based on ajax's comments. i have opened a bug for the issue:
https://bugs.freedesktop.org/show_bug.cgi?id=31154


Might this even be a cure for the bug in recent drm that ignores all 
50Hz modes? The patch looks like that--without it--there isn't even an 
error displayed upon hitting a bad EDID record. I'm sorry I can't try 
this out at the moment though.


Regards,
Marius

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


-tip: origin tree build failure (Was: [git pull] drm tree for merge window)

2010-10-28 Thread Ingo Molnar

* Dave Airlie airl...@linux.ie wrote:

  Lee, Chun-Yi (1):
gpu: Add Intel GMA500(Poulsbo) Stub Driver

Today's -tip fails to build due to upstream commit e26fd11 (gpu: Add Intel 
GMA500(Poulsbo) Stub Driver), committed two days ago and merged yesterday, on
x86 allmodconfig with BACKLIGHT_CLASS_DEVICE disabled:

 drivers/built-in.o: In function `acpi_video_bus_put_one_device':
 video.c:(.text+0x7d26f): undefined reference to `backlight_device_unregister'
 drivers/built-in.o: In function `acpi_video_switch_brightness':
 video.c:(.text+0x7d6f5): undefined reference to `backlight_force_update'
 drivers/built-in.o: In function `acpi_video_device_find_cap':
 video.c:(.text+0x7dfdb): undefined reference to `backlight_device_register'

drivers/gpu/stub/Kconfig selects ACPI_VIDEO, but ACPI_VIDEO is a complex 
interactive 
Kconfig option with a lot of dependencies:

 config ACPI_VIDEO
tristate Video
depends on X86  BACKLIGHT_CLASS_DEVICE  VIDEO_OUTPUT_CONTROL
depends on INPUT
select THERMAL
help
  This driver implements the ACPI Extensions For Display Adapters

and if any of its dependencies are not met, we get a build failure. This 
problem was 
apparently realized in the driver at a certain stage:

 config STUB_POULSBO
tristate Intel GMA500 Stub Driver
depends on PCI
# Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select ACPI_VIDEO if ACPI

but not fully understood and not fully fixed.

As a quick fix select these secondary dependencies, like 
drivers/gpu/drm/Kconfig 
does:

 config DRM_I915
tristate i915 driver
depends on AGP_INTEL
select SHMEM
select DRM_KMS_HELPER
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
# i915 depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select VIDEO_OUTPUT_CONTROL if ACPI
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
select ACPI_VIDEO if ACPI
select ACPI_BUTTON if ACPI
help
  Choose this option if you have a system that has Intel 830M, 845G,
  852GM, 855GM 865G or 915G integrated graphics.  If M is selected, the

But it's arguably not particularly nice looking, so maybe this area of code is 
ripe 
for a Kconfig restructuring/cleanup.

Signed-off-by: Ingo Molnar mi...@elte.hu
---
 drivers/gpu/stub/Kconfig |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/stub/Kconfig b/drivers/gpu/stub/Kconfig
index 742c423..0e1edd7 100644
--- a/drivers/gpu/stub/Kconfig
+++ b/drivers/gpu/stub/Kconfig
@@ -3,6 +3,9 @@ config STUB_POULSBO
depends on PCI
# Poulsbo stub depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+   select VIDEO_OUTPUT_CONTROL if ACPI
+   select BACKLIGHT_CLASS_DEVICE if ACPI
+   select INPUT if ACPI
select ACPI_VIDEO if ACPI
help
  Choose this option if you have a system that has Intel GMA500
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #46 from Tom Stellard tstel...@gmail.com 2010-10-28 10:42:30 PDT 
---
In src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.c around line 120, there is
a list of compiler passes.  Three of these passes(deadcode, dataflow optimize,
and register allocation) are disabled when running with RADEON_DEBUG=noopt. 
You could try commenting out these passes one a time to see which one is
causing the bug.  When you are testing this way _don't_ use RADEON_DEBUG=noopt

-- 
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 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30011

Rubén Fernández rubenf3...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Rubén Fernández rubenf3...@gmail.com 2010-10-28 11:02:32 
PDT ---
(In reply to comment #4)
 Is this still an issue in Mesa 7.9 or the latest version from git?

In 7.9, yes; but, I just checked the latest git, and the issue seems solved
there.
All the failing applications now run (or fail for entirely different reasons)

-- 
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 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #47 from Pavel Ondračka dra...@centrum.cz 2010-10-28 11:32:04 PDT 
---
(In reply to comment #46)
 In src/mesa/dri/drivers/r300/compiler/r3xx_fragprog.c around line 120, there 
 is
 a list of compiler passes.  Three of these passes(deadcode, dataflow optimize,
 and register allocation) are disabled when running with RADEON_DEBUG=noopt. 
 You could try commenting out these passes one a time to see which one is
 causing the bug.  When you are testing this way _don't_ use RADEON_DEBUG=noopt

deadcode pass commented out - no change
dataflow optimize pass commented out - shadows are ok
register allocation commented out - corruption everywhere (are you sure this is
disabled with RADEON_DEBUG=noopt?)

So it looks like the bug is caused by dataflow optimize pass.

-- 
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 30011] [r300g] several wine games crash with gallium

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30011

--- Comment #6 from Marek Olšák mar...@gmail.com 2010-10-28 11:32:07 PDT ---
Could you please bisect what fixed it so that we can commit the fix to 7.9 as
well?

-- 
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 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #48 from Marek Olšák mar...@gmail.com 2010-10-28 11:39:17 PDT ---
If you disable the register allocation, you must enable the dumb register
allocation instead. Otherwise nearly nothing will work.

-- 
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 30167] Heroes of Newerth: Setting shader quality to medium results in corrupt rendering

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30167

--- Comment #14 from Sven Arvidsson s...@whiz.se 2010-10-28 12:11:11 PDT ---
(In reply to comment #13)
 Can you try this again with the latest version of mesa from git?

No change I'm afraid.

-- 
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 31037] [r300g] Unwanted checkerboard effect on sprites / textures

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31037

Gerwin gerwin_kra...@hotmail.com changed:

   What|Removed |Added

Summary|[r300g] Checkerboard effect |[r300g] Unwanted
   |on sprites / textures   |checkerboard effect on
   ||sprites / textures

-- 
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 31154] EIZO S2242W has invalid extension block, no display

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31154

--- Comment #3 from sam tygier samtyg...@yahoo.co.uk 2010-10-28 15:36:56 PDT 
---
tested with fresh torvalds/linux-2.6.git kernel,
81280572ca6f54009edfa4deee563e8678784218

the issue is still present, and the patch still applies cleanly and fixes it.

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


[PATCH] drm/radeon/kms/evergreen: add missing pm.vblank_sync update in vbl handler

2010-10-28 Thread Alex Deucher
Should fix dynpm problems on evergreen boards

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/evergreen.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index f12a5b3..9947fd5 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2295,6 +2295,7 @@ restart_ih:
case 0: /* D1 vblank */
if (disp_int  LB_D1_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 0);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int = ~LB_D1_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D1 vblank\n);
@@ -2316,6 +2317,7 @@ restart_ih:
case 0: /* D2 vblank */
if (disp_int_cont  LB_D2_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 1);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int_cont = 
~LB_D2_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D2 vblank\n);
@@ -2337,6 +2339,7 @@ restart_ih:
case 0: /* D3 vblank */
if (disp_int_cont2  LB_D3_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 2);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int_cont2 = 
~LB_D3_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D3 vblank\n);
@@ -2358,6 +2361,7 @@ restart_ih:
case 0: /* D4 vblank */
if (disp_int_cont3  LB_D4_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 3);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int_cont3 = 
~LB_D4_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D4 vblank\n);
@@ -2379,6 +2383,7 @@ restart_ih:
case 0: /* D5 vblank */
if (disp_int_cont4  LB_D5_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 4);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int_cont4 = 
~LB_D5_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D5 vblank\n);
@@ -2400,6 +2405,7 @@ restart_ih:
case 0: /* D6 vblank */
if (disp_int_cont5  LB_D6_VBLANK_INTERRUPT) {
drm_handle_vblank(rdev-ddev, 5);
+   rdev-pm.vblank_sync = true;
wake_up(rdev-irq.vblank_queue);
disp_int_cont5 = 
~LB_D6_VBLANK_INTERRUPT;
DRM_DEBUG(IH: D6 vblank\n);
-- 
1.7.1.1

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


[RFC libdrm] Use __sync_val_compare_and_swap to implement DRM_CAS

2010-10-28 Thread Matt Turner
Can we use gcc's __sync_val_compare_and_swap to implement DRM_CAS?
(If so, do we actually need the __sync_val version, or can we use
__sync_bool?)

I just threw the patch together in two minutes, so I've got no idea
if it's right, just looking for feedback. The purpose of this is to
remove a lot of inline assembly that hasn't been touched since the
file was added in 2004, including some awesome already-assembled
SPARC instructions.

Apparently someone had this idea before me. Way before me, as this
code already exists in the Itanium section, though commented out for
some reason long forgotten.

I don't have any idea when gcc added this. I just said 4.0, but this
must be wrong, given the previous paragraph.

http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html
---
 xf86drm.h |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xf86drm.h b/xf86drm.h
index 9b89f56..1459b5a 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -333,7 +333,12 @@ typedef struct _drmSetVersion {
 #define DRM_LOCK_HELD  0x8000U /** Hardware lock is held */
 #define DRM_LOCK_CONT  0x4000U /** Hardware lock is contended */
 
-#if defined(__GNUC__)  (__GNUC__ = 2)
+#if defined(__GNUC__)  (__GNUC__ = 4)
+
+#define DRM_CAS(lock, old, new, __ret) \
+   __ret = __sync_val_compare_and_swap(i__drm_dummy_lock(lock), (old), 
(new)) != (old)
+
+#elif defined(__GNUC__)  (__GNUC__ = 2)
 # if defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || 
defined(__amd64__)
/* Reflect changes here to drmP.h */
 #define DRM_CAS(lock,old,new,__ret)\
-- 
1.7.2.2



pgpoLAVgZvRb4.pgp
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 31193] [regression] aa43176e break water reflections

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=31193

--- Comment #1 from Tom Stellard tstel...@gmail.com 2010-10-28 18:19:59 PDT 
---
Hi, can you post the output of RADEON_DEBUG=fp,pstat with commit
aa43176ebd26227947b07221f4e475c52bd7a76b and also with the commit right before
that one?

-- 
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 28294] [r300g] Unigine Sanctuary v2.2: black glitches

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=28294

--- Comment #50 from Tom Stellard tstel...@gmail.com 2010-10-28 18:37:32 PDT 
---
In radeon_optimize.c starting at line 660, there are three optimization
functions: constant_folding, peephole, and copy_propagate.  You could try
commenting these out one at a time to see which one is causing the problem. 
Note: when you comment out the peephole function make sure to comment out the
continue statement below it, like this:

//if(peephole(c, cur))
// continue;

-- 
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 13875] SiS DRI lacks WMB support on SPARC (MIPS and any other non-x86 architecture)

2010-10-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=13875

Matt Turner matts...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #6 from Matt Turner matts...@gmail.com 2010-10-28 19:05:53 PDT ---
Marking as WONTFIX. Feel free to reopen, but preferably, if you care, send a
patch.

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