[PATCH 05/35] drm/amd/display: Remove byte swapping for dmcub abm config table

Christian König ckoenig.leichtzumerken at gmail.com
Sun Apr 19 16:54:05 UTC 2020


Am 17.04.20 um 17:40 schrieb Harry Wentland:
> On 2020-04-17 8:09 a.m., Christian König wrote:
>> Am 17.04.20 um 12:43 schrieb Michel Dänzer:
>>> On 2020-04-17 11:22 a.m., Christian König wrote:
>>>> Agreed, just wanted to reply as well since I think something is not
>>>> correctly understood here.
>>>>
>>>> The cpu_to_be16() and be16_to_cpu() functions work different depending
>>>> on which architecture/endianess your are.
>>>>
>>>> So they should be a NO-OP on x86 if everything is done right.
>>> The *b*e macros aren't NOPs on little endian architectures like x86,
>>> they are on big endian architectures. Vice versa for the *l*e macros.
>> Yeah, that's what I meant with "if everything is done right" :)
>>
>> I usually can't remember what does what with those functions.
>>
>> Christian.
> I think key here is that dmcub FW is little endian, whereas the old dmcu
> FW was big endian. Hence we had the cpu_to_be conversion here for the
> old dmcu.
>
> Now it looks like we want to reuse the same function for dmcub calls and
> hence need to ensure we're not converting values to big-endian.
>
> The big_endian parameter is specifying the endianness of the FW.
>
> The right approach would be to do cpu_to_be for dmcu and cpu_to_le for
> dmcub.

Thanks for the explanation, that makes it much more clear what should 
happen here.

Christian.

>
> Harry
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list