2011-02-20 10:24:25

by Jörg Otte

[permalink] [raw]
Subject: v2.6.38-rc5: drm-radeon regression

Reaching the desktop in v2.6.38-rc5 I only see the background.
No Icon,widgets,windows etc. I am under the impression
that everything is there - but invisible.

HW is Thinkpad T43 with Mobility Radeon X300 graphic.

Switching to the command line I see drm:radeon
displaying permanently :
drm:radeon_cs_ioctl error invalid command stream
drm:r100_cd_track_check no buffer for AA resolve buffer

I bisected the problem to:

fff1ce4dc6113b6fdc4e3a815ca5fd229408f8ef is the first bad commit
commit fff1ce4dc6113b6fdc4e3a815ca5fd229408f8ef
Author: Marek Olšák <[email protected]>
Date: Mon Feb 14 01:01:10 2011 +0100

drm/radeon/kms: check AA resolve registers on r300

This is an important security fix because we allowed arbitrary values
to be passed to AARESOLVE_OFFSET. This also puts the right buffer address
in the register.

Signed-off-by: Marek Olšák <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>

:040000 040000 c3a86a556f8c4ee1313bdc12e1f86cb44bacb742
5b872a00532f36c0514790223375f1377a588501 M drivers


Attachments:
xorg-bad (44.76 kB)

2011-02-20 22:04:11

by David Airlie

[permalink] [raw]
Subject: Re: v2.6.38-rc5: drm-radeon regression

On Sun, 2011-02-20 at 11:24 +0100, Jörg Otte wrote:
> Reaching the desktop in v2.6.38-rc5 I only see the background.
> No Icon,widgets,windows etc. I am under the impression
> that everything is there - but invisible.

Does this help?

>From 9f159e5f1fd56409718e14913f0fef5fedc09fc8 Mon Sep 17 00:00:00 2001
From: Dave Airlie <[email protected]>
Date: Mon, 21 Feb 2011 07:56:04 +1000
Subject: [PATCH] drm/radeon: fix regression with AA resolve checking

Some userspaces can emit a whole packet without disabling AA resolve
by the looks of it, so we have to deal with them.

Signed-off-by: Dave Airlie <[email protected]>
---
drivers/gpu/drm/radeon/r100.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r100.c
b/drivers/gpu/drm/radeon/r100.c
index 56deae5..8b0d117 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3490,7 +3490,7 @@ void r100_cs_track_clear(struct radeon_device
*rdev, struct r100_cs_track *track
track->num_texture = 16;
track->maxy = 4096;
track->separate_cube = 0;
- track->aaresolve = true;
+ track->aaresolve = false;
track->aa.robj = NULL;
}

--
1.7.3.4


2011-02-21 15:20:26

by Jörg Otte

[permalink] [raw]
Subject: Re: v2.6.38-rc5: drm-radeon regression

2011/2/20 Dave Airlie <[email protected]>:
> On Sun, 2011-02-20 at 11:24 +0100, J?rg Otte wrote:
>> Reaching the desktop in v2.6.38-rc5 I only see the background.
>> No Icon,widgets,windows etc. I am under the impression
>> that everything is there - but invisible.
>
> Does this help?
>
> From 9f159e5f1fd56409718e14913f0fef5fedc09fc8 Mon Sep 17 00:00:00 2001
> From: Dave Airlie <[email protected]>
> Date: Mon, 21 Feb 2011 07:56:04 +1000
> Subject: [PATCH] drm/radeon: fix regression with AA resolve checking
>
> Some userspaces can emit a whole packet without disabling AA resolve
> by the looks of it, so we have to deal with them.
>
> Signed-off-by: Dave Airlie <[email protected]>
> ---
> ?drivers/gpu/drm/radeon/r100.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r100.c
> b/drivers/gpu/drm/radeon/r100.c
> index 56deae5..8b0d117 100644
> --- a/drivers/gpu/drm/radeon/r100.c
> +++ b/drivers/gpu/drm/radeon/r100.c
> @@ -3490,7 +3490,7 @@ void r100_cs_track_clear(struct radeon_device
> *rdev, struct r100_cs_track *track
> ? ? ? ? ? ? ? ?track->num_texture = 16;
> ? ? ? ? ? ? ? ?track->maxy = 4096;
> ? ? ? ? ? ? ? ?track->separate_cube = 0;
> - ? ? ? ? ? ? ? track->aaresolve = true;
> + ? ? ? ? ? ? ? track->aaresolve = false;
> ? ? ? ? ? ? ? ?track->aa.robj = NULL;
> ? ? ? ?}
>

Yes, this works.

Thanks!