[Mesa-dev] [Mesa-stable] [PATCH] winsys/radeon: fix nop packet padding for hawaii

Andreas Boll andreas.boll.dev at gmail.com
Fri Aug 1 08:12:06 PDT 2014


2014-08-01 16:50 GMT+02:00 Michel Dänzer <michel at daenzer.net>:
> On 01.08.2014 23:46, Andreas Boll wrote:
>> 2014-08-01 16:32 GMT+02:00 Michel Dänzer <michel at daenzer.net>:
>>> On 01.08.2014 22:09, Andreas Boll wrote:
>>>> The initial firmware for hawaii does not support type3 nop packet.
>>>> Detect the new hawaii firmware with query RADEON_INFO_ACCEL_WORKING2.
>>>> If the returned value is 2, then the new firmware is used.
>>>>
>>>> This patch uses type2 for the old firmware and type3 for the new firmware.
>>>>
>>>> It fixes the cases when the old firmware is used and the user wants to
>>>> manually enable acceleration.
>>>> The two possible scenarios are:
>>>>  - the kernel has no support for the new firmware.
>>>>  - the kernel has support for the new firmware but only the old firmware
>>>>    is available.
>>>>
>>>> Cc: mesa-stable at lists.freedesktop.org
>>>> Cc: Alex Deucher <alexander.deucher at amd.com>
>>>> Cc: Jérôme Glisse <jglisse at redhat.com>
>>>> Signed-off-by: Andreas Boll <andreas.boll.dev at gmail.com>
>>>> ---
>>>>
>>>> Unfortunately I can't test this patch myself since I don't own a hawaii card.
>>>> So I'd need someone to test this patch on kernel >= 3.16-rc7.
>>>> This patch would bring us one step further for hawaii acceleration on kernel 1.16.
>>>
>>> It's not enough though, e.g. the kernel itself was also using the wrong
>>> NOP packets.
>>>
>>> I think it would be better if the radeon winsys refused to initialize on
>>> Hawaii if RADEON_INFO_ACCEL_WORKING2 doesn't return 2, just like the
>>> Xorg driver.
>>>
>>
>> We could fix 3.16 and stable to use type2 in the kernel itself.
>
> Right, but once you've backported all the fixes, you can backport the
> RADEON_INFO_ACCEL_WORKING2 change as well.
>

RADEON_INFO_ACCEL_WORKING2 in the kernel depends on the new firmware support,
which are rather big patches to backport.

Another idea would be to return value 2 for RADEON_INFO_ACCEL_WORKING2
if the kernel uses type2 itself
and return 3 if the new firmware is used.

With this approach we can use type2 in kernel and userspace for stable
kernel (<= 3.16) + stable mesa 10.2
and use type3 for newer kernels (>= 3.17) with the new firmware loaded.
We could even go further and enable acceleration by default if the
kernel uses type2 (ACCEL_WORKING2 >= 2) itself.


More information about the mesa-dev mailing list