linux/drivers/gpu/drm/bridge/synopsys
Brian Norris fd2cb71bbc drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write()
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 this function could be done more easily without memcpy(), but
the unaligned "remainder" case is a little hard to do without
potentially overrunning 'tx_buf', so I just applied the same solution in
all cases (memcpy() + le32_to_cpu()).

Tested only on a little-endian system.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180109203248.139249-2-briannorris@chromium.org
2018-01-16 12:21:52 +05:30
..
dw-hdmi-ahb-audio.c drm: bridge: dw-hdmi: constify snd_pcm_ops structures 2017-08-09 15:57:29 +05:30
dw-hdmi-audio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dw-hdmi-cec.c drm/bridge: dw-hdmi: add cec driver 2017-08-07 16:18:53 +05:30
dw-hdmi-cec.h drm/bridge: dw-hdmi: add cec driver 2017-08-07 16:18:53 +05:30
dw-hdmi-i2s-audio.c drm: dw-hdmi-i2s: add missing company name on Copyright 2017-08-07 09:43:08 +05:30
dw-hdmi.c Merge tag 'drm-misc-next-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2017-12-04 05:42:49 +10:00
dw-hdmi.h drm/bridge: dw-hdmi: remove CEC engine register definitions 2017-08-07 16:19:13 +05:30
dw-mipi-dsi.c drm/bridge/synopsys: dsi: handle endianness correctly in dw_mipi_dsi_write() 2018-01-16 12:21:52 +05:30
Kconfig drm/bridge: dw-hdmi: add cec driver 2017-08-07 16:18:53 +05:30
Makefile drm/bridge: dw-hdmi: add cec driver 2017-08-07 16:18:53 +05:30