drm/radeon: tweak ACCEL_WORKING2 query for hawaii
Subsystems (2)
PATCH 1/1 drm/radeon: tweak ACCEL_WORKING2 query for hawaii
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_kms.c +8 -1
@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE )
Signature · 1 line
1.8.3.1
Quoted 2 lines · Alex Deucher
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
I highly dislike that ? Why about just using nop2 in userspace ?
Quoted 33 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +8
-1@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE )Signature · 6 lines
1.8.3.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Jerome Glisse
Quoted 2 lines · Alex Deucher
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
I highly dislike that ? Why about just using nop2 in userspace ?
How to we tell whether the version of mesa has that change or not? Also, packet2 nops are deprecated so may not work in future firmwares if we end up updating them again.
Alex
Quoted 34 lines
Quoted 34 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +8
-2@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE ) --1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Jerome Glisse
Quoted 2 lines · Alex Deucher
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
I highly dislike that ? Why about just using nop2 in userspace ?
How to we tell whether the version of mesa has that change or not?
You do not need to know that in kernel, all that is needed is for userspace to test 3.16 kernel as it's all that is needed to get accel working. So i would say enable accel on ddx now because truly if someone update its ddx then it must have updated mesa too.
Quoted 2 lines
Also, packet2 nops are deprecated so may not work in future firmwares if we end up updating them again.
I do not want to go into discussion on closed source firmware, if they offer no API stability i would consider that utterly broken.
Quoted 37 lines
Alex
Quoted 34 lines
Quoted 34 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +8
-2@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE ) --1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 29.07.2014 um 19:10 schrieb Jerome Glisse:
Quoted 12 lines · Alex Deucher
Quoted 6 lines · Jerome Glisse
Quoted 4 lines · Alex Deucher
Quoted 2 lines
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
I highly dislike that ? Why about just using nop2 in userspace ?
How to we tell whether the version of mesa has that change or not?
You do not need to know that in kernel, all that is needed is for userspace to test 3.16 kernel as it's all that is needed to get accel working. So i would say enable accel on ddx now because truly if someone update its ddx then it must have updated mesa too.
Quoted 4 lines
Quoted 2 lines
Also, packet2 nops are deprecated so may not work in future firmwares if we end up updating them again.
I do not want to go into discussion on closed source firmware, if they offer no API stability i would consider that utterly broken.e
And that's exactly what the firmware guys actually do here, they tell us that nop2 packets are not part of the API any more. The API between different hardware generations was never stable in the first place.
Christian.
Quoted 39 lines
Quoted 31 lines
Alex
Quoted 28 lines
Quoted 28 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +8
-2@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE ) --1.8.3.1
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 15 lines · Jerome Glisse
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Jerome Glisse
Quoted 2 lines · Alex Deucher
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
I highly dislike that ? Why about just using nop2 in userspace ?
How to we tell whether the version of mesa has that change or not?
You do not need to know that in kernel, all that is needed is for userspace to test 3.16 kernel as it's all that is needed to get accel working. So i would say enable accel on ddx now because truly if someone update its ddx then it must have updated mesa too.
Quoted 6 lines
Quoted 2 lines
Also, packet2 nops are deprecated so may not work in future firmwares if we end up updating them again.
I do not want to go into discussion on closed source firmware, if they offer no API stability i would consider that utterly broken.
It is stable within a generation. The packet 2 nops were deprecated for CI which is way we switched all the CI parts to use the new packet 3 nop. I must have inadvertently grabbed an old version of the hawaii firmware when I initially released it.
Alex
Quoted 37 lines
Quoted 37 lines
Alex
Quoted 34 lines
Quoted 34 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_kms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_kms.c +8
-2@@ -254,7 +254,14 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file }break ;case RADEON_INFO_ACCEL_WORKING2 : - *value = rdev->accel_working; +if (rdev->family ==CHIP_HAWAII ) { +if (rdev->accel_working && rdev->new_fw) + *value =2 ; +else + *value =0 ; + }else { + *value = rdev->accel_working; + }break ;case RADEON_INFO_TILING_CONFIG :if (rdev->family >=CHIP_BONAIRE ) --1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Jerome Glisse
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Jerome Glisse
Quoted 2 lines · Alex Deucher
Return 2 so we can be sure the kernel has the necessary changes for acceleration to work.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
I highly dislike that ? Why about just using nop2 in userspace ?
How to we tell whether the version of mesa has that change or not?
You do not need to know that in kernel, all that is needed is for userspace to test 3.16 kernel as it's all that is needed to get accel working.
What if the Hawaii fixes are backported to older kernels?
Quoted 2 lines
So i would say enable accel on ddx now because truly if someone update its ddx then it must have updated mesa too.
There is no such guarantee.
This looks like a pretty good solution to me. Please add a check for this in the Gallium winsys code as well for the benefit of non-X apps such as Wayland compositors.
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer