All of lore.kernel.org
 help / color / mirror / Atom feed
* endianness of rlc buffers (SI)
@ 2013-10-22  0:26 Sylvain BERTRAND
  2013-10-22  5:13 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Sylvain BERTRAND @ 2013-10-22  0:26 UTC (permalink / raw)
  To: dri-devel

Hi,

commit 555b1b651acf44bf27ebbb04235d38a8fd2d58dc (drm-fixes-3.12)

evergreen.c, SI code path, line 4045 and 4046 shouldn't be swapped?
Should cpu_to_le32 be used?

Basically, is the endianness enforcement right for the rlc BOs?
Or is there a bit somewhere to switch the RLC to host
endianness? Or the kmap is swapping dwords?

regards,

-- 
Sylvain

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: endianness of rlc buffers (SI)
  2013-10-22  0:26 endianness of rlc buffers (SI) Sylvain BERTRAND
@ 2013-10-22  5:13 ` Alex Deucher
  2013-10-22 11:43   ` Sylvain BERTRAND
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2013-10-22  5:13 UTC (permalink / raw)
  To: Sylvain BERTRAND; +Cc: Maling list - DRI developers

On Mon, Oct 21, 2013 at 8:26 PM, Sylvain BERTRAND <sylware@legeek.net> wrote:
> Hi,
>
> commit 555b1b651acf44bf27ebbb04235d38a8fd2d58dc (drm-fixes-3.12)
>
> evergreen.c, SI code path, line 4045 and 4046 shouldn't be swapped?
> Should cpu_to_le32 be used?
>
> Basically, is the endianness enforcement right for the rlc BOs?
> Or is there a bit somewhere to switch the RLC to host
> endianness? Or the kmap is swapping dwords?

The rlc buffers should be little endian.  They will need to be swapped
on big endian systems.

Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: endianness of rlc buffers (SI)
  2013-10-22  5:13 ` Alex Deucher
@ 2013-10-22 11:43   ` Sylvain BERTRAND
  2013-10-22 22:59     ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Sylvain BERTRAND @ 2013-10-22 11:43 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Maling list - DRI developers

>> commit 555b1b651acf44bf27ebbb04235d38a8fd2d58dc (drm-fixes-3.12)
>>
>> evergreen.c, SI code path, line 4045 and 4046 shouldn't be swapped?
>> Should cpu_to_le32 be used?
>>
>> Basically, is the endianness enforcement right for the rlc BOs?
>> Or is there a bit somewhere to switch the RLC to host
>> endianness? Or the kmap is swapping dwords?
> 
> The rlc buffers should be little endian.  They will need to be swapped
> on big endian systems.

Right, then cpu_to_le32 should be used.

Still for endianness, upper dword is written first (line 4045) and
lower dword is written second (line 4046): Should the lower dword be
written first then second the upper dword if we want little endian?
Or maybe in that specific case, the rlc expect the upper dword first?

-- 
Sylvain

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: endianness of rlc buffers (SI)
  2013-10-22 11:43   ` Sylvain BERTRAND
@ 2013-10-22 22:59     ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2013-10-22 22:59 UTC (permalink / raw)
  To: Sylvain BERTRAND; +Cc: Maling list - DRI developers

On Tue, Oct 22, 2013 at 7:43 AM, Sylvain BERTRAND <sylware@legeek.net> wrote:
>>> commit 555b1b651acf44bf27ebbb04235d38a8fd2d58dc (drm-fixes-3.12)
>>>
>>> evergreen.c, SI code path, line 4045 and 4046 shouldn't be swapped?
>>> Should cpu_to_le32 be used?
>>>
>>> Basically, is the endianness enforcement right for the rlc BOs?
>>> Or is there a bit somewhere to switch the RLC to host
>>> endianness? Or the kmap is swapping dwords?
>>
>> The rlc buffers should be little endian.  They will need to be swapped
>> on big endian systems.
>
> Right, then cpu_to_le32 should be used.
>
> Still for endianness, upper dword is written first (line 4045) and
> lower dword is written second (line 4046): Should the lower dword be
> written first then second the upper dword if we want little endian?
> Or maybe in that specific case, the rlc expect the upper dword first?

The rlc expects the upper 32 bits of the address in the lowest dword,
followed by the lower 32 bits, followed by the buffer size.

Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-22 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  0:26 endianness of rlc buffers (SI) Sylvain BERTRAND
2013-10-22  5:13 ` Alex Deucher
2013-10-22 11:43   ` Sylvain BERTRAND
2013-10-22 22:59     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.