[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

Dave Airlie  changed:

   What|Removed |Added

Product|freedesktop.org |Mesa
Version|unspecified |git
  Component|Mailing lists   |Drivers/DRI/r300
 AssignedTo|sitewranglers@lists.freedes |dri-devel@lists.freedesktop
   |ktop.org|.org

-- 
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 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #2 from Dave Airlie  2011-01-14 00:13:57 
PST ---
what GPU/driver is this? glxinfo output please.

-- 
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 33078] Sauerbraten refuses to start

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

--- Comment #1 from Michel Dänzer  2011-01-14 00:46:19 PST 
---
That does look like an SDL issue. What version of it are you using? Does
setting the environment variable SDL_VIDEO_X11_XRANDR=1 help?

-- 
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 32875] KWin 4.5.95 (KDE 4.6) draws blank windows when desktop effects are enabled.

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

Øyvind Sæther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Øyvind Sæther  2011-01-14 06:08:10 PST 
---
works for me. thanks.

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


i915: 2.6.36: Monitor incorrectly detects 1920x1199

2011-01-14 Thread Mario 'BitKoenig' Holbe
Hello,

starting with 2.6.36 my monitor detects a resolution of 1920x1199
instead of 1920x1200. The monitor displays 1920x1199 on its OSD, and as
a result, I guess, the display is blurred in the middle section (top to
down) - most likely due to stretching applied by the monitor.

This issue shows up when loading i915 (KMS enabled) with 2.6.37 and
2.6.36 (also 2.6.36.2). With 2.6.35 (up to 2.6.35.10) the monitor
correctly detects (and displays on OSD) 1920x1200 and doesn't blur
anything.

The Chipset is an Intel G35 on an Asus P5E-V HDMI, the monitor is a
Yuraku YV24WBH1 connected via DVI (DVI to HDMI adapter, the board
doesn't have a separate DVI port).

The `fbset' output with 2.6.37 and 2.6.35.10 doesn't differ:
mode "1920x1200"
geometry 1920 1200 1920 1200 32
timings 0 0 0 0 0 0 0
rgba 8/16,8/8,8/0,0/0
endmode

dmesg excerpt for 2.6.37:
[2.733019] efifb: probing for efifb
[2.744452] efifb: framebuffer at 0xd000, mapped to 0xf828, using 
7552k, total 7552k
[2.769712] efifb: mode is 1600x1200x32, linelength=6400, pages=1
[2.787964] efifb: scrolling: redraw
[2.798678] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[2.927422] fb0: EFI VGA frame buffer device
[   71.202957] [drm] Initialized drm 1.1.0 20060810
[   71.374419] i915 :00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   71.374423] i915 :00:02.0: setting latency timer to 64
[   71.474329] i915 :00:02.0: irq 44 for MSI/MSI-X
[   71.669097] [drm] initialized overlay support
[   71.942025] fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing 
generic driver
[   72.223827] fb0: inteldrmfb frame buffer device
[   72.223829] drm: registered panic notifier
[   72.223961] [drm] Initialized i915 1.6.0 20080730 for :00:02.0 on minor 0
[   87.492007] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.572007] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.652006] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.732007] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.812007] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.892007] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   87.972008] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   88.052006] [drm] GMBUS timed out, falling back to bit banging on pin 0 
[i915 gmbus disabled]
[   89.692006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   89.772006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   89.852006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   89.932007] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   90.012007] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   90.092006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   90.172006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]
[   90.252006] [drm] GMBUS timed out, falling back to bit banging on pin 6 
[i915 gmbus reserved]

dmesg excerpt for 2.6.35.10:
[3.401792] efifb: probing for efifb
[3.412804] efifb: framebuffer at 0xd000, mapped to 0xf828, using 
3072k, total 3072k
[3.438065] efifb: mode is 1024x768x32, linelength=4096, pages=1
[3.456058] efifb: scrolling: redraw
[3.466773] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[3.540728] fb0: EFI VGA frame buffer device
[   52.667436] [drm] Initialized drm 1.1.0 20060810
[   52.824746] i915 :00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   52.824750] i915 :00:02.0: setting latency timer to 64
[   52.901066] i915 :00:02.0: irq 47 for MSI/MSI-X
[   52.901076] [drm] set up 7M of stolen space
[   53.255059] [drm] initialized overlay support
[   53.806061] fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing 
generic driver
[   54.171524] fb0: inteldrmfb frame buffer device
[   54.171525] drm: registered panic notifier
[   54.171681] [drm] Initialized i915 1.6.0 20080730 for :00:02.0 on minor 0

The monitor's EDID information via `get-edid | parse-edid':
# EDID version 1 revision 3
Section "Monitor"
# Block type: 2:0 3:fc
Identifier "MB24W"
VendorName "NTS"
ModelName "MB24W"
# Block type: 2:0 3:fc
# Block type: 2:0 3:fd
HorizSync 30-74
VertRefresh 50-61
# Max dot clock (video bandwidth) 160 MHz
# Block type: 2:0 3:ff
# DPMS capabilities: Active off:yes  Suspend:no  Standby:no

 

[Bug 26562] [bisected] blank screen with radeon.modeset=1

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





--- Comment #7 from Sami Liedes   2011-01-14 16:00:20 ---
No, 2.6.37 + patch in comment #6 (alone) does not fix the issue for me.

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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
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


Re: [git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
P.S. My laptop: radeon 3470 works perfect.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [git pull] drm for rc1

2011-01-14 Thread James Simmons

On Thu, 13 Jan 2011, Anca Emanuel wrote:

> On Thu, Jan 13, 2011 at 7:55 PM, James Simmons  wrote:
> >
> >> > > With your patch, I can boot the system. But nouveau is not loaded.
> >> > > dmesg attached.
> >> > >
> >> >
> >> > Forget to mention: the revert makes first steps of boot look the same
> >> > (change the resolution of the text)
> >> > but with your patch, I see a big ugly ununtu logo, (I think that is
> >> > because nouveau is not loaded)
> >
> > Okay, can you do one more experiment for me. Since you already reverted
> > the patch to get it booting I like to ask you to add
> >
> > drm_fb_helper_fill_fix(info, fb_helper->fb);
> >
> > back into the drm_fb_helper_set_par function in drm_fb_helper.c. You have
> > something like this:
> >
> >        mutex_lock(&dev->mode_config.mutex);
> >        for (i = 0; i < fb_helper->crtc_count; i++) {
> >                crtc = fb_helper->crtc_info[i].mode_set.crtc;
> >                ret = 
> > crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
> >                if (ret) {
> >                        mutex_unlock(&dev->mode_config.mutex);
> >                        return ret;
> >                }
> >                drm_fb_helper_fill_fix(info, fb_helper->fb);
> >        }
> >        mutex_unlock(&dev->mode_config.mutex);
> >
> > Tell me if your system is still usable after that. Thanks for testing for
> > me.
> >
> 
> after
> 
> git revert dfe63bb0ad9810db13aab0058caba97866e0a681
> 
> and
> 
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 5c4f9b9..2aad663 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -816,6 +816,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
> mutex_unlock(&dev->mode_config.mutex);
> return ret;
> }
> +   drm_fb_helper_fill_fix(info, fb_helper->fb->pitch, 
> fb_helper->fb
> }
> mutex_unlock(&dev->mode_config.mutex);
> 
> I get an working system. ( the boot screen is not ok )
> Tested suspend/resume. Dmesg attached.

Just as I thought. Even this breaks the nouveau driver.

Could you now add also in the drm_fb_helper_fill_fix function

DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch, 
  fb_helper->fb->depth);
 
I have a feeling the values are not right. Thanks.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[radeon] radeon_kick_out_firmware_fb() can deref NULL

2011-01-14 Thread Sylvain 'ythier' Hitier
Hello,

In commit a56f7428d7534f162fbb089c5c79012bf38a7c29 [1], the result of
alloc_apertures() function call is used without checking for a possible NULL
result, which may happen, as seen in [2].

The latest commit [3] in the drm-fixes branch of the
linux/kernel/git/airlied/drm-2.6.git repo still has the issue.

[1] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=a56f7428d7534f162fbb089c5c79012bf38a7c29
[2] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;hb=refs/heads/drm-fixes;a=blob;f=include/linux/fb.h#l890
[3] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commit;h=d15eda5c6edff4987af6f4423af0bab0c3251e74

Regards,
Sylvain "ythier" Hitier

-- 
Free hugs for Free Software Fellows!
Living in a Debian package => http://en.wikipedia.org/wiki/Apt,_Vaucluse
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 6:38 PM, James Simmons  wrote:
>
> On Thu, 13 Jan 2011, Anca Emanuel wrote:
>
>> On Thu, Jan 13, 2011 at 7:55 PM, James Simmons  
>> wrote:
>> >
>> >> > > With your patch, I can boot the system. But nouveau is not loaded.
>> >> > > dmesg attached.
>> >> > >
>> >> >
>> >> > Forget to mention: the revert makes first steps of boot look the same
>> >> > (change the resolution of the text)
>> >> > but with your patch, I see a big ugly ununtu logo, (I think that is
>> >> > because nouveau is not loaded)
>> >
>> > Okay, can you do one more experiment for me. Since you already reverted
>> > the patch to get it booting I like to ask you to add
>> >
>> > drm_fb_helper_fill_fix(info, fb_helper->fb);
>> >
>> > back into the drm_fb_helper_set_par function in drm_fb_helper.c. You have
>> > something like this:
>> >
>> >        mutex_lock(&dev->mode_config.mutex);
>> >        for (i = 0; i < fb_helper->crtc_count; i++) {
>> >                crtc = fb_helper->crtc_info[i].mode_set.crtc;
>> >                ret = 
>> > crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
>> >                if (ret) {
>> >                        mutex_unlock(&dev->mode_config.mutex);
>> >                        return ret;
>> >                }
>> >                drm_fb_helper_fill_fix(info, fb_helper->fb);
>> >        }
>> >        mutex_unlock(&dev->mode_config.mutex);
>> >
>> > Tell me if your system is still usable after that. Thanks for testing for
>> > me.
>> >
>>
>> after
>>
>> git revert dfe63bb0ad9810db13aab0058caba97866e0a681
>>
>> and
>>
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c 
>> b/drivers/gpu/drm/drm_fb_helper.c
>> index 5c4f9b9..2aad663 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -816,6 +816,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
>>                         mutex_unlock(&dev->mode_config.mutex);
>>                         return ret;
>>                 }
>> +               drm_fb_helper_fill_fix(info, fb_helper->fb->pitch, 
>> fb_helper->fb
>>         }
>>         mutex_unlock(&dev->mode_config.mutex);
>>
>> I get an working system. ( the boot screen is not ok )
>> Tested suspend/resume. Dmesg attached.
>
> Just as I thought. Even this breaks the nouveau driver.
>
> Could you now add also in the drm_fb_helper_fill_fix function
>
> DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
>          fb_helper->fb->depth);
>
> I have a feeling the values are not right. Thanks.
>

Please make an patch to test.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [git pull] drm for rc1

2011-01-14 Thread James Simmons

> > Just as I thought. Even this breaks the nouveau driver.
> >
> > Could you now add also in the drm_fb_helper_fill_fix function
> >
> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
> >          fb_helper->fb->depth);
> >
> > I have a feeling the values are not right. Thanks.
> >
> 
> Please make an patch to test.

Done. I had to test the patch myself. No need to do a revert. Just apply 
this patch to linus tree. Then send the dmesg to me. Thanks.

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
 
 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
*fb_helper,
 
if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index a26d047..fe87319 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
info->screen_size = size;
 
+   drm_fb_helper_fill_fix(info, fb);
drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
sizes->fb_height);
 
/* Set aperture base/size for vesafb takeover */___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 8:26 PM, James Simmons  wrote:
>
>> > Just as I thought. Even this breaks the nouveau driver.
>> >
>> > Could you now add also in the drm_fb_helper_fill_fix function
>> >
>> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
>> >          fb_helper->fb->depth);
>> >
>> > I have a feeling the values are not right. Thanks.
>> >
>>
>> Please make an patch to test.
>
> Done. I had to test the patch myself. No need to do a revert. Just apply
> this patch to linus tree. Then send the dmesg to me. Thanks.
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 0307d60..beded14 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
>
>  void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
>  {
> +       DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
>        info->fix.type = FB_TYPE_PACKED_PIXELS;
>        info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
>                FB_VISUAL_TRUECOLOR;
> @@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
> *fb_helper,
>
>        if (new_fb) {
>                info->var.pixclock = 0;
> -               drm_fb_helper_fill_fix(info, fb_helper->fb);
>                if (register_framebuffer(info) < 0) {
>                        return -EINVAL;
>                }
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
> b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> index a26d047..fe87319 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> @@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
>        info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
>        info->screen_size = size;
>
> +       drm_fb_helper_fill_fix(info, fb);
>        drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
> sizes->fb_height);
>
>        /* Set aperture base/size for vesafb takeover */

I will test it, but first, I will need to disable the cassini driver,
because it can not compile.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33131] New: r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

   Summary: r600_asm.c:82: error:
‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’
undeclared
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: blocker
  Priority: highest
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: v...@vmware.com


mesa: 323ef3a1f07ba4333dadebab571ddcd49d95f45c (master)

$ scons
[...]
  Compiling src/gallium/drivers/r600/r600_asm.c ...
src/gallium/drivers/r600/r600_asm.c: In function ‘r600_bc_get_num_operands’:
src/gallium/drivers/r600/r600_asm.c:82: error:
‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared (first use in this
function)
src/gallium/drivers/r600/r600_asm.c:82: error: (Each undeclared identifier is
reported only once
src/gallium/drivers/r600/r600_asm.c:82: error: for each function it appears
in.)

-- 
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: [git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 8:40 PM, Anca Emanuel  wrote:
> On Fri, Jan 14, 2011 at 8:26 PM, James Simmons  wrote:
>>
>>> > Just as I thought. Even this breaks the nouveau driver.
>>> >
>>> > Could you now add also in the drm_fb_helper_fill_fix function
>>> >
>>> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
>>> >          fb_helper->fb->depth);
>>> >
>>> > I have a feeling the values are not right. Thanks.
>>> >
>>>
>>> Please make an patch to test.
>>
>> Done. I had to test the patch myself. No need to do a revert. Just apply
>> this patch to linus tree. Then send the dmesg to me. Thanks.
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c 
>> b/drivers/gpu/drm/drm_fb_helper.c
>> index 0307d60..beded14 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
>>
>>  void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer 
>> *fb)
>>  {
>> +       DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
>>        info->fix.type = FB_TYPE_PACKED_PIXELS;
>>        info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
>>                FB_VISUAL_TRUECOLOR;
>> @@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
>> *fb_helper,
>>
>>        if (new_fb) {
>>                info->var.pixclock = 0;
>> -               drm_fb_helper_fill_fix(info, fb_helper->fb);
>>                if (register_framebuffer(info) < 0) {
>>                        return -EINVAL;
>>                }
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
>> b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> index a26d047..fe87319 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> @@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
>>        info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
>>        info->screen_size = size;
>>
>> +       drm_fb_helper_fill_fix(info, fb);
>>        drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
>> sizes->fb_height);
>>
>>        /* Set aperture base/size for vesafb takeover */
>
> I will test it, but first, I will need to disable the cassini driver,
> because it can not compile.
>

I will test this first:

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);

 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_h

if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/n
index a26d047..3896771 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);

 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_h

if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 25597] SIGSEGV in _radeon_bo_unref

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

--- Comment #12 from David Ronis  2011-01-14 11:17:44 
PST ---
ping.

-- 
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 2/5] i915: Add native backlight control

2011-01-14 Thread Matthew Garrett
Not all systems expose a firmware or platform mechanism for changing the
backlight intensity on i915, so add native driver support.

Signed-off-by: Matthew Garrett 
Cc: intel-gfx 
---
 drivers/gpu/drm/i915/i915_drv.h   |4 ++
 drivers/gpu/drm/i915/intel_dp.c   |7 +++
 drivers/gpu/drm/i915/intel_drv.h  |3 +-
 drivers/gpu/drm/i915/intel_lvds.c |5 ++
 drivers/gpu/drm/i915/intel_opregion.c |1 -
 drivers/gpu/drm/i915/intel_panel.c|   72 -
 6 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 5969f46..2d6ef13 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /* General customization:
  */
@@ -667,6 +668,7 @@ typedef struct drm_i915_private {
int child_dev_num;
struct child_device_config *child_dev;
struct drm_connector *int_lvds_connector;
+   struct drm_connector *int_edp_connector;
 
bool mchbar_need_disable;
 
@@ -695,6 +697,8 @@ typedef struct drm_i915_private {
 
/* list of fbdev register on this device */
struct intel_fbdev *fbdev;
+
+   struct backlight_device *backlight;
 } drm_i915_private_t;
 
 struct drm_i915_gem_object {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 1f4242b..54e89e9 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1682,6 +1682,11 @@ done:
 static void
 intel_dp_destroy (struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
+
+   if (intel_dpd_is_edp(dev))
+   intel_panel_destroy_backlight(dev);
+
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(connector);
@@ -1911,6 +1916,8 @@ intel_dp_init(struct drm_device *dev, int output_reg)
DRM_MODE_TYPE_PREFERRED;
}
}
+   dev_priv->int_edp_connector = connector;
+   intel_panel_setup_backlight(dev);
}
 
intel_dp_add_properties(intel_dp, connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 74db255..074d41a 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -257,9 +257,10 @@ extern void intel_pch_panel_fitting(struct drm_device *dev,
 extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
 extern u32 intel_panel_get_backlight(struct drm_device *dev);
 extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
-extern void intel_panel_setup_backlight(struct drm_device *dev);
+extern int intel_panel_setup_backlight(struct drm_device *dev);
 extern void intel_panel_enable_backlight(struct drm_device *dev);
 extern void intel_panel_disable_backlight(struct drm_device *dev);
+extern void intel_panel_destroy_backlight(struct drm_device *dev);
 
 extern void intel_crtc_load_lut(struct drm_crtc *crtc);
 extern void intel_encoder_prepare (struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index ace8d5d..75f38c0 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -580,6 +580,8 @@ static void intel_lvds_destroy(struct drm_connector 
*connector)
struct drm_device *dev = connector->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
 
+   intel_panel_destroy_backlight(dev);
+
if (dev_priv->lid_notifier.notifier_call)
acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
drm_sysfs_connector_remove(connector);
@@ -1055,6 +1057,9 @@ out:
/* keep the LVDS connector */
dev_priv->int_lvds_connector = connector;
drm_sysfs_connector_add(connector);
+
+   intel_panel_setup_backlight(dev);
+
return true;
 
 failed:
diff --git a/drivers/gpu/drm/i915/intel_opregion.c 
b/drivers/gpu/drm/i915/intel_opregion.c
index f295a7a..5df3d38 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -224,7 +224,6 @@ void intel_opregion_asle_intr(struct drm_device *dev)
asle->aslc = asle_stat;
 }
 
-/* Only present on Ironlake+ */
 void intel_opregion_gse_intr(struct drm_device *dev)
 {
struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_panel.c 
b/drivers/gpu/drm/i915/intel_panel.c
index c65992d..4ab4239 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -274,10 +274,80 @@ void intel_panel_enable_backlight(struct drm_device *dev)
dev_priv->backlight_enabled = true;
 }
 
-void intel_panel_setup_backlight(struct drm_device *dev)
+void intel_panel_init_backlight(struct drm_device *dev)
 {
struct drm_i915_private *dev_priv = dev->dev_priva

[PATCH 1/5] Backlight: Add backlight type

2011-01-14 Thread Matthew Garrett
There may be multiple ways of controlling the backlight on a given machine.
Allow drivers to expose the type of interface they are providing, making
it possible for userspace to make appropriate policy decisions.

Signed-off-by: Matthew Garrett 
Cc: Richard Purdie 
Cc: intel-...@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
 Documentation/ABI/stable/sysfs-class-backlight |   20 
 drivers/acpi/video.c   |1 +
 drivers/gpu/drm/nouveau/nouveau_backlight.c|2 +
 drivers/hid/hid-picolcd.c  |1 +
 drivers/macintosh/via-pmu-backlight.c  |1 +
 drivers/platform/x86/acer-wmi.c|1 +
 drivers/platform/x86/asus-laptop.c |1 +
 drivers/platform/x86/asus_acpi.c   |1 +
 drivers/platform/x86/classmate-laptop.c|1 +
 drivers/platform/x86/compal-laptop.c   |1 +
 drivers/platform/x86/dell-laptop.c |1 +
 drivers/platform/x86/eeepc-laptop.c|1 +
 drivers/platform/x86/eeepc-wmi.c   |1 +
 drivers/platform/x86/fujitsu-laptop.c  |1 +
 drivers/platform/x86/msi-laptop.c  |1 +
 drivers/platform/x86/msi-wmi.c |1 +
 drivers/platform/x86/panasonic-laptop.c|1 +
 drivers/platform/x86/sony-laptop.c |1 +
 drivers/platform/x86/thinkpad_acpi.c   |1 +
 drivers/platform/x86/toshiba_acpi.c|1 +
 drivers/staging/olpc_dcon/olpc_dcon.c  |1 +
 drivers/staging/samsung-laptop/samsung-laptop.c|1 +
 drivers/usb/misc/appledisplay.c|1 +
 drivers/video/atmel_lcdfb.c|1 +
 drivers/video/aty/aty128fb.c   |1 +
 drivers/video/aty/atyfb_base.c |1 +
 drivers/video/aty/radeon_backlight.c   |1 +
 drivers/video/backlight/88pm860x_bl.c  |1 +
 drivers/video/backlight/adp5520_bl.c   |1 +
 drivers/video/backlight/adp8860_bl.c   |1 +
 drivers/video/backlight/adx_bl.c   |1 +
 drivers/video/backlight/atmel-pwm-bl.c |1 +
 drivers/video/backlight/backlight.c|   24 +++-
 drivers/video/backlight/corgi_lcd.c|1 +
 drivers/video/backlight/cr_bllcd.c |1 +
 drivers/video/backlight/da903x_bl.c|1 +
 drivers/video/backlight/ep93xx_bl.c|1 +
 drivers/video/backlight/generic_bl.c   |1 +
 drivers/video/backlight/hp680_bl.c |1 +
 drivers/video/backlight/jornada720_bl.c|1 +
 drivers/video/backlight/kb3886_bl.c|1 +
 drivers/video/backlight/locomolcd.c|1 +
 drivers/video/backlight/max8925_bl.c   |1 +
 drivers/video/backlight/mbp_nvidia_bl.c|1 +
 drivers/video/backlight/omap1_bl.c |1 +
 drivers/video/backlight/pcf50633-backlight.c   |1 +
 drivers/video/backlight/progear_bl.c   |1 +
 drivers/video/backlight/pwm_bl.c   |1 +
 drivers/video/backlight/s6e63m0.c  |1 +
 drivers/video/backlight/tosa_bl.c  |1 +
 drivers/video/backlight/wm831x_bl.c|1 +
 drivers/video/bf54x-lq043fb.c  |1 +
 drivers/video/bfin-t350mcqb-fb.c   |1 +
 drivers/video/imxfb.c  |1 +
 drivers/video/nvidia/nv_backlight.c|1 +
 drivers/video/omap2/displays/panel-acx565akm.c |1 +
 .../video/omap2/displays/panel-sharp-ls037v7dw01.c |1 +
 drivers/video/omap2/displays/panel-taal.c  |2 +
 drivers/video/riva/fbdev.c |1 +
 include/linux/backlight.h  |9 +++
 60 files changed, 111 insertions(+), 1 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-class-backlight 
b/Documentation/ABI/stable/sysfs-class-backlight
index 4d637e1..70302f3 100644
--- a/Documentation/ABI/stable/sysfs-class-backlight
+++ b/Documentation/ABI/stable/sysfs-class-backlight
@@ -34,3 +34,23 @@ Contact: Richard Purdie 
 Description:
Maximum brightness for .
 Users: HAL
+
+What:  /sys/class/backlight//type
+Date:  September 2010
+KernelVersion: 2.6.37
+Contact:   Matthew Garrett 
+Description:
+   The type of interface controlled by .
+   "firmware": The driver uses a standard firmware interface
+   "platform": The driver uses a platform-specific interface
+   "raw": The driver controls hardware registers directly
+
+   In the general case, when multiple backlight
+   interfaces are available for a singl

[PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Matthew Garrett
We may eventually end up with per-connector backlights, especially with
ddcci devices. Make sure that the parent node for the backlight device is
the connector rather than the PCI device.

Signed-off-by: Matthew Garrett 
---
 drivers/gpu/drm/nouveau/nouveau_backlight.c |   24 ++--
 drivers/gpu/drm/nouveau/nouveau_connector.c |9 +
 drivers/gpu/drm/nouveau/nouveau_drv.h   |8 
 drivers/gpu/drm/nouveau/nouveau_state.c |6 --
 4 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c 
b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 18d7bcc..00a55df 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -88,10 +88,11 @@ static const struct backlight_ops nv50_bl_ops = {
.update_status = nv50_set_intensity,
 };
 
-static int nouveau_nv40_backlight_init(struct drm_device *dev)
+static int nouveau_nv40_backlight_init(struct drm_connector *connector)
 {
-   struct backlight_properties props;
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
+   struct backlight_properties props;
struct backlight_device *bd;
 
if (!(nv_rd32(dev, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
@@ -100,7 +101,7 @@ static int nouveau_nv40_backlight_init(struct drm_device 
*dev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = 31;
-   bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
+   bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
   &nv40_bl_ops, &props);
if (IS_ERR(bd))
return PTR_ERR(bd);
@@ -112,10 +113,11 @@ static int nouveau_nv40_backlight_init(struct drm_device 
*dev)
return 0;
 }
 
-static int nouveau_nv50_backlight_init(struct drm_device *dev)
+static int nouveau_nv50_backlight_init(struct drm_connector *connector)
 {
-   struct backlight_properties props;
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
+   struct backlight_properties props;
struct backlight_device *bd;
 
if (!nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT))
@@ -124,7 +126,7 @@ static int nouveau_nv50_backlight_init(struct drm_device 
*dev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = 1025;
-   bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
+   bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
   &nv50_bl_ops, &props);
if (IS_ERR(bd))
return PTR_ERR(bd);
@@ -135,8 +137,9 @@ static int nouveau_nv50_backlight_init(struct drm_device 
*dev)
return 0;
 }
 
-int nouveau_backlight_init(struct drm_device *dev)
+int nouveau_backlight_init(struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
 
 #ifdef CONFIG_ACPI
@@ -149,9 +152,9 @@ int nouveau_backlight_init(struct drm_device *dev)
 
switch (dev_priv->card_type) {
case NV_40:
-   return nouveau_nv40_backlight_init(dev);
+   return nouveau_nv40_backlight_init(connector);
case NV_50:
-   return nouveau_nv50_backlight_init(dev);
+   return nouveau_nv50_backlight_init(connector);
default:
break;
}
@@ -159,8 +162,9 @@ int nouveau_backlight_init(struct drm_device *dev)
return 0;
 }
 
-void nouveau_backlight_exit(struct drm_device *dev)
+void nouveau_backlight_exit(struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
 
if (dev_priv->backlight) {
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index a21e000..3a1ecc7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -116,6 +116,10 @@ nouveau_connector_destroy(struct drm_connector *connector)
  nouveau_connector_hotplug, connector);
}
 
+   if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+   connector->connector_type == DRM_MODE_CONNECTOR_eDP)
+   nouveau_backlight_exit(connector);
+
kfree(nv_connector->edid);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
@@ -893,6 +897,11 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
 
drm_sysfs_connector_add(connector);
+
+   if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+   connector->connecto

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-01-14 Thread Matthew Garrett
Dual-GPU machines may provide more than one ACPI backlight interface. Tie
the backlight device to the GPU in order to allow userspace to identify
the correct interface.

Signed-off-by: Matthew Garrett 
---
 drivers/acpi/video.c |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index a9eec8c..a18e497 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -782,6 +782,9 @@ static void acpi_video_device_find_cap(struct 
acpi_video_device *device)
 
if (acpi_video_backlight_support()) {
struct backlight_properties props;
+   struct pci_dev *pdev;
+   acpi_handle acpi_parent;
+   struct device *parent = NULL;
int result;
static int count = 0;
char *name;
@@ -794,10 +797,20 @@ static void acpi_video_device_find_cap(struct 
acpi_video_device *device)
return;
count++;
 
+   acpi_get_parent(device->dev->handle, &acpi_parent);
+
+   pdev = acpi_get_pci_dev(acpi_parent);
+   if (pdev) {
+   parent = &pdev->dev;
+   pci_dev_put(pdev);
+   }
+
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_FIRMWARE;
props.max_brightness = device->brightness->count - 3;
-   device->backlight = backlight_device_register(name, NULL, 
device,
+   device->backlight = backlight_device_register(name,
+ parent,
+ device,
  
&acpi_backlight_ops,
  &props);
kfree(name);
-- 
1.7.3.4

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


[PATCH 3/5] radeon: Expose backlight class device for legacy LVDS encoder

2011-01-14 Thread Matthew Garrett
From: Michel Dänzer 

Allows e.g. power management daemons to control the backlight level. Inspired
by the corresponding code in radeonfb.

(Updated to add backlight type and make the connector the parent device - mjg)

Signed-off-by: Michel Dänzer 
Signed-off-by: Matthew Garrett 
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/radeon/Kconfig  |1 +
 drivers/gpu/drm/radeon/radeon_connectors.c  |   15 ++
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c |  257 ++-
 drivers/gpu/drm/radeon/radeon_mode.h|   10 +
 4 files changed, 277 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig
index 1c02d23..9746fee 100644
--- a/drivers/gpu/drm/radeon/Kconfig
+++ b/drivers/gpu/drm/radeon/Kconfig
@@ -1,6 +1,7 @@
 config DRM_RADEON_KMS
bool "Enable modesetting on radeon by default - NEW DRIVER"
depends on DRM_RADEON
+   select BACKLIGHT_CLASS_DEVICE
help
  Choose this option if you want kernel modesetting enabled by default.
 
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c 
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 22b7e3d..e842fb5 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -40,6 +40,10 @@ radeon_atombios_connected_scratch_regs(struct drm_connector 
*connector,
   struct drm_encoder *encoder,
   bool connected);
 
+extern void
+radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
+struct drm_connector *drm_connector);
+
 void radeon_connector_hotplug(struct drm_connector *connector)
 {
struct drm_device *dev = connector->dev;
@@ -1517,6 +1521,17 @@ radeon_add_legacy_connector(struct drm_device *dev,
connector->polled = DRM_CONNECTOR_POLL_HPD;
connector->display_info.subpixel_order = subpixel_order;
drm_sysfs_connector_add(connector);
+   if (connector_type == DRM_MODE_CONNECTOR_LVDS) {
+   struct drm_encoder *drm_encoder;
+
+   list_for_each_entry(drm_encoder, 
&dev->mode_config.encoder_list, head) {
+   struct radeon_encoder *radeon_encoder;
+
+   radeon_encoder = to_radeon_encoder(drm_encoder);
+   if (radeon_encoder->encoder_id == 
ENCODER_OBJECT_ID_INTERNAL_LVDS)
+   radeon_legacy_backlight_init(radeon_encoder, 
connector);
+   }
+   }
return;
 
 failed:
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c 
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 59f834b..ba7dcc6 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -28,6 +28,10 @@
 #include "radeon_drm.h"
 #include "radeon.h"
 #include "atom.h"
+#include 
+#ifdef CONFIG_PMAC_BACKLIGHT
+#include 
+#endif
 
 static void radeon_legacy_encoder_disable(struct drm_encoder *encoder)
 {
@@ -39,7 +43,7 @@ static void radeon_legacy_encoder_disable(struct drm_encoder 
*encoder)
radeon_encoder->active_device = 0;
 }
 
-static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
+static void radeon_legacy_lvds_update(struct drm_encoder *encoder, int mode)
 {
struct drm_device *dev = encoder->dev;
struct radeon_device *rdev = dev->dev_private;
@@ -47,15 +51,23 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder 
*encoder, int mode)
uint32_t lvds_gen_cntl, lvds_pll_cntl, pixclks_cntl, disp_pwr_man;
int panel_pwr_delay = 2000;
bool is_mac = false;
+   uint8_t backlight_level;
DRM_DEBUG_KMS("\n");
 
+   lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
+   backlight_level = (lvds_gen_cntl >> RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & 
0xff;
+
if (radeon_encoder->enc_priv) {
if (rdev->is_atom_bios) {
struct radeon_encoder_atom_dig *lvds = 
radeon_encoder->enc_priv;
panel_pwr_delay = lvds->panel_pwr_delay;
+   if (lvds->bl_dev)
+   backlight_level = lvds->backlight_level;
} else {
struct radeon_encoder_lvds *lvds = 
radeon_encoder->enc_priv;
panel_pwr_delay = lvds->panel_pwr_delay;
+   if (lvds->bl_dev)
+   backlight_level = lvds->backlight_level;
}
}
 
@@ -82,11 +94,13 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder 
*encoder, int mode)
lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET;
WREG32(RADEON_LVDS_PLL_CNTL, lvds_pll_cntl);
 
-   lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
-   lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_EN | 
RADEON_LVDS_DIGON | RADEON_LVDS_BLON);
+   lv

Re: [PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 9:24 PM, Matthew Garrett  wrote:
> We may eventually end up with per-connector backlights, especially with
> ddcci devices. Make sure that the parent node for the backlight device is
> the connector rather than the PCI device.
>
> Signed-off-by: Matthew Garrett 
> ---
>  drivers/gpu/drm/nouveau/nouveau_backlight.c |   24 ++--
>  drivers/gpu/drm/nouveau/nouveau_connector.c |    9 +
>  drivers/gpu/drm/nouveau/nouveau_drv.h       |    8 
>  drivers/gpu/drm/nouveau/nouveau_state.c     |    6 --
>  4 files changed, 27 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c 
> b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> index 18d7bcc..00a55df 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> @@ -88,10 +88,11 @@ static const struct backlight_ops nv50_bl_ops = {
>        .update_status = nv50_set_intensity,
>  };
>
> -static int nouveau_nv40_backlight_init(struct drm_device *dev)
> +static int nouveau_nv40_backlight_init(struct drm_connector *connector)
>  {
> -       struct backlight_properties props;
> +       struct drm_device *dev = connector->dev;
>        struct drm_nouveau_private *dev_priv = dev->dev_private;
> +       struct backlight_properties props;
>        struct backlight_device *bd;
>
>        if (!(nv_rd32(dev, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
> @@ -100,7 +101,7 @@ static int nouveau_nv40_backlight_init(struct drm_device 
> *dev)
>        memset(&props, 0, sizeof(struct backlight_properties));
>        props.type = BACKLIGHT_RAW;
>        props.max_brightness = 31;
> -       bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
> +       bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
>                                       &nv40_bl_ops, &props);
>        if (IS_ERR(bd))
>                return PTR_ERR(bd);
> @@ -112,10 +113,11 @@ static int nouveau_nv40_backlight_init(struct 
> drm_device *dev)
>        return 0;
>  }
>
> -static int nouveau_nv50_backlight_init(struct drm_device *dev)
> +static int nouveau_nv50_backlight_init(struct drm_connector *connector)
>  {
> -       struct backlight_properties props;
> +       struct drm_device *dev = connector->dev;
>        struct drm_nouveau_private *dev_priv = dev->dev_private;
> +       struct backlight_properties props;
>        struct backlight_device *bd;
>
>        if (!nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT))
> @@ -124,7 +126,7 @@ static int nouveau_nv50_backlight_init(struct drm_device 
> *dev)
>        memset(&props, 0, sizeof(struct backlight_properties));
>        props.type = BACKLIGHT_RAW;
>        props.max_brightness = 1025;
> -       bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
> +       bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
>                                       &nv50_bl_ops, &props);
>        if (IS_ERR(bd))
>                return PTR_ERR(bd);
> @@ -135,8 +137,9 @@ static int nouveau_nv50_backlight_init(struct drm_device 
> *dev)
>        return 0;
>  }
>
> -int nouveau_backlight_init(struct drm_device *dev)
> +int nouveau_backlight_init(struct drm_connector *connector)
>  {
> +       struct drm_device *dev = connector->dev;
>        struct drm_nouveau_private *dev_priv = dev->dev_private;
>
>  #ifdef CONFIG_ACPI
> @@ -149,9 +152,9 @@ int nouveau_backlight_init(struct drm_device *dev)
>
>        switch (dev_priv->card_type) {
>        case NV_40:
> -               return nouveau_nv40_backlight_init(dev);
> +               return nouveau_nv40_backlight_init(connector);
>        case NV_50:
> -               return nouveau_nv50_backlight_init(dev);
> +               return nouveau_nv50_backlight_init(connector);
>        default:
>                break;
>        }
> @@ -159,8 +162,9 @@ int nouveau_backlight_init(struct drm_device *dev)
>        return 0;
>  }
>
> -void nouveau_backlight_exit(struct drm_device *dev)
> +void nouveau_backlight_exit(struct drm_connector *connector)
>  {
> +       struct drm_device *dev = connector->dev;
>        struct drm_nouveau_private *dev_priv = dev->dev_private;
>
>        if (dev_priv->backlight) {
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
> b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index a21e000..3a1ecc7 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -116,6 +116,10 @@ nouveau_connector_destroy(struct drm_connector 
> *connector)
>                                      nouveau_connector_hotplug, connector);
>        }
>
> +       if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
> +           connector->connector_type == DRM_MODE_CONNECTOR_eDP)
> +               nouveau_backlight_exit(connector);
> +
>        kfree(nv_connector->edid);
>        drm_sysfs_connector_remove(connector);
>        drm_connector_cleanup(connector);
> 

Re: [PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Matthew Garrett
On Fri, Jan 14, 2011 at 09:30:19PM +0200, Anca Emanuel wrote:

> Hi Matthew Garrett,
> I have problems with nouveau.
> Do you know ?

Your best bet is to follow the instructions on 
http://nouveau.freedesktop.org/wiki/Bugs to report a bug.

-- 
Matthew Garrett | mj...@srcf.ucam.org
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #3 from Tobias Jakobi  2011-01-14 12:38:18 PST 
---
In case that this is with the r600 classic driver: Try using r600g, since it
solves a lot of the shadow volume rendering issues that the classic driver has.
IIRC some developer stated somewhere (I think a bugreport here on FDO) that it
isn't very likely that the shadow problems will get fixed with the classic
driver.

-- 
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 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #4 from barisu...@gmail.com 2011-01-14 13:20:04 PST ---
(In reply to comment #2)
> what GPU/driver is this? glxinfo output please.

The GPU is an R580, the card is an X1950XT 
Driver: r300g, gallium 0.4, mesa 7.10-devel, drm,radeon from git (xorg edgers)

glxinfo output follows:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
GLX_INTEL_swap_event
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI R580
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
GL_ARB_copy_buffer, GL_ARB_depth_texture, GL_ARB_draw_buffers, 
GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location, 
GL_ARB_fragment_coord_conventions, GL_ARB_fragment_program, 
GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, 
GL_ARB_framebuffer_object, GL_ARB_half_float_vertex, 
GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
GL_ARB_provoking_vertex, GL_ARB_shader_objects, 
GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_texture_border_clamp, 
GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_swizzle, 
GL_ARB_transpose_matrix, GL_ARB_vertex_array_bgra, 
GL_ARB_vertex_array_object, GL_ARB_vertex_buffer_object, 
GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos, 
GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
GL_EXT_compiled_vertex_array, GL_EXT_copy_texture, 
GL_EXT_draw_range_elements, GL_EXT_framebuffer_blit, 
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object, 
GL_EXT_fog_coord, GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels, 
GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
GL_EXT_secondary_color, GL_EXT_separate_shader_objects, 
GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, 
GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_subtexture, 
GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_compression_s3tc, 
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
GL_EXT_texture_swizzle, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, 
GL_ATI_blend_equation_separate, GL_ATI_texture_env_combine3, 
GL_ATI_texture_mirror_once, GL_ATI_separate_stencil, 
GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_MESA_window_pos, 
GL_NV_blend_square, GL_NV_conditional_render, GL_NV_light_max_exponent, 
GL_NV_packed_depth_s

[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #1 from Alex Deucher  2011-01-14 13:24:02 PST ---
Also, FWIW, none of the evergreen (and possibly some of the r7xx opcodes that
are different from r6xx) are covered in the code in question.

-- 
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 33078] Sauerbraten refuses to start

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

--- Comment #2 from barisu...@gmail.com 2011-01-14 13:25:05 PST ---
(In reply to comment #1)
> That does look like an SDL issue. What version of it are you using? Does
> setting the environment variable SDL_VIDEO_X11_XRANDR=1 help?

Nope.. the result is the same.

>From Xorg.1.log:

[12.618] (EE) open /dev/fb0: No such file or directory
[12.618] (EE) No devices detected.
[12.618] 
Fatal server error:
[12.618] no screens found
[12.618]

-- 
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 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #2 from Vinson Lee  2011-01-14 13:54:41 PST ---
I disabled the V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR case to work
around the current build failure.

Please revert this commit when appropriate.


commit 4c6d6dd8fc61239ac2008267f3c5cf76f4124d11
Author: Vinson Lee 
Date:   Fri Jan 14 13:47:37 2011 -0800

r600g: Disable V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR case.

The usage of macro V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR was
introduced by commit 323ef3a1f07ba4333dadebab571ddcd49d95f45c but the
macro is undefined. Disable this case to fix the build for now.

diff --git a/src/gallium/drivers/r600/r600_asm.c
b/src/gallium/drivers/r600/r600_asm.c
index 2d0d277..3430fbb 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -79,7 +79,9 @@ static inline unsigned int r600_bc_get_num_operands(struct
r600_bc_alu *alu)
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT:
+#if 0
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR:
+#endif
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
return 1;

-- 
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 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

Alex Deucher  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Alex Deucher  2011-01-14 14:53:01 PST ---
fixed:
9dfc68314de575ba7f0f936d5d0c9efe117fd535
634dece281c6f7eb3bb210fdd386c2afe8f7e895

-- 
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 26712] Weird X display upon hibernating

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


Andrew Morton  changed:

   What|Removed |Added

 CC||a...@linux-foundation.org
  Component|Other   |Video(DRI - non Intel)
 AssignedTo|other_ot...@kernel-bugs.osd |drivers_video-dri@kernel-bu
   |l.org   |gs.osdl.org
Product|Other   |Drivers
 Regression|No  |Yes




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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
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 26712] Weird X display upon hibernating

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





--- Comment #1 from Andrew Morton   2011-01-14 
23:51:25 ---
I assumed that this regression is also in 2.6.38, and assigned it to DRI.

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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
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 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #4 from Christian König  2011-01-14 
16:47:23 PST ---
Sorry, that was my fault. I auto-generated the missing case switches with a
regular expression and didn't noticed that this is an evergreen only
instruction. I promise to at least check if it's compiling before pushing the
next time.

-- 
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 33139] New: Radeon HD 5750 locks up when using 3D apps with r600g

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

   Summary: Radeon HD 5750 locks up when using 3D apps with r600g
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: dawit...@sbcglobal.net


Created an attachment (id=42065)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42065)
Backtrace of /usr/bin/X once GPU was locked

Overview:

I have recently begun experimenting with r600g on my HD 5750 (JUNIPER) card to
see if I can get it to work.  My distribution is Debian, and the Debian X
Strike Force is not currently providing r600g (only r600c) so I have been
packaging my own builds.

I have found that DOSBox, which I configure to use OpenGL 2D acceleration, runs
fine with r600g.  However, any program which uses 3D causes my GPU to lock up. 
I do not think I was able to obtain any useful debugging info when I was able
to SSH into the locked up machine, but I tried; the most recent version of Mesa
I tried locks the kernel, so I cannot even use SSH once the GPU locks. 
(Details below.)

  Steps to reproduce:

1.  Stop X and install r600g Mesa drivers.
2.  Start X and run a program using 3D (prboom, torcs, etc.)

  Actual results:

Both prboom and torcs will run their menuing system without crashing.  Starting
an actual game in prboom will work for a few moments, then lock the GPU. 
Attempting to start the game in torcs causes the GPU to lock before the first
3D frame is rendered (the final text message, "Get Ready," does display... then
it locks).

  Expected results:

Eventually, I hope r600g will work without locking the GPU.  Currently, r600c
works fine on this hardware, other than the fact that classic is clearly
inferior in performance to gallium at this point.  (See below.)

  System info:

GPU:  Powercolor Radeon HD 5750 SCS 1GB

Kernel:  2.6.37 + cherry-pick drm-core-next 17db7042 (Jan. 4, 2011)

Linux distribution:
Debian unstable

Machine:  self-built
AMD Phenom II X4 955
MSI 790FX-GD70 motherboard
4x2GB DDR3 1600

Software versions:
libdrm-2.4.23 (built against kernel source listed above)

mesa:  7.10-devel at commit ada9c78 (Jan. 4, 2011)
   7.11-devel at commit 69191d4 (Jan. 9, 2011)

xorg-server-1.9.3.901

xf86-video-ati-6.13.99 at commit f9bbb26 (Dec. 3, 2010)


  Additional Information:

This bug may be related to one or more of the following fdo bugs:

29978  HD 3200 locks up with r600c and r600g
31530  HD 5750 has problems with r600g
31532  r600g lockup (no hardware mentioned)

With the Mesa I pulled from git on Jan. 4 (see above), I was able to SSH to the
GPU-locked machine and try to debug with 'gdb'.  I was able to get a backtrace
on /usr/bin/X, but not on the program causing the lock.  I doubt this is
useful, but I am attaching it anyway.

Strangely, if I used 'strace' to attach to 'prboom' by process ID, it would
prevent the GPU from hanging!  (This is why I was able to comment above that I
know that r600g performance is superior to r600c on this hardware; with
'strace' attached, nothing I tried in 'prboom' would make the GPU lock!)  I
tried building a debug package of 'prboom', but this (instead of the stripped
binary provided by Debian) also would not lock the GPU.

Using 'torcs' always locks the GPU, and trying to attach to its PID with 'gdb'
provides no information:  it simply becomes unresponsive.  (Sorry.  I tried
everything I could, but maybe I'm doing it wrong.)  I was able to get 'strace'
to work, but once the GPU (and kernel) locked only garbage was send to the
file.  The machine runs 'fsck' after I reboot because it was not properly
shutdown, so the garbage might just be random bits from the hard disk.  That
file is 8.6 MB raw, and truncating the garbage and gzip'ing results in
something just over 300 KB.  I don't think this bugzilla will take something
that big, but if someone wants to see it I can attach it to an email.

The Mesa I pulled on Jan. 9 causes the kernel to hang once the GPU locks, so I
can't even attempt to use 'gdb'; I can get 'strace' going, but the output after
the lockup is random garbage.  (Please, if someone knows tricks for getting
useful debugging info when a GPU locks, let me know.  It's very frustrating
knowing I'm this close to superior Mesa performance, and I hate going back to
r600c now that I've seen what r600g can do!!!)

-- 
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 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

Vinson Lee  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Vinson Lee  2011-01-14 19:14:41 PST ---
mesa: 4620de7eeae18f313436936088d235a99b7bc11d (master)

Verified fixed.

-- 
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 33139] Radeon HD 5750 locks up when using 3D apps with r600g

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

--- Comment #1 from Dave Witbrodt  2011-01-14 19:20:47 
PST ---
Created an attachment (id=42066)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42066)
dmesg from kernel 2.6.37 (with cherry-pick mentioned in report)

-- 
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 33139] Radeon HD 5750 locks up when using 3D apps with r600g

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

--- Comment #2 from Dave Witbrodt  2011-01-14 19:22:21 
PST ---
Created an attachment (id=42067)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42067)
Xorg.0.log with r600c

-- 
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 26562] [bisected] blank screen with radeon.modeset=1

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





--- Comment #6 from Alex Deucher   2011-01-14 
05:34:09 ---
Created an attachment (id=43492)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=43492)
alternate patch

Can you try this one instead of the patch in comment 4?

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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

Dave Airlie  changed:

   What|Removed |Added

Product|freedesktop.org |Mesa
Version|unspecified |git
  Component|Mailing lists   |Drivers/DRI/r300
 AssignedTo|sitewranglers at lists.freedes |dri-devel at 
lists.freedesktop
   |ktop.org|.org

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


[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #2 from Dave Airlie  2011-01-14 
00:13:57 PST ---
what GPU/driver is this? glxinfo output please.

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


[Bug 33078] Sauerbraten refuses to start

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

--- Comment #1 from Michel D?nzer  2011-01-14 00:46:19 
PST ---
That does look like an SDL issue. What version of it are you using? Does
setting the environment variable SDL_VIDEO_X11_XRANDR=1 help?

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


[Bug 32875] KWin 4.5.95 (KDE 4.6) draws blank windows when desktop effects are enabled.

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

?yvind S?ther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from ?yvind S?ther  2011-01-14 06:08:10 
PST ---
works for me. thanks.

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


i915: 2.6.36: Monitor incorrectly detects 1920x1199

2011-01-14 Thread Mario 'BitKoenig' Holbe
k type: 2:0 3:ff
# DPMS capabilities: Active off:yes  Suspend:no  Standby:no

Mode"1920x1200" # vfreq 59.950Hz, hfreq 74.038kHz
DotClock154.00
HTimings1920 1968 2000 2080
VTimings1200 1203 1209 1235
Flags   "-HSync" "+VSync"
EndMode
# Block type: 2:0 3:fc
# Block type: 2:0 3:fd
# Block type: 2:0 3:ff
EndSection


PS: I mailed this to lkml about a week ago, maybe dri-devel@ will suit
better?


regards
   Mario
-- 
File names are infinite in length where infinity is set to 255 characters.
-- Peter Collinson, "The Unix File System"
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: Digital signature
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20110114/230a5809/attachment.pgp>


[Bug 26562] [bisected] blank screen with radeon.modeset=1

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





--- Comment #7 from Sami Liedes   2011-01-14 16:00:20 ---
No, 2.6.37 + patch in comment #6 (alone) does not fix the issue for me.

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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
P.S. My laptop: radeon 3470 works perfect.


[git pull] drm for rc1

2011-01-14 Thread James Simmons

On Thu, 13 Jan 2011, Anca Emanuel wrote:

> On Thu, Jan 13, 2011 at 7:55 PM, James Simmons  
> wrote:
> >
> >> > > With your patch, I can boot the system. But nouveau is not loaded.
> >> > > dmesg attached.
> >> > >
> >> >
> >> > Forget to mention: the revert makes first steps of boot look the same
> >> > (change the resolution of the text)
> >> > but with your patch, I see a big ugly ununtu logo, (I think that is
> >> > because nouveau is not loaded)
> >
> > Okay, can you do one more experiment for me. Since you already reverted
> > the patch to get it booting I like to ask you to add
> >
> > drm_fb_helper_fill_fix(info, fb_helper->fb);
> >
> > back into the drm_fb_helper_set_par function in drm_fb_helper.c. You have
> > something like this:
> >
> > ? ? ? ?mutex_lock(&dev->mode_config.mutex);
> > ? ? ? ?for (i = 0; i < fb_helper->crtc_count; i++) {
> > ? ? ? ? ? ? ? ?crtc = fb_helper->crtc_info[i].mode_set.crtc;
> > ? ? ? ? ? ? ? ?ret = 
> > crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
> > ? ? ? ? ? ? ? ?if (ret) {
> > ? ? ? ? ? ? ? ? ? ? ? ?mutex_unlock(&dev->mode_config.mutex);
> > ? ? ? ? ? ? ? ? ? ? ? ?return ret;
> > ? ? ? ? ? ? ? ?}
> > ? ? ? ? ? ? ? ?drm_fb_helper_fill_fix(info, fb_helper->fb);
> > ? ? ? ?}
> > ? ? ? ?mutex_unlock(&dev->mode_config.mutex);
> >
> > Tell me if your system is still usable after that. Thanks for testing for
> > me.
> >
> 
> after
> 
> git revert dfe63bb0ad9810db13aab0058caba97866e0a681
> 
> and
> 
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 5c4f9b9..2aad663 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -816,6 +816,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
> mutex_unlock(&dev->mode_config.mutex);
> return ret;
> }
> +   drm_fb_helper_fill_fix(info, fb_helper->fb->pitch, 
> fb_helper->fb
> }
> mutex_unlock(&dev->mode_config.mutex);
> 
> I get an working system. ( the boot screen is not ok )
> Tested suspend/resume. Dmesg attached.

Just as I thought. Even this breaks the nouveau driver.

Could you now add also in the drm_fb_helper_fill_fix function

DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch, 
  fb_helper->fb->depth);

I have a feeling the values are not right. Thanks.


[radeon] radeon_kick_out_firmware_fb() can deref NULL

2011-01-14 Thread Sylvain 'ythier' Hitier
Hello,

In commit a56f7428d7534f162fbb089c5c79012bf38a7c29 [1], the result of
alloc_apertures() function call is used without checking for a possible NULL
result, which may happen, as seen in [2].

The latest commit [3] in the drm-fixes branch of the
linux/kernel/git/airlied/drm-2.6.git repo still has the issue.

[1] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=a56f7428d7534f162fbb089c5c79012bf38a7c29
[2] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;hb=refs/heads/drm-fixes;a=blob;f=include/linux/fb.h#l890
[3] 
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commit;h=d15eda5c6edff4987af6f4423af0bab0c3251e74

Regards,
Sylvain "ythier" Hitier

-- 
Free hugs for Free Software Fellows!
Living in a Debian package => http://en.wikipedia.org/wiki/Apt,_Vaucluse


[git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 6:38 PM, James Simmons  
wrote:
>
> On Thu, 13 Jan 2011, Anca Emanuel wrote:
>
>> On Thu, Jan 13, 2011 at 7:55 PM, James Simmons  
>> wrote:
>> >
>> >> > > With your patch, I can boot the system. But nouveau is not loaded.
>> >> > > dmesg attached.
>> >> > >
>> >> >
>> >> > Forget to mention: the revert makes first steps of boot look the same
>> >> > (change the resolution of the text)
>> >> > but with your patch, I see a big ugly ununtu logo, (I think that is
>> >> > because nouveau is not loaded)
>> >
>> > Okay, can you do one more experiment for me. Since you already reverted
>> > the patch to get it booting I like to ask you to add
>> >
>> > drm_fb_helper_fill_fix(info, fb_helper->fb);
>> >
>> > back into the drm_fb_helper_set_par function in drm_fb_helper.c. You have
>> > something like this:
>> >
>> > ? ? ? ?mutex_lock(&dev->mode_config.mutex);
>> > ? ? ? ?for (i = 0; i < fb_helper->crtc_count; i++) {
>> > ? ? ? ? ? ? ? ?crtc = fb_helper->crtc_info[i].mode_set.crtc;
>> > ? ? ? ? ? ? ? ?ret = 
>> > crtc->funcs->set_config(&fb_helper->crtc_info[i].mode_set);
>> > ? ? ? ? ? ? ? ?if (ret) {
>> > ? ? ? ? ? ? ? ? ? ? ? ?mutex_unlock(&dev->mode_config.mutex);
>> > ? ? ? ? ? ? ? ? ? ? ? ?return ret;
>> > ? ? ? ? ? ? ? ?}
>> > ? ? ? ? ? ? ? ?drm_fb_helper_fill_fix(info, fb_helper->fb);
>> > ? ? ? ?}
>> > ? ? ? ?mutex_unlock(&dev->mode_config.mutex);
>> >
>> > Tell me if your system is still usable after that. Thanks for testing for
>> > me.
>> >
>>
>> after
>>
>> git revert dfe63bb0ad9810db13aab0058caba97866e0a681
>>
>> and
>>
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c 
>> b/drivers/gpu/drm/drm_fb_helper.c
>> index 5c4f9b9..2aad663 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -816,6 +816,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
>> ? ? ? ? ? ? ? ? ? ? ? ? mutex_unlock(&dev->mode_config.mutex);
>> ? ? ? ? ? ? ? ? ? ? ? ? return ret;
>> ? ? ? ? ? ? ? ? }
>> + ? ? ? ? ? ? ? drm_fb_helper_fill_fix(info, fb_helper->fb->pitch, 
>> fb_helper->fb
>> ? ? ? ? }
>> ? ? ? ? mutex_unlock(&dev->mode_config.mutex);
>>
>> I get an working system. ( the boot screen is not ok )
>> Tested suspend/resume. Dmesg attached.
>
> Just as I thought. Even this breaks the nouveau driver.
>
> Could you now add also in the drm_fb_helper_fill_fix function
>
> DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
> ? ? ? ? ?fb_helper->fb->depth);
>
> I have a feeling the values are not right. Thanks.
>

Please make an patch to test.


[git pull] drm for rc1

2011-01-14 Thread James Simmons

> > Just as I thought. Even this breaks the nouveau driver.
> >
> > Could you now add also in the drm_fb_helper_fill_fix function
> >
> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
> > ? ? ? ? ?fb_helper->fb->depth);
> >
> > I have a feeling the values are not right. Thanks.
> >
> 
> Please make an patch to test.

Done. I had to test the patch myself. No need to do a revert. Just apply 
this patch to linus tree. Then send the dmesg to me. Thanks.

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);

 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
*fb_helper,

if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index a26d047..fe87319 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
info->screen_size = size;

+   drm_fb_helper_fill_fix(info, fb);
drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
sizes->fb_height);

/* Set aperture base/size for vesafb takeover */


[git pull] drm for rc1

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 8:26 PM, James Simmons  
wrote:
>
>> > Just as I thought. Even this breaks the nouveau driver.
>> >
>> > Could you now add also in the drm_fb_helper_fill_fix function
>> >
>> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
>> > ? ? ? ? ?fb_helper->fb->depth);
>> >
>> > I have a feeling the values are not right. Thanks.
>> >
>>
>> Please make an patch to test.
>
> Done. I had to test the patch myself. No need to do a revert. Just apply
> this patch to linus tree. Then send the dmesg to me. Thanks.
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 0307d60..beded14 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
>
> ?void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
> ?{
> + ? ? ? DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
> ? ? ? ?info->fix.type = FB_TYPE_PACKED_PIXELS;
> ? ? ? ?info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
> ? ? ? ? ? ? ? ?FB_VISUAL_TRUECOLOR;
> @@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
> *fb_helper,
>
> ? ? ? ?if (new_fb) {
> ? ? ? ? ? ? ? ?info->var.pixclock = 0;
> - ? ? ? ? ? ? ? drm_fb_helper_fill_fix(info, fb_helper->fb);
> ? ? ? ? ? ? ? ?if (register_framebuffer(info) < 0) {
> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?}
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
> b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> index a26d047..fe87319 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> @@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
> ? ? ? ?info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
> ? ? ? ?info->screen_size = size;
>
> + ? ? ? drm_fb_helper_fill_fix(info, fb);
> ? ? ? ?drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
> sizes->fb_height);
>
> ? ? ? ?/* Set aperture base/size for vesafb takeover */

I will test it, but first, I will need to disable the cassini driver,
because it can not compile.


[Bug 33131] New: r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

   Summary: r600_asm.c:82: error:
?V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR?
undeclared
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: blocker
  Priority: highest
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: vlee at vmware.com


mesa: 323ef3a1f07ba4333dadebab571ddcd49d95f45c (master)

$ scons
[...]
  Compiling src/gallium/drivers/r600/r600_asm.c ...
src/gallium/drivers/r600/r600_asm.c: In function ?r600_bc_get_num_operands?:
src/gallium/drivers/r600/r600_asm.c:82: error:
?V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR? undeclared (first use in this
function)
src/gallium/drivers/r600/r600_asm.c:82: error: (Each undeclared identifier is
reported only once
src/gallium/drivers/r600/r600_asm.c:82: error: for each function it appears
in.)

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

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 8:40 PM, Anca Emanuel  wrote:
> On Fri, Jan 14, 2011 at 8:26 PM, James Simmons  
> wrote:
>>
>>> > Just as I thought. Even this breaks the nouveau driver.
>>> >
>>> > Could you now add also in the drm_fb_helper_fill_fix function
>>> >
>>> > DRM_INFO("pitch %d, depth %d\n", fb_helper->fb->pitch,
>>> > ? ? ? ? ?fb_helper->fb->depth);
>>> >
>>> > I have a feeling the values are not right. Thanks.
>>> >
>>>
>>> Please make an patch to test.
>>
>> Done. I had to test the patch myself. No need to do a revert. Just apply
>> this patch to linus tree. Then send the dmesg to me. Thanks.
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c 
>> b/drivers/gpu/drm/drm_fb_helper.c
>> index 0307d60..beded14 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
>>
>> ?void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer 
>> *fb)
>> ?{
>> + ? ? ? DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
>> ? ? ? ?info->fix.type = FB_TYPE_PACKED_PIXELS;
>> ? ? ? ?info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
>> ? ? ? ? ? ? ? ?FB_VISUAL_TRUECOLOR;
>> @@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper 
>> *fb_helper,
>>
>> ? ? ? ?if (new_fb) {
>> ? ? ? ? ? ? ? ?info->var.pixclock = 0;
>> - ? ? ? ? ? ? ? drm_fb_helper_fill_fix(info, fb_helper->fb);
>> ? ? ? ? ? ? ? ?if (register_framebuffer(info) < 0) {
>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>> ? ? ? ? ? ? ? ?}
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c 
>> b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> index a26d047..fe87319 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
>> @@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
>> ? ? ? ?info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
>> ? ? ? ?info->screen_size = size;
>>
>> + ? ? ? drm_fb_helper_fill_fix(info, fb);
>> ? ? ? ?drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, 
>> sizes->fb_height);
>>
>> ? ? ? ?/* Set aperture base/size for vesafb takeover */
>
> I will test it, but first, I will need to disable the cassini driver,
> because it can not compile.
>

I will test this first:

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);

 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_h

if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/n
index a26d047..3896771 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d60..beded14 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -609,6 +609,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);

 void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
 {
+   DRM_INFO("pitch %d, depth %d\n", fb->pitch, fb->depth);
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
FB_VISUAL_TRUECOLOR;
@@ -973,7 +974,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_h

if (new_fb) {
info->var.pixclock = 0;
-   drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}


[Bug 25597] SIGSEGV in _radeon_bo_unref

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

--- Comment #12 from David Ronis  2011-01-14 11:17:44 
PST ---
ping.

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


[PATCH 2/5] i915: Add native backlight control

2011-01-14 Thread Matthew Garrett
Not all systems expose a firmware or platform mechanism for changing the
backlight intensity on i915, so add native driver support.

Signed-off-by: Matthew Garrett 
Cc: intel-gfx 
---
 drivers/gpu/drm/i915/i915_drv.h   |4 ++
 drivers/gpu/drm/i915/intel_dp.c   |7 +++
 drivers/gpu/drm/i915/intel_drv.h  |3 +-
 drivers/gpu/drm/i915/intel_lvds.c |5 ++
 drivers/gpu/drm/i915/intel_opregion.c |1 -
 drivers/gpu/drm/i915/intel_panel.c|   72 -
 6 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 5969f46..2d6ef13 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 

 /* General customization:
  */
@@ -667,6 +668,7 @@ typedef struct drm_i915_private {
int child_dev_num;
struct child_device_config *child_dev;
struct drm_connector *int_lvds_connector;
+   struct drm_connector *int_edp_connector;

bool mchbar_need_disable;

@@ -695,6 +697,8 @@ typedef struct drm_i915_private {

/* list of fbdev register on this device */
struct intel_fbdev *fbdev;
+
+   struct backlight_device *backlight;
 } drm_i915_private_t;

 struct drm_i915_gem_object {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 1f4242b..54e89e9 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1682,6 +1682,11 @@ done:
 static void
 intel_dp_destroy (struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
+
+   if (intel_dpd_is_edp(dev))
+   intel_panel_destroy_backlight(dev);
+
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(connector);
@@ -1911,6 +1916,8 @@ intel_dp_init(struct drm_device *dev, int output_reg)
DRM_MODE_TYPE_PREFERRED;
}
}
+   dev_priv->int_edp_connector = connector;
+   intel_panel_setup_backlight(dev);
}

intel_dp_add_properties(intel_dp, connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 74db255..074d41a 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -257,9 +257,10 @@ extern void intel_pch_panel_fitting(struct drm_device *dev,
 extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
 extern u32 intel_panel_get_backlight(struct drm_device *dev);
 extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
-extern void intel_panel_setup_backlight(struct drm_device *dev);
+extern int intel_panel_setup_backlight(struct drm_device *dev);
 extern void intel_panel_enable_backlight(struct drm_device *dev);
 extern void intel_panel_disable_backlight(struct drm_device *dev);
+extern void intel_panel_destroy_backlight(struct drm_device *dev);

 extern void intel_crtc_load_lut(struct drm_crtc *crtc);
 extern void intel_encoder_prepare (struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index ace8d5d..75f38c0 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -580,6 +580,8 @@ static void intel_lvds_destroy(struct drm_connector 
*connector)
struct drm_device *dev = connector->dev;
struct drm_i915_private *dev_priv = dev->dev_private;

+   intel_panel_destroy_backlight(dev);
+
if (dev_priv->lid_notifier.notifier_call)
acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
drm_sysfs_connector_remove(connector);
@@ -1055,6 +1057,9 @@ out:
/* keep the LVDS connector */
dev_priv->int_lvds_connector = connector;
drm_sysfs_connector_add(connector);
+
+   intel_panel_setup_backlight(dev);
+
return true;

 failed:
diff --git a/drivers/gpu/drm/i915/intel_opregion.c 
b/drivers/gpu/drm/i915/intel_opregion.c
index f295a7a..5df3d38 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -224,7 +224,6 @@ void intel_opregion_asle_intr(struct drm_device *dev)
asle->aslc = asle_stat;
 }

-/* Only present on Ironlake+ */
 void intel_opregion_gse_intr(struct drm_device *dev)
 {
struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_panel.c 
b/drivers/gpu/drm/i915/intel_panel.c
index c65992d..4ab4239 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -274,10 +274,80 @@ void intel_panel_enable_backlight(struct drm_device *dev)
dev_priv->backlight_enabled = true;
 }

-void intel_panel_setup_backlight(struct drm_device *dev)
+void intel_panel_init_backlight(struct drm_device *dev)
 {
struct drm_i915_private *dev_priv = dev->dev_private;

  

[PATCH 1/5] Backlight: Add backlight type

2011-01-14 Thread Matthew Garrett
There may be multiple ways of controlling the backlight on a given machine.
Allow drivers to expose the type of interface they are providing, making
it possible for userspace to make appropriate policy decisions.

Signed-off-by: Matthew Garrett 
Cc: Richard Purdie 
Cc: intel-gfx at lists.freedesktop.org
Cc: dri-devel at lists.freedesktop.org
---
 Documentation/ABI/stable/sysfs-class-backlight |   20 
 drivers/acpi/video.c   |1 +
 drivers/gpu/drm/nouveau/nouveau_backlight.c|2 +
 drivers/hid/hid-picolcd.c  |1 +
 drivers/macintosh/via-pmu-backlight.c  |1 +
 drivers/platform/x86/acer-wmi.c|1 +
 drivers/platform/x86/asus-laptop.c |1 +
 drivers/platform/x86/asus_acpi.c   |1 +
 drivers/platform/x86/classmate-laptop.c|1 +
 drivers/platform/x86/compal-laptop.c   |1 +
 drivers/platform/x86/dell-laptop.c |1 +
 drivers/platform/x86/eeepc-laptop.c|1 +
 drivers/platform/x86/eeepc-wmi.c   |1 +
 drivers/platform/x86/fujitsu-laptop.c  |1 +
 drivers/platform/x86/msi-laptop.c  |1 +
 drivers/platform/x86/msi-wmi.c |1 +
 drivers/platform/x86/panasonic-laptop.c|1 +
 drivers/platform/x86/sony-laptop.c |1 +
 drivers/platform/x86/thinkpad_acpi.c   |1 +
 drivers/platform/x86/toshiba_acpi.c|1 +
 drivers/staging/olpc_dcon/olpc_dcon.c  |1 +
 drivers/staging/samsung-laptop/samsung-laptop.c|1 +
 drivers/usb/misc/appledisplay.c|1 +
 drivers/video/atmel_lcdfb.c|1 +
 drivers/video/aty/aty128fb.c   |1 +
 drivers/video/aty/atyfb_base.c |1 +
 drivers/video/aty/radeon_backlight.c   |1 +
 drivers/video/backlight/88pm860x_bl.c  |1 +
 drivers/video/backlight/adp5520_bl.c   |1 +
 drivers/video/backlight/adp8860_bl.c   |1 +
 drivers/video/backlight/adx_bl.c   |1 +
 drivers/video/backlight/atmel-pwm-bl.c |1 +
 drivers/video/backlight/backlight.c|   24 +++-
 drivers/video/backlight/corgi_lcd.c|1 +
 drivers/video/backlight/cr_bllcd.c |1 +
 drivers/video/backlight/da903x_bl.c|1 +
 drivers/video/backlight/ep93xx_bl.c|1 +
 drivers/video/backlight/generic_bl.c   |1 +
 drivers/video/backlight/hp680_bl.c |1 +
 drivers/video/backlight/jornada720_bl.c|1 +
 drivers/video/backlight/kb3886_bl.c|1 +
 drivers/video/backlight/locomolcd.c|1 +
 drivers/video/backlight/max8925_bl.c   |1 +
 drivers/video/backlight/mbp_nvidia_bl.c|1 +
 drivers/video/backlight/omap1_bl.c |1 +
 drivers/video/backlight/pcf50633-backlight.c   |1 +
 drivers/video/backlight/progear_bl.c   |1 +
 drivers/video/backlight/pwm_bl.c   |1 +
 drivers/video/backlight/s6e63m0.c  |1 +
 drivers/video/backlight/tosa_bl.c  |1 +
 drivers/video/backlight/wm831x_bl.c|1 +
 drivers/video/bf54x-lq043fb.c  |1 +
 drivers/video/bfin-t350mcqb-fb.c   |1 +
 drivers/video/imxfb.c  |1 +
 drivers/video/nvidia/nv_backlight.c|1 +
 drivers/video/omap2/displays/panel-acx565akm.c |1 +
 .../video/omap2/displays/panel-sharp-ls037v7dw01.c |1 +
 drivers/video/omap2/displays/panel-taal.c  |2 +
 drivers/video/riva/fbdev.c |1 +
 include/linux/backlight.h  |9 +++
 60 files changed, 111 insertions(+), 1 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-class-backlight 
b/Documentation/ABI/stable/sysfs-class-backlight
index 4d637e1..70302f3 100644
--- a/Documentation/ABI/stable/sysfs-class-backlight
+++ b/Documentation/ABI/stable/sysfs-class-backlight
@@ -34,3 +34,23 @@ Contact: Richard Purdie 
 Description:
Maximum brightness for .
 Users: HAL
+
+What:  /sys/class/backlight//type
+Date:  September 2010
+KernelVersion: 2.6.37
+Contact:   Matthew Garrett 
+Description:
+   The type of interface controlled by .
+   "firmware": The driver uses a standard firmware interface
+   "platform": The driver uses a platform-specific interface
+   "raw": The driver controls hardware registers directly
+
+   In the general case, when multiple backlight
+   interfaces are available for a

[PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Matthew Garrett
We may eventually end up with per-connector backlights, especially with
ddcci devices. Make sure that the parent node for the backlight device is
the connector rather than the PCI device.

Signed-off-by: Matthew Garrett 
---
 drivers/gpu/drm/nouveau/nouveau_backlight.c |   24 ++--
 drivers/gpu/drm/nouveau/nouveau_connector.c |9 +
 drivers/gpu/drm/nouveau/nouveau_drv.h   |8 
 drivers/gpu/drm/nouveau/nouveau_state.c |6 --
 4 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c 
b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 18d7bcc..00a55df 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -88,10 +88,11 @@ static const struct backlight_ops nv50_bl_ops = {
.update_status = nv50_set_intensity,
 };

-static int nouveau_nv40_backlight_init(struct drm_device *dev)
+static int nouveau_nv40_backlight_init(struct drm_connector *connector)
 {
-   struct backlight_properties props;
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
+   struct backlight_properties props;
struct backlight_device *bd;

if (!(nv_rd32(dev, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
@@ -100,7 +101,7 @@ static int nouveau_nv40_backlight_init(struct drm_device 
*dev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = 31;
-   bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
+   bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
   &nv40_bl_ops, &props);
if (IS_ERR(bd))
return PTR_ERR(bd);
@@ -112,10 +113,11 @@ static int nouveau_nv40_backlight_init(struct drm_device 
*dev)
return 0;
 }

-static int nouveau_nv50_backlight_init(struct drm_device *dev)
+static int nouveau_nv50_backlight_init(struct drm_connector *connector)
 {
-   struct backlight_properties props;
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
+   struct backlight_properties props;
struct backlight_device *bd;

if (!nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT))
@@ -124,7 +126,7 @@ static int nouveau_nv50_backlight_init(struct drm_device 
*dev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = 1025;
-   bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
+   bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
   &nv50_bl_ops, &props);
if (IS_ERR(bd))
return PTR_ERR(bd);
@@ -135,8 +137,9 @@ static int nouveau_nv50_backlight_init(struct drm_device 
*dev)
return 0;
 }

-int nouveau_backlight_init(struct drm_device *dev)
+int nouveau_backlight_init(struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;

 #ifdef CONFIG_ACPI
@@ -149,9 +152,9 @@ int nouveau_backlight_init(struct drm_device *dev)

switch (dev_priv->card_type) {
case NV_40:
-   return nouveau_nv40_backlight_init(dev);
+   return nouveau_nv40_backlight_init(connector);
case NV_50:
-   return nouveau_nv50_backlight_init(dev);
+   return nouveau_nv50_backlight_init(connector);
default:
break;
}
@@ -159,8 +162,9 @@ int nouveau_backlight_init(struct drm_device *dev)
return 0;
 }

-void nouveau_backlight_exit(struct drm_device *dev)
+void nouveau_backlight_exit(struct drm_connector *connector)
 {
+   struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;

if (dev_priv->backlight) {
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index a21e000..3a1ecc7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -116,6 +116,10 @@ nouveau_connector_destroy(struct drm_connector *connector)
  nouveau_connector_hotplug, connector);
}

+   if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+   connector->connector_type == DRM_MODE_CONNECTOR_eDP)
+   nouveau_backlight_exit(connector);
+
kfree(nv_connector->edid);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
@@ -893,6 +897,11 @@ nouveau_connector_create(struct drm_device *dev, int index)
}

drm_sysfs_connector_add(connector);
+
+   if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+   connector->connector_type == D

[PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible

2011-01-14 Thread Matthew Garrett
Dual-GPU machines may provide more than one ACPI backlight interface. Tie
the backlight device to the GPU in order to allow userspace to identify
the correct interface.

Signed-off-by: Matthew Garrett 
---
 drivers/acpi/video.c |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index a9eec8c..a18e497 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -782,6 +782,9 @@ static void acpi_video_device_find_cap(struct 
acpi_video_device *device)

if (acpi_video_backlight_support()) {
struct backlight_properties props;
+   struct pci_dev *pdev;
+   acpi_handle acpi_parent;
+   struct device *parent = NULL;
int result;
static int count = 0;
char *name;
@@ -794,10 +797,20 @@ static void acpi_video_device_find_cap(struct 
acpi_video_device *device)
return;
count++;

+   acpi_get_parent(device->dev->handle, &acpi_parent);
+
+   pdev = acpi_get_pci_dev(acpi_parent);
+   if (pdev) {
+   parent = &pdev->dev;
+   pci_dev_put(pdev);
+   }
+
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_FIRMWARE;
props.max_brightness = device->brightness->count - 3;
-   device->backlight = backlight_device_register(name, NULL, 
device,
+   device->backlight = backlight_device_register(name,
+ parent,
+ device,
  
&acpi_backlight_ops,
  &props);
kfree(name);
-- 
1.7.3.4



[PATCH 3/5] radeon: Expose backlight class device for legacy LVDS encoder

2011-01-14 Thread Matthew Garrett
From: Michel D?nzer 

Allows e.g. power management daemons to control the backlight level. Inspired
by the corresponding code in radeonfb.

(Updated to add backlight type and make the connector the parent device - mjg)

Signed-off-by: Michel D?nzer 
Signed-off-by: Matthew Garrett 
Cc: dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/radeon/Kconfig  |1 +
 drivers/gpu/drm/radeon/radeon_connectors.c  |   15 ++
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c |  257 ++-
 drivers/gpu/drm/radeon/radeon_mode.h|   10 +
 4 files changed, 277 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig
index 1c02d23..9746fee 100644
--- a/drivers/gpu/drm/radeon/Kconfig
+++ b/drivers/gpu/drm/radeon/Kconfig
@@ -1,6 +1,7 @@
 config DRM_RADEON_KMS
bool "Enable modesetting on radeon by default - NEW DRIVER"
depends on DRM_RADEON
+   select BACKLIGHT_CLASS_DEVICE
help
  Choose this option if you want kernel modesetting enabled by default.

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c 
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 22b7e3d..e842fb5 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -40,6 +40,10 @@ radeon_atombios_connected_scratch_regs(struct drm_connector 
*connector,
   struct drm_encoder *encoder,
   bool connected);

+extern void
+radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
+struct drm_connector *drm_connector);
+
 void radeon_connector_hotplug(struct drm_connector *connector)
 {
struct drm_device *dev = connector->dev;
@@ -1517,6 +1521,17 @@ radeon_add_legacy_connector(struct drm_device *dev,
connector->polled = DRM_CONNECTOR_POLL_HPD;
connector->display_info.subpixel_order = subpixel_order;
drm_sysfs_connector_add(connector);
+   if (connector_type == DRM_MODE_CONNECTOR_LVDS) {
+   struct drm_encoder *drm_encoder;
+
+   list_for_each_entry(drm_encoder, 
&dev->mode_config.encoder_list, head) {
+   struct radeon_encoder *radeon_encoder;
+
+   radeon_encoder = to_radeon_encoder(drm_encoder);
+   if (radeon_encoder->encoder_id == 
ENCODER_OBJECT_ID_INTERNAL_LVDS)
+   radeon_legacy_backlight_init(radeon_encoder, 
connector);
+   }
+   }
return;

 failed:
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c 
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 59f834b..ba7dcc6 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -28,6 +28,10 @@
 #include "radeon_drm.h"
 #include "radeon.h"
 #include "atom.h"
+#include 
+#ifdef CONFIG_PMAC_BACKLIGHT
+#include 
+#endif

 static void radeon_legacy_encoder_disable(struct drm_encoder *encoder)
 {
@@ -39,7 +43,7 @@ static void radeon_legacy_encoder_disable(struct drm_encoder 
*encoder)
radeon_encoder->active_device = 0;
 }

-static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
+static void radeon_legacy_lvds_update(struct drm_encoder *encoder, int mode)
 {
struct drm_device *dev = encoder->dev;
struct radeon_device *rdev = dev->dev_private;
@@ -47,15 +51,23 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder 
*encoder, int mode)
uint32_t lvds_gen_cntl, lvds_pll_cntl, pixclks_cntl, disp_pwr_man;
int panel_pwr_delay = 2000;
bool is_mac = false;
+   uint8_t backlight_level;
DRM_DEBUG_KMS("\n");

+   lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
+   backlight_level = (lvds_gen_cntl >> RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & 
0xff;
+
if (radeon_encoder->enc_priv) {
if (rdev->is_atom_bios) {
struct radeon_encoder_atom_dig *lvds = 
radeon_encoder->enc_priv;
panel_pwr_delay = lvds->panel_pwr_delay;
+   if (lvds->bl_dev)
+   backlight_level = lvds->backlight_level;
} else {
struct radeon_encoder_lvds *lvds = 
radeon_encoder->enc_priv;
panel_pwr_delay = lvds->panel_pwr_delay;
+   if (lvds->bl_dev)
+   backlight_level = lvds->backlight_level;
}
}

@@ -82,11 +94,13 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder 
*encoder, int mode)
lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET;
WREG32(RADEON_LVDS_PLL_CNTL, lvds_pll_cntl);

-   lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
-   lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_EN | 
RADEON_LVDS_DIGON | RADEON_LVDS_BLON);
+   lvds_ge

[PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Anca Emanuel
On Fri, Jan 14, 2011 at 9:24 PM, Matthew Garrett  wrote:
> We may eventually end up with per-connector backlights, especially with
> ddcci devices. Make sure that the parent node for the backlight device is
> the connector rather than the PCI device.
>
> Signed-off-by: Matthew Garrett 
> ---
> ?drivers/gpu/drm/nouveau/nouveau_backlight.c | ? 24 ++--
> ?drivers/gpu/drm/nouveau/nouveau_connector.c | ? ?9 +
> ?drivers/gpu/drm/nouveau/nouveau_drv.h ? ? ? | ? ?8 
> ?drivers/gpu/drm/nouveau/nouveau_state.c ? ? | ? ?6 --
> ?4 files changed, 27 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c 
> b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> index 18d7bcc..00a55df 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> @@ -88,10 +88,11 @@ static const struct backlight_ops nv50_bl_ops = {
> ? ? ? ?.update_status = nv50_set_intensity,
> ?};
>
> -static int nouveau_nv40_backlight_init(struct drm_device *dev)
> +static int nouveau_nv40_backlight_init(struct drm_connector *connector)
> ?{
> - ? ? ? struct backlight_properties props;
> + ? ? ? struct drm_device *dev = connector->dev;
> ? ? ? ?struct drm_nouveau_private *dev_priv = dev->dev_private;
> + ? ? ? struct backlight_properties props;
> ? ? ? ?struct backlight_device *bd;
>
> ? ? ? ?if (!(nv_rd32(dev, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
> @@ -100,7 +101,7 @@ static int nouveau_nv40_backlight_init(struct drm_device 
> *dev)
> ? ? ? ?memset(&props, 0, sizeof(struct backlight_properties));
> ? ? ? ?props.type = BACKLIGHT_RAW;
> ? ? ? ?props.max_brightness = 31;
> - ? ? ? bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
> + ? ? ? bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &nv40_bl_ops, &props);
> ? ? ? ?if (IS_ERR(bd))
> ? ? ? ? ? ? ? ?return PTR_ERR(bd);
> @@ -112,10 +113,11 @@ static int nouveau_nv40_backlight_init(struct 
> drm_device *dev)
> ? ? ? ?return 0;
> ?}
>
> -static int nouveau_nv50_backlight_init(struct drm_device *dev)
> +static int nouveau_nv50_backlight_init(struct drm_connector *connector)
> ?{
> - ? ? ? struct backlight_properties props;
> + ? ? ? struct drm_device *dev = connector->dev;
> ? ? ? ?struct drm_nouveau_private *dev_priv = dev->dev_private;
> + ? ? ? struct backlight_properties props;
> ? ? ? ?struct backlight_device *bd;
>
> ? ? ? ?if (!nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT))
> @@ -124,7 +126,7 @@ static int nouveau_nv50_backlight_init(struct drm_device 
> *dev)
> ? ? ? ?memset(&props, 0, sizeof(struct backlight_properties));
> ? ? ? ?props.type = BACKLIGHT_RAW;
> ? ? ? ?props.max_brightness = 1025;
> - ? ? ? bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
> + ? ? ? bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &nv50_bl_ops, &props);
> ? ? ? ?if (IS_ERR(bd))
> ? ? ? ? ? ? ? ?return PTR_ERR(bd);
> @@ -135,8 +137,9 @@ static int nouveau_nv50_backlight_init(struct drm_device 
> *dev)
> ? ? ? ?return 0;
> ?}
>
> -int nouveau_backlight_init(struct drm_device *dev)
> +int nouveau_backlight_init(struct drm_connector *connector)
> ?{
> + ? ? ? struct drm_device *dev = connector->dev;
> ? ? ? ?struct drm_nouveau_private *dev_priv = dev->dev_private;
>
> ?#ifdef CONFIG_ACPI
> @@ -149,9 +152,9 @@ int nouveau_backlight_init(struct drm_device *dev)
>
> ? ? ? ?switch (dev_priv->card_type) {
> ? ? ? ?case NV_40:
> - ? ? ? ? ? ? ? return nouveau_nv40_backlight_init(dev);
> + ? ? ? ? ? ? ? return nouveau_nv40_backlight_init(connector);
> ? ? ? ?case NV_50:
> - ? ? ? ? ? ? ? return nouveau_nv50_backlight_init(dev);
> + ? ? ? ? ? ? ? return nouveau_nv50_backlight_init(connector);
> ? ? ? ?default:
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?}
> @@ -159,8 +162,9 @@ int nouveau_backlight_init(struct drm_device *dev)
> ? ? ? ?return 0;
> ?}
>
> -void nouveau_backlight_exit(struct drm_device *dev)
> +void nouveau_backlight_exit(struct drm_connector *connector)
> ?{
> + ? ? ? struct drm_device *dev = connector->dev;
> ? ? ? ?struct drm_nouveau_private *dev_priv = dev->dev_private;
>
> ? ? ? ?if (dev_priv->backlight) {
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
> b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index a21e000..3a1ecc7 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -116,6 +116,10 @@ nouveau_connector_destroy(struct drm_connector 
> *connector)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nouveau_connector_hotplug, connector);
> ? ? ? ?}
>
> + ? ? ? if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
> + ? ? ? ? ? connector->connector_type == DRM_MODE_CONNECTOR_eDP)
> + ? ? ? ? ? ? ? nouveau_backlight_exit(connector);
> +
> ? ? ? ?kfree(nv_connector->edid);
> ? ? ? ?drm_sysfs_connector_remove(connector);
> ? ? ? ?drm_connector_cleanup(connector);
> 

[PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev

2011-01-14 Thread Matthew Garrett
On Fri, Jan 14, 2011 at 09:30:19PM +0200, Anca Emanuel wrote:

> Hi Matthew Garrett,
> I have problems with nouveau.
> Do you know ?

Your best bet is to follow the instructions on 
http://nouveau.freedesktop.org/wiki/Bugs to report a bug.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #3 from Tobias Jakobi  2011-01-14 12:38:18 
PST ---
In case that this is with the r600 classic driver: Try using r600g, since it
solves a lot of the shadow volume rendering issues that the classic driver has.
IIRC some developer stated somewhere (I think a bugreport here on FDO) that it
isn't very likely that the shadow problems will get fixed with the classic
driver.

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


[Bug 33077] Broken rendering with black areas in Doom3-demo also falls to 3-4 fps time to time

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

--- Comment #4 from barisurum at gmail.com 2011-01-14 13:20:04 PST ---
(In reply to comment #2)
> what GPU/driver is this? glxinfo output please.

The GPU is an R580, the card is an X1950XT 
Driver: r300g, gallium 0.4, mesa 7.10-devel, drm,radeon from git (xorg edgers)

glxinfo output follows:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
GLX_INTEL_swap_event
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI R580
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
GL_ARB_copy_buffer, GL_ARB_depth_texture, GL_ARB_draw_buffers, 
GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location, 
GL_ARB_fragment_coord_conventions, GL_ARB_fragment_program, 
GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, 
GL_ARB_framebuffer_object, GL_ARB_half_float_vertex, 
GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
GL_ARB_provoking_vertex, GL_ARB_shader_objects, 
GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_texture_border_clamp, 
GL_ARB_texture_compression, GL_ARB_texture_cube_map, 
GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 
GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 
GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_swizzle, 
GL_ARB_transpose_matrix, GL_ARB_vertex_array_bgra, 
GL_ARB_vertex_array_object, GL_ARB_vertex_buffer_object, 
GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos, 
GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
GL_EXT_compiled_vertex_array, GL_EXT_copy_texture, 
GL_EXT_draw_range_elements, GL_EXT_framebuffer_blit, 
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object, 
GL_EXT_fog_coord, GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels, 
GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
GL_EXT_secondary_color, GL_EXT_separate_shader_objects, 
GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, 
GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_subtexture, 
GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_compression_s3tc, 
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
GL_EXT_texture_swizzle, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, 
GL_ATI_blend_equation_separate, GL_ATI_texture_env_combine3, 
GL_ATI_texture_mirror_once, GL_ATI_separate_stencil, 
GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_MESA_window_pos, 
GL_NV_blend_square, GL_NV_conditional_render, GL_NV_light_max_exponent, 
GL_NV_packed_dept

[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #1 from Alex Deucher  2011-01-14 13:24:02 PST 
---
Also, FWIW, none of the evergreen (and possibly some of the r7xx opcodes that
are different from r6xx) are covered in the code in question.

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


[Bug 33078] Sauerbraten refuses to start

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

--- Comment #2 from barisurum at gmail.com 2011-01-14 13:25:05 PST ---
(In reply to comment #1)
> That does look like an SDL issue. What version of it are you using? Does
> setting the environment variable SDL_VIDEO_X11_XRANDR=1 help?

Nope.. the result is the same.



No subject

2011-01-14 Thread
[12.618] (EE) open /dev/fb0: No such file or directory
[12.618] (EE) No devices detected.
[12.618] 
Fatal server error:
[12.618] no screens found
[12.618]

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


[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #2 from Vinson Lee  2011-01-14 13:54:41 PST ---
I disabled the V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR case to work
around the current build failure.

Please revert this commit when appropriate.


commit 4c6d6dd8fc61239ac2008267f3c5cf76f4124d11
Author: Vinson Lee 
Date:   Fri Jan 14 13:47:37 2011 -0800

r600g: Disable V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR case.

The usage of macro V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR was
introduced by commit 323ef3a1f07ba4333dadebab571ddcd49d95f45c but the
macro is undefined. Disable this case to fix the build for now.

diff --git a/src/gallium/drivers/r600/r600_asm.c
b/src/gallium/drivers/r600/r600_asm.c
index 2d0d277..3430fbb 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -79,7 +79,9 @@ static inline unsigned int r600_bc_get_num_operands(struct
r600_bc_alu *alu)
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT:
+#if 0
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR:
+#endif
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
return 1;

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


[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

Alex Deucher  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Alex Deucher  2011-01-14 14:53:01 PST 
---
fixed:
9dfc68314de575ba7f0f936d5d0c9efe117fd535
634dece281c6f7eb3bb210fdd386c2afe8f7e895

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


[Bug 26712] Weird X display upon hibernating

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


Andrew Morton  changed:

   What|Removed |Added

 CC||akpm at linux-foundation.org
  Component|Other   |Video(DRI - non Intel)
 AssignedTo|other_other at kernel-bugs.osd |drivers_video-dri at 
kernel-bu
   |l.org   |gs.osdl.org
Product|Other   |Drivers
 Regression|No  |Yes




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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26712] Weird X display upon hibernating

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





--- Comment #1 from Andrew Morton   2011-01-14 
23:51:25 ---
I assumed that this regression is also in 2.6.38, and assigned it to DRI.

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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

--- Comment #4 from Christian K?nig  2011-01-14 
16:47:23 PST ---
Sorry, that was my fault. I auto-generated the missing case switches with a
regular expression and didn't noticed that this is an evergreen only
instruction. I promise to at least check if it's compiling before pushing the
next time.

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


[Bug 33139] New: Radeon HD 5750 locks up when using 3D apps with r600g

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

   Summary: Radeon HD 5750 locks up when using 3D apps with r600g
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: dawitbro at sbcglobal.net


Created an attachment (id=42065)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42065)
Backtrace of /usr/bin/X once GPU was locked

Overview:

I have recently begun experimenting with r600g on my HD 5750 (JUNIPER) card to
see if I can get it to work.  My distribution is Debian, and the Debian X
Strike Force is not currently providing r600g (only r600c) so I have been
packaging my own builds.

I have found that DOSBox, which I configure to use OpenGL 2D acceleration, runs
fine with r600g.  However, any program which uses 3D causes my GPU to lock up. 
I do not think I was able to obtain any useful debugging info when I was able
to SSH into the locked up machine, but I tried; the most recent version of Mesa
I tried locks the kernel, so I cannot even use SSH once the GPU locks. 
(Details below.)

  Steps to reproduce:

1.  Stop X and install r600g Mesa drivers.
2.  Start X and run a program using 3D (prboom, torcs, etc.)

  Actual results:

Both prboom and torcs will run their menuing system without crashing.  Starting
an actual game in prboom will work for a few moments, then lock the GPU. 
Attempting to start the game in torcs causes the GPU to lock before the first
3D frame is rendered (the final text message, "Get Ready," does display... then
it locks).

  Expected results:

Eventually, I hope r600g will work without locking the GPU.  Currently, r600c
works fine on this hardware, other than the fact that classic is clearly
inferior in performance to gallium at this point.  (See below.)

  System info:

GPU:  Powercolor Radeon HD 5750 SCS 1GB

Kernel:  2.6.37 + cherry-pick drm-core-next 17db7042 (Jan. 4, 2011)

Linux distribution:
Debian unstable

Machine:  self-built
AMD Phenom II X4 955
MSI 790FX-GD70 motherboard
4x2GB DDR3 1600

Software versions:
libdrm-2.4.23 (built against kernel source listed above)

mesa:  7.10-devel at commit ada9c78 (Jan. 4, 2011)
   7.11-devel at commit 69191d4 (Jan. 9, 2011)

xorg-server-1.9.3.901

xf86-video-ati-6.13.99 at commit f9bbb26 (Dec. 3, 2010)


  Additional Information:

This bug may be related to one or more of the following fdo bugs:

29978  HD 3200 locks up with r600c and r600g
31530  HD 5750 has problems with r600g
31532  r600g lockup (no hardware mentioned)

With the Mesa I pulled from git on Jan. 4 (see above), I was able to SSH to the
GPU-locked machine and try to debug with 'gdb'.  I was able to get a backtrace
on /usr/bin/X, but not on the program causing the lock.  I doubt this is
useful, but I am attaching it anyway.

Strangely, if I used 'strace' to attach to 'prboom' by process ID, it would
prevent the GPU from hanging!  (This is why I was able to comment above that I
know that r600g performance is superior to r600c on this hardware; with
'strace' attached, nothing I tried in 'prboom' would make the GPU lock!)  I
tried building a debug package of 'prboom', but this (instead of the stripped
binary provided by Debian) also would not lock the GPU.

Using 'torcs' always locks the GPU, and trying to attach to its PID with 'gdb'
provides no information:  it simply becomes unresponsive.  (Sorry.  I tried
everything I could, but maybe I'm doing it wrong.)  I was able to get 'strace'
to work, but once the GPU (and kernel) locked only garbage was send to the
file.  The machine runs 'fsck' after I reboot because it was not properly
shutdown, so the garbage might just be random bits from the hard disk.  That
file is 8.6 MB raw, and truncating the garbage and gzip'ing results in
something just over 300 KB.  I don't think this bugzilla will take something
that big, but if someone wants to see it I can attach it to an email.

The Mesa I pulled on Jan. 9 causes the kernel to hang once the GPU locks, so I
can't even attempt to use 'gdb'; I can get 'strace' going, but the output after
the lockup is random garbage.  (Please, if someone knows tricks for getting
useful debugging info when a GPU locks, let me know.  It's very frustrating
knowing I'm this close to superior Mesa performance, and I hate going back to
r600c now that I've seen what r600g can do!!!)

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


[Bug 33131] r600_asm.c:82: error: ‘V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR’ undeclared

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

Vinson Lee  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Vinson Lee  2011-01-14 19:14:41 PST ---
mesa: 4620de7eeae18f313436936088d235a99b7bc11d (master)

Verified fixed.

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


[Bug 33139] Radeon HD 5750 locks up when using 3D apps with r600g

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

--- Comment #1 from Dave Witbrodt  2011-01-14 
19:20:47 PST ---
Created an attachment (id=42066)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42066)
dmesg from kernel 2.6.37 (with cherry-pick mentioned in report)

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


[Bug 33139] Radeon HD 5750 locks up when using 3D apps with r600g

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

--- Comment #2 from Dave Witbrodt  2011-01-14 
19:22:21 PST ---
Created an attachment (id=42067)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=42067)
Xorg.0.log with r600c

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