Commit 3481fe76 authored by Eric Anholt's avatar Eric Anholt

drm/panel: Enable DSI transactions on the RPi panel.

It turns out that I had just mistaken what type of write the register
writes were supposed to be, using DCS instead of generic long writes.

Switching to transactions instead of using the atmel as a bridge also
seems to resolve the sparkling pixels problem I've had.
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Fixes: 2f733d61 ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")
Link: https://patchwork.freedesktop.org/patch/msgid/20171031193258.17373-2-eric@anholt.netReviewed-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
parent 1825067e
......@@ -238,12 +238,6 @@ static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts,
static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val)
{
#if 0
/* The firmware uses LP DSI transactions like this to bring up
* the hardware, which should be faster than using I2C to then
* pass to the Toshiba. However, I was unable to get it to
* work.
*/
u8 msg[] = {
reg,
reg >> 8,
......@@ -253,13 +247,7 @@ static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val)
val >> 24,
};
mipi_dsi_dcs_write_buffer(ts->dsi, msg, sizeof(msg));
#else
rpi_touchscreen_i2c_write(ts, REG_WR_ADDRH, reg >> 8);
rpi_touchscreen_i2c_write(ts, REG_WR_ADDRL, reg);
rpi_touchscreen_i2c_write(ts, REG_WRITEH, val >> 8);
rpi_touchscreen_i2c_write(ts, REG_WRITEL, val);
#endif
mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg));
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment