diff mbox

drm/radeon: fix cursor corruption on aruba and newer

Message ID 1358801403-4726-1-git-send-email-j.glisse@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jerome Glisse Jan. 21, 2013, 8:50 p.m. UTC
From: Jerome Glisse <jglisse@redhat.com>

Aruba and newer gpu does not need the avivo cursor work around,
quite the opposite this work around lead to corruption.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
---
 drivers/gpu/drm/radeon/radeon_cursor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Deucher Jan. 21, 2013, 9:22 p.m. UTC | #1
On Mon, Jan 21, 2013 at 3:50 PM,  <j.glisse@gmail.com> wrote:
> From: Jerome Glisse <jglisse@redhat.com>
>
> Aruba and newer gpu does not need the avivo cursor work around,
> quite the opposite this work around lead to corruption.
>
> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
> ---
>  drivers/gpu/drm/radeon/radeon_cursor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
> index ad6df62..30f71cc 100644
> --- a/drivers/gpu/drm/radeon/radeon_cursor.c
> +++ b/drivers/gpu/drm/radeon/radeon_cursor.c
> @@ -241,7 +241,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
>                 y = 0;
>         }
>
> -       if (ASIC_IS_AVIVO(rdev)) {
> +       if (ASIC_IS_AVIVO(rdev) && (rdev->family < CHIP_ARUBA)) {

I believe these issues were fixed on DCE6, but I'm verifying now.  SI
is dce6 as well so the check here should probably be:

if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) {

Alex

>                 int i = 0;
>                 struct drm_crtc *crtc_p;
>
> --
> 1.7.11.7
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Jerome Glisse Jan. 21, 2013, 10:08 p.m. UTC | #2
On Mon, Jan 21, 2013 at 4:22 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Mon, Jan 21, 2013 at 3:50 PM,  <j.glisse@gmail.com> wrote:
>> From: Jerome Glisse <jglisse@redhat.com>
>>
>> Aruba and newer gpu does not need the avivo cursor work around,
>> quite the opposite this work around lead to corruption.
>>
>> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
>> ---
>>  drivers/gpu/drm/radeon/radeon_cursor.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
>> index ad6df62..30f71cc 100644
>> --- a/drivers/gpu/drm/radeon/radeon_cursor.c
>> +++ b/drivers/gpu/drm/radeon/radeon_cursor.c
>> @@ -241,7 +241,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
>>                 y = 0;
>>         }
>>
>> -       if (ASIC_IS_AVIVO(rdev)) {
>> +       if (ASIC_IS_AVIVO(rdev) && (rdev->family < CHIP_ARUBA)) {
>
> I believe these issues were fixed on DCE6, but I'm verifying now.  SI
> is dce6 as well so the check here should probably be:
>
> if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) {
>

Yeah i considered that too.

Cheers,
Jerome
Alex Deucher Jan. 21, 2013, 10:10 p.m. UTC | #3
On Mon, Jan 21, 2013 at 4:22 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Mon, Jan 21, 2013 at 3:50 PM,  <j.glisse@gmail.com> wrote:
>> From: Jerome Glisse <jglisse@redhat.com>
>>
>> Aruba and newer gpu does not need the avivo cursor work around,
>> quite the opposite this work around lead to corruption.
>>
>> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
>> ---
>>  drivers/gpu/drm/radeon/radeon_cursor.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
>> index ad6df62..30f71cc 100644
>> --- a/drivers/gpu/drm/radeon/radeon_cursor.c
>> +++ b/drivers/gpu/drm/radeon/radeon_cursor.c
>> @@ -241,7 +241,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
>>                 y = 0;
>>         }
>>
>> -       if (ASIC_IS_AVIVO(rdev)) {
>> +       if (ASIC_IS_AVIVO(rdev) && (rdev->family < CHIP_ARUBA)) {
>
> I believe these issues were fixed on DCE6, but I'm verifying now.  SI
> is dce6 as well so the check here should probably be:
>
> if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) {

Actually, the two patches are identical since:
#define ASIC_IS_DCE6(rdev) ((rdev->family >= CHIP_ARUBA))
but I think the DCE6 variant is clearer.  Once I verify with the hw
team I'll add the patch with that change.

Thanks!

Alex

>
> Alex
>
>>                 int i = 0;
>>                 struct drm_crtc *crtc_p;
>>
>> --
>> 1.7.11.7
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Jerome Glisse Jan. 21, 2013, 10:12 p.m. UTC | #4
On Mon, Jan 21, 2013 at 5:10 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Mon, Jan 21, 2013 at 4:22 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Mon, Jan 21, 2013 at 3:50 PM,  <j.glisse@gmail.com> wrote:
>>> From: Jerome Glisse <jglisse@redhat.com>
>>>
>>> Aruba and newer gpu does not need the avivo cursor work around,
>>> quite the opposite this work around lead to corruption.
>>>
>>> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
>>> ---
>>>  drivers/gpu/drm/radeon/radeon_cursor.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
>>> index ad6df62..30f71cc 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_cursor.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_cursor.c
>>> @@ -241,7 +241,7 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
>>>                 y = 0;
>>>         }
>>>
>>> -       if (ASIC_IS_AVIVO(rdev)) {
>>> +       if (ASIC_IS_AVIVO(rdev) && (rdev->family < CHIP_ARUBA)) {
>>
>> I believe these issues were fixed on DCE6, but I'm verifying now.  SI
>> is dce6 as well so the check here should probably be:
>>
>> if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) {
>
> Actually, the two patches are identical since:
> #define ASIC_IS_DCE6(rdev) ((rdev->family >= CHIP_ARUBA))
> but I think the DCE6 variant is clearer.  Once I verify with the hw
> team I'll add the patch with that change.
>
> Thanks!
>
> Alex
>

Yes they are identical, i meant that i considered doing it that way
but i did not have strong feeling. :)

Cheers,
Jerome
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
index ad6df62..30f71cc 100644
--- a/drivers/gpu/drm/radeon/radeon_cursor.c
+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
@@ -241,7 +241,7 @@  int radeon_crtc_cursor_move(struct drm_crtc *crtc,
 		y = 0;
 	}
 
-	if (ASIC_IS_AVIVO(rdev)) {
+	if (ASIC_IS_AVIVO(rdev) && (rdev->family < CHIP_ARUBA)) {
 		int i = 0;
 		struct drm_crtc *crtc_p;