drm/vc4: Skip ULPS latching when we're in that ULPS state already.
Subsystems (5)
PATCH 1/2 drm/vc4: Skip ULPS latching when we're in that ULPS state already.
It seems that trying to go from unlatched to unlatched will time out waiting for STOP, and we can just skip that.
--- drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/vc4/vc4_dsi.c +5 -0
@@ -753,6 +753,11 @@ static void vc4_dsi_ulps(struct vc4_dsi *dsi, bool ulps) (dsi->lanes >2 ?DSI1_STAT_PHY_D2_STOP :0 ) | (dsi->lanes > 3 ? DSI1_STAT_PHY_D3_STOP : 0));int ret; +bool ulps_currently_enabled = (DSI_PORT_READ (PHY_AFEC0 ) & +DSI_PORT_BIT (PHY_AFEC0_LATCH_ULPS )); + +if (ulps == ulps_currently_enabled) +return ;DSI_PORT_WRITE (STAT , stat_ulps);DSI_PORT_WRITE (PHYC ,DSI_PORT_READ (PHYC ) | phyc_ulps);
Signature · 1 line
2.15.0
PATCH 2/2 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.
--- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +1 -13
@@ -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 ; }
Signature · 6 lines
2.15.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel.
Quoted 8 lines · On Tue, 31 Oct 2017 12:32:58 -0700 Eric Anholt <[email protected]> wrote:
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 Eric Anholt <[email protected]>Fixes 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")
Quoted 36 lines
--- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +1
-13@@ -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 ; }
Signature · 7 lines
Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel.
In reply to Eric AnholtQuoted 11 lines · Eric Anholt
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 Eric Anholt <[email protected]>Fixes 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")--- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
Did you want to take this along with patch 1 through drm-misc-next? If so:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel.
Quoted 14 lines · Thierry Reding
[ Unknown signature status ]
Quoted 11 lines · Eric Anholt
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 Eric Anholt <[email protected]>Fixes 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")--- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
Quoted 4 lines
Did you want to take this along with patch 1 through drm-misc-next? If so:
Acked-by Thierry Reding <[email protected]>
I've pushed both to drm-misc-next. Thanks!
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · On Tue, 31 Oct 2017 12:32:57 -0700 Eric Anholt <[email protected]> wrote:
It seems that trying to go from unlatched to unlatched will time out waiting for STOP, and we can just skip that.
Signed-off-by Eric Anholt <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/vc4/vc4_dsi.c +5
-0@@ -753,6 +753,11 @@ static void vc4_dsi_ulps(struct vc4_dsi *dsi, bool ulps) (dsi->lanes >2 ?DSI1_STAT_PHY_D2_STOP :0 ) | (dsi->lanes > 3 ? DSI1_STAT_PHY_D3_STOP : 0));int ret; +bool ulps_currently_enabled = (DSI_PORT_READ (PHY_AFEC0 ) & +DSI_PORT_BIT (PHY_AFEC0_LATCH_ULPS )); + +if (ulps == ulps_currently_enabled) +return ;DSI_PORT_WRITE (STAT , stat_ulps);DSI_PORT_WRITE (PHYC ,DSI_PORT_READ (PHYC ) | phyc_ulps);
Signature · 7 lines
Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel