* [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already. @ 2017-10-31 19:32 Eric Anholt 2017-10-31 19:32 ` [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel Eric Anholt 2018-04-30 9:03 ` [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Boris Brezillon 0 siblings, 2 replies; 6+ messages in thread From: Eric Anholt @ 2017-10-31 19:32 UTC (permalink / raw) To: dri-devel, Thierry Reding; +Cc: linux-kernel, Eric Anholt 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 <eric@anholt.net> --- drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 94085f8bcd68..8aa897835118 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -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); -- 2.15.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel. 2017-10-31 19:32 [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Eric Anholt @ 2017-10-31 19:32 ` Eric Anholt 2018-04-30 9:04 ` Boris Brezillon 2018-04-30 9:27 ` Thierry Reding 2018-04-30 9:03 ` [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Boris Brezillon 1 sibling, 2 replies; 6+ messages in thread From: Eric Anholt @ 2017-10-31 19:32 UTC (permalink / raw) To: dri-devel, Thierry Reding; +Cc: linux-kernel, 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 <eric@anholt.net> 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(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index d964d454e4ae..2c9c9722734f 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -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; } -- 2.15.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel. 2017-10-31 19:32 ` [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel Eric Anholt @ 2018-04-30 9:04 ` Boris Brezillon 2018-04-30 9:27 ` Thierry Reding 1 sibling, 0 replies; 6+ messages in thread From: Boris Brezillon @ 2018-04-30 9:04 UTC (permalink / raw) To: Eric Anholt; +Cc: dri-devel, Thierry Reding, linux-kernel On Tue, 31 Oct 2017 12:32:58 -0700 Eric Anholt <eric@anholt.net> 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 <eric@anholt.net> > Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.") Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> > --- > drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > index d964d454e4ae..2c9c9722734f 100644 > --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > @@ -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; > } -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel. 2017-10-31 19:32 ` [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel Eric Anholt 2018-04-30 9:04 ` Boris Brezillon @ 2018-04-30 9:27 ` Thierry Reding 2018-04-30 21:04 ` Eric Anholt 1 sibling, 1 reply; 6+ messages in thread From: Thierry Reding @ 2018-04-30 9:27 UTC (permalink / raw) To: Eric Anholt; +Cc: dri-devel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 748 bytes --] On Tue, Oct 31, 2017 at 12:32:58PM -0700, Eric Anholt 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 <eric@anholt.net> > 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: Acked-by: Thierry Reding <treding@nvidia.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel. 2018-04-30 9:27 ` Thierry Reding @ 2018-04-30 21:04 ` Eric Anholt 0 siblings, 0 replies; 6+ messages in thread From: Eric Anholt @ 2018-04-30 21:04 UTC (permalink / raw) To: Thierry Reding; +Cc: dri-devel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 901 bytes --] Thierry Reding <thierry.reding@gmail.com> writes: > [ Unknown signature status ] > On Tue, Oct 31, 2017 at 12:32:58PM -0700, Eric Anholt 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 <eric@anholt.net> >> 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: > > Acked-by: Thierry Reding <treding@nvidia.com> I've pushed both to drm-misc-next. Thanks! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already. 2017-10-31 19:32 [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Eric Anholt 2017-10-31 19:32 ` [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel Eric Anholt @ 2018-04-30 9:03 ` Boris Brezillon 1 sibling, 0 replies; 6+ messages in thread From: Boris Brezillon @ 2018-04-30 9:03 UTC (permalink / raw) To: Eric Anholt; +Cc: dri-devel, Thierry Reding, linux-kernel On Tue, 31 Oct 2017 12:32:57 -0700 Eric Anholt <eric@anholt.net> 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 <eric@anholt.net> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> > --- > drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c > index 94085f8bcd68..8aa897835118 100644 > --- a/drivers/gpu/drm/vc4/vc4_dsi.c > +++ b/drivers/gpu/drm/vc4/vc4_dsi.c > @@ -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); -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-30 21:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-10-31 19:32 [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Eric Anholt 2017-10-31 19:32 ` [PATCH 2/2] drm/panel: Enable DSI transactions on the RPi panel Eric Anholt 2018-04-30 9:04 ` Boris Brezillon 2018-04-30 9:27 ` Thierry Reding 2018-04-30 21:04 ` Eric Anholt 2018-04-30 9:03 ` [PATCH 1/2] drm/vc4: Skip ULPS latching when we're in that ULPS state already Boris Brezillon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).