Re: [PATCH v2 2/2] drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write()

2018-01-16 Thread Brian Norris
On Tue, Jan 16, 2018 at 12:22:52PM +0530, Archit Taneja wrote: > On 01/10/2018 08:03 PM, Andrzej Hajda wrote: > >On 09.01.2018 21:32, Brian Norris wrote: > >>@@ -386,9 +386,9 @@ static int dw_mipi_dsi_write(struct dw_mipi_dsi *dsi, > >>} > >>} > >>- remainder = 0; > >>- memcpy(&

Re: [PATCH v2 2/2] drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write()

2018-01-15 Thread Archit Taneja
On 01/10/2018 08:03 PM, Andrzej Hajda wrote: On 09.01.2018 21:32, Brian Norris wrote: We're filling the "remainder" word with little-endian data, then writing it out to IO registers with endian-correcting writel(). That probably won't work on big-endian systems. Let's mark the "remainder" var

Re: [PATCH v2 2/2] drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write()

2018-01-10 Thread Andrzej Hajda
On 09.01.2018 21:32, Brian Norris wrote: > We're filling the "remainder" word with little-endian data, then writing > it out to IO registers with endian-correcting writel(). That probably > won't work on big-endian systems. > > Let's mark the "remainder" variable as LE32 (since we fill it with > me

[PATCH v2 2/2] drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write()

2018-01-09 Thread Brian Norris
We're filling the "remainder" word with little-endian data, then writing it out to IO registers with endian-correcting writel(). That probably won't work on big-endian systems. Let's mark the "remainder" variable as LE32 (since we fill it with memcpy()) and do the swapping explicitly. Some of thi