[patch] off by one in via_video.c

2009-12-27 Thread Dan Carpenter
The check should be >= instead of > or we could potentially
go past the end of the array.

Found by a smatch static checker and compile tested only.

Signed-off-by: Dan Carpenter 

--- orig/drivers/gpu/drm/via/via_video.c2009-12-27 13:19:36.0 
+0200
+++ devel/drivers/gpu/drm/via/via_video.c   2009-12-27 13:19:53.0 
+0200
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device 
 
DRM_DEBUG("\n");
 
-   if (fx->lock > VIA_NR_XVMC_LOCKS)
+   if (fx->lock >= VIA_NR_XVMC_LOCKS)
return -EFAULT;
 
lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: lvds downclocking breaks on G45/thinkpad T500

2009-12-27 Thread ykzhao
On Sun, 2009-12-27 at 01:41 +0800, Andres Freund wrote:
> On Saturday 26 December 2009 17:49:29 Andres Freund wrote:
> > On 2.6.33-rc1 I noticed that the display of my T500 with a G45 reacts very
> > slowly (you can see the text appearing) and colors take a time to
> >  "solidify". I.e. making a white terminal black takes some seconds.
> > ...
> > Anything I can do to help analyzing the issue?
> Thats with recent git checkouts of xorg btw, if thats relevant (which I doubt 
> a bit).
> 
> The missing config is attached now as well.

It will be great if you can open a new bug on
bugs.freedesktop.org(Product=xorg, component = driver/intel) and attach
the following info:
1. add the boot option of "drm.debug=0x06" and attach the output of
dmesg.
2. attach the output of "xrandr -q --verbose"
3. attach the vbios.dump, which can be obtained by using the
following command:
echo 1 > /sys/devices/pci:00/:00:02.0/rom
cat /sys/devices/pci:00/:00:02.0/rom
4. attach the output of Xorg.0.log

Thanks.
   Yakui.
> 
> Andres


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25063] Scaled mode doesn't actually scale

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25063


Gavin Kinsey  changed:

   What|Removed |Added

  Component|DRM/Radeon  |Driver/Radeon
Product|DRI |xorg
Version|DRI CVS |7.4




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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25063] Scaled mode doesn't actually scale

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25063


Gavin Kinsey  changed:

   What|Removed |Added

 OS/Version|All |Linux (All)
   Platform|Other   |x86 (IA32)




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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: lvds downclocking breaks on G45/thinkpad T500

2009-12-27 Thread Andres Freund
On Sunday 27 December 2009 14:10:55 ykzhao wrote:
> On Sun, 2009-12-27 at 01:41 +0800, Andres Freund wrote:
> > On Saturday 26 December 2009 17:49:29 Andres Freund wrote:
> > > On 2.6.33-rc1 I noticed that the display of my T500 with a G45 reacts
> > > very slowly (you can see the text appearing) and colors take a time to
> > > "solidify". I.e. making a white terminal black takes some seconds. ...
> > > Anything I can do to help analyzing the issue?
> >
> > Thats with recent git checkouts of xorg btw, if thats relevant (which I
> > doubt a bit).
> >
> > The missing config is attached now as well.
> 
> It will be great if you can open a new bug on
> bugs.freedesktop.org(Product=xorg, component = driver/intel) and attach
> the following info:
> 1. add the boot option of "drm.debug=0x06" and attach the output of
> dmesg.
> 2. attach the output of "xrandr -q --verbose"
> 3. attach the vbios.dump, which can be obtained by using the
> following command:
> echo 1 > /sys/devices/pci:00/:00:02.0/rom
> cat /sys/devices/pci:00/:00:02.0/rom
> 4. attach the output of Xorg.0.log
Is it relevant whether I boot a kernel with the patch really enabled?

Andres

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25728] PATCH: Correction to drm_mm.c, part of kernel driver

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25728


Bob Gleitsmann  changed:

   What|Removed |Added

 CC||rjgle...@bellsouth.net
   Severity|normal  |critical
  Component|General |DRM/other
Summary|Correction to drm_mm.c, part|PATCH: Correction to
   |of kernel driver|drm_mm.c, part of kernel
   ||driver




--- Comment #2 from Bob Gleitsmann   2009-12-27 
12:16:52 PST ---
The patch appears to fix kernel lockups when running 3D mesa demo apps. 


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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25728] PATCH: Correction to drm_mm.c, part of kernel driver

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25728





--- Comment #3 from Maarten Maathuis   2009-12-27 
12:41:28 PST ---
I've added some CC's, this looks like a bug indeed.


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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25728] PATCH: Correction to drm_mm.c, part of kernel driver

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25728


Dave Airlie  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Comment #4 from Dave Airlie   2009-12-27 12:44:15 
PST ---
I've already posted this to dri-de...@lists.sf.net and it got acked.

e2108eb1f66d77b4af77caf282cab1d47e3f4831

in Linus kernel

commit e2108eb1f66d77b4af77caf282cab1d47e3f4831
Author: Bob Gleitsmann 
Date:   Mon Dec 21 13:52:09 2009 +1000

drm/mm: fix logic for selection of best fit block

This is from bug 25728.

[airlied: I'm just forwarding the patch for review, Thomas, ickle?]

Acked-by: Jerome Glisse 
Acked-by: Thomas Hellstrom 
Signed-off-by: Dave Airlie 


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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25728] PATCH: Correction to drm_mm.c, part of kernel driver

2009-12-27 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=25728


Dave Airlie  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 14910] New: Stable version 2.6.32.2 broke my KMS Radeon setup

2009-12-27 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=14910

   Summary: Stable version 2.6.32.2 broke my KMS Radeon setup
   Product: Drivers
   Version: 2.5
Kernel Version: 2.6.32.2
  Platform: All
OS/Version: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: Video(DRI - non Intel)
AssignedTo: drivers_video-...@kernel-bugs.osdl.org
ReportedBy: r...@sisk.pl
Blocks: 14885
Regression: Yes


Subject: Stable version 2.6.32.2 broke my KMS Radeon setup
Submitter  : Ruud Linders 
Date   : 2009-12-20 12:02
References : http://marc.info/?l=linux-kernel&m=126131105608871&w=4

This entry is being used for tracking a regression from 2.6.32.  Please don't
close it until the problem is fixed in the mainline.

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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 14910] Stable version 2.6.32.2 broke my KMS Radeon setup

2009-12-27 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=14910


Alex Deucher  changed:

   What|Removed |Added

 CC||alexdeuc...@gmail.com




--- Comment #1 from Alex Deucher   2009-12-28 00:39:40 
---
Fix is here:
http://marc.info/?l=dri-devel&m=126137027403059&w=2

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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: lvds downclocking breaks on G45/thinkpad T500

2009-12-27 Thread ykzhao
On Sun, 2009-12-27 at 22:18 +0800, Andres Freund wrote:
> On Sunday 27 December 2009 14:10:55 ykzhao wrote:
> > On Sun, 2009-12-27 at 01:41 +0800, Andres Freund wrote:
> > > On Saturday 26 December 2009 17:49:29 Andres Freund wrote:
> > > > On 2.6.33-rc1 I noticed that the display of my T500 with a G45 reacts
> > > > very slowly (you can see the text appearing) and colors take a time to
> > > > "solidify". I.e. making a white terminal black takes some seconds. ...
> > > > Anything I can do to help analyzing the issue?
> > >
> > > Thats with recent git checkouts of xorg btw, if thats relevant (which I
> > > doubt a bit).
> > >
> > > The missing config is attached now as well.
> > 
> > It will be great if you can open a new bug on
> > bugs.freedesktop.org(Product=xorg, component = driver/intel) and attach
> > the following info:
> > 1. add the boot option of "drm.debug=0x06" and attach the output of
> > dmesg.
> > 2. attach the output of "xrandr -q --verbose"
> > 3. attach the vbios.dump, which can be obtained by using the
> > following command:
> > echo 1 > /sys/devices/pci:00/:00:02.0/rom
> > cat /sys/devices/pci:00/:00:02.0/rom
> > 4. attach the output of Xorg.0.log
> Is it relevant whether I boot a kernel with the patch really enabled?

I don't know whether it is relevant with my patch. In fact my patch only
checks whether the LVDS downclock is found and then set the
corresponding flag. 

Anyway, please open a new bug and I will investigate it.

thanks.
   Yakui
> 
> Andres


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 3/5] drivers/gpu: Correct NULL test

2009-12-27 Thread Julia Lawall
From: Julia Lawall 

Test the just-allocated value for NULL rather than some other value.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// 
@@
expression x,y;
statement S;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
-   y
+   x
   == NULL)
 S
)
// 

Signed-off-by: Julia Lawall 

---
 drivers/gpu/drm/nouveau/nouveau_grctx.c|4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx.c 
b/drivers/gpu/drm/nouveau/nouveau_grctx.c
index 419f4c2..c7ebec6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_grctx.c
+++ b/drivers/gpu/drm/nouveau/nouveau_grctx.c
@@ -97,8 +97,8 @@ nouveau_grctx_prog_load(struct drm_device *dev)
}
 
pgraph->ctxvals = kmalloc(fw->size, GFP_KERNEL);
-   if (!pgraph->ctxprog) {
-   NV_ERROR(dev, "OOM copying ctxprog\n");
+   if (!pgraph->ctxvals) {
+   NV_ERROR(dev, "OOM copying ctxvals\n");
release_firmware(fw);
nouveau_grctx_fini(dev);
return -ENOMEM;

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel