* [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31
@ 2016-07-22 1:42 Yakir Yang
2016-07-22 1:50 ` [PATCH v2 2/3] drm/bridge: analogix_dp: turn off the panel when eDP need to disable Yakir Yang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yakir Yang @ 2016-07-22 1:42 UTC (permalink / raw)
To: Mark Yao, Inki Dae, Thierry Reding, Heiko Stuebner
Cc: Jingoo Han, Javier Martinez Canillas, Stéphane Marchesin,
Sean Paul, Tomasz Figa, dianders, David Airlie, daniel.vetter,
Krzysztof Kozlowski, emil.l.velikov, Yakir Yang, linux-kernel,
dri-devel, linux-samsung-soc, linux-rockchip
According to page 16 of Sharp LQ123P1JX31 datasheet, we need to add the
missing delay timing. Panel prepare time should be t1 (0.5ms~10ms) plus
t3 (0ms~100ms), and panel enable time should equal to t7 (0ms~50ms), and
panel unprepare time should be t11 (1ms~50ms) plus t12 (500ms~).
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
Changes in v2:
- Add the reviewed tag from Sean.
drivers/gpu/drm/panel/panel-simple.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 85143d1..f178998 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1384,6 +1384,11 @@ static const struct panel_desc sharp_lq123p1jx31 = {
.width = 259,
.height = 173,
},
+ .delay = {
+ .prepare = 110,
+ .enable = 50,
+ .unprepare = 550,
+ },
};
static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/3] drm/bridge: analogix_dp: turn off the panel when eDP need to disable
2016-07-22 1:42 [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Yakir Yang
@ 2016-07-22 1:50 ` Yakir Yang
2016-07-22 1:50 ` [PATCH v2 3/3] drm/bridge: analogix_dp: remove the panel prepare/unprepare in suspend/resume Yakir Yang
2016-08-24 14:29 ` [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Yakir Yang @ 2016-07-22 1:50 UTC (permalink / raw)
To: Mark Yao, Inki Dae, Thierry Reding, Heiko Stuebner
Cc: Jingoo Han, Javier Martinez Canillas, Stéphane Marchesin,
Sean Paul, Tomasz Figa, dianders, David Airlie, daniel.vetter,
Krzysztof Kozlowski, emil.l.velikov, Yakir Yang, linux-kernel,
dri-devel, linux-samsung-soc, linux-rockchip
Some panels (like Sharp LQ123P1JX31) need to be turn off when eDP
controller stop to send valid video signal, otherwhise panel would
go burn in, and keep flicker and flicker.
So it's better to turn off the panel when eDP need to disable, and
we need to turn on the panel in connector->detect() callback, so
that driver would detect panel status rightly.
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
---
Changes in v2:
- s/Panle/Panel/ (Sean)
- Move the drm_panel_xxxx out of a conditional, and throw the return
code away (Sean)
- Add comments about why we need unprepare the panel in bridge_disable (Sean)
- Unprepare the panel at the end of bridge->disable() function.
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 37 ++++++++++++++++------
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 32715da..0ddaf93 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -960,6 +960,17 @@ enum drm_connector_status
analogix_dp_detect(struct drm_connector *connector, bool force)
{
struct analogix_dp_device *dp = to_dp(connector);
+ int ret;
+
+ /*
+ * Panel would prepare for several times here, but don't worry, it
+ * would only enable the hardware at the first prepare time.
+ */
+ if (dp->plat_data->panel) {
+ ret = drm_panel_prepare(dp->plat_data->panel);
+ if (ret)
+ DRM_ERROR("failed to setup the panel ret = %d\n", ret);
+ }
if (analogix_dp_detect_hpd(dp))
return connector_status_disconnected;
@@ -1058,13 +1069,15 @@ static void analogix_dp_bridge_enable(struct drm_bridge *bridge)
static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
{
struct analogix_dp_device *dp = bridge->driver_private;
+ int ret;
if (dp->dpms_mode != DRM_MODE_DPMS_ON)
return;
if (dp->plat_data->panel) {
- if (drm_panel_disable(dp->plat_data->panel)) {
- DRM_ERROR("failed to disable the panel\n");
+ ret = drm_panel_disable(dp->plat_data->panel);
+ if (ret) {
+ DRM_ERROR("failed to disable the panel [%d]\n", ret);
return;
}
}
@@ -1077,6 +1090,19 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
pm_runtime_put_sync(dp->dev);
+ /*
+ * Some panels need to be turn off when eDP controller stop to send
+ * valid video signal, otherwhise panel would go burn in, and keep
+ * flicker and flicker.
+ */
+ if (dp->plat_data->panel) {
+ ret = drm_panel_unprepare(dp->plat_data->panel);
+ if (ret) {
+ DRM_ERROR("failed to turnoff the panel [%d]\n", ret);
+ return;
+ }
+ }
+
dp->dpms_mode = DRM_MODE_DPMS_OFF;
}
@@ -1333,13 +1359,6 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
phy_power_on(dp->phy);
- if (dp->plat_data->panel) {
- if (drm_panel_prepare(dp->plat_data->panel)) {
- DRM_ERROR("failed to setup the panel\n");
- return -EBUSY;
- }
- }
-
analogix_dp_init_dp(dp);
ret = devm_request_threaded_irq(&pdev->dev, dp->irq,
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] drm/bridge: analogix_dp: remove the panel prepare/unprepare in suspend/resume
2016-07-22 1:42 [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Yakir Yang
2016-07-22 1:50 ` [PATCH v2 2/3] drm/bridge: analogix_dp: turn off the panel when eDP need to disable Yakir Yang
@ 2016-07-22 1:50 ` Yakir Yang
2016-08-24 14:29 ` [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Yakir Yang @ 2016-07-22 1:50 UTC (permalink / raw)
To: Mark Yao, Inki Dae, Thierry Reding, Heiko Stuebner
Cc: Jingoo Han, Javier Martinez Canillas, Stéphane Marchesin,
Sean Paul, Tomasz Figa, dianders, David Airlie, daniel.vetter,
Krzysztof Kozlowski, emil.l.velikov, Yakir Yang, linux-kernel,
dri-devel, linux-samsung-soc, linux-rockchip
We already manager the panel power status in bridge_disable and
connector->detect functions, then we don't need to manager the
panel power status at suspend/resume in particular.
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
---
Changes in v2: None
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 0ddaf93..3dadad2 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1413,11 +1413,6 @@ int analogix_dp_suspend(struct device *dev)
clk_disable_unprepare(dp->clock);
- if (dp->plat_data->panel) {
- if (drm_panel_unprepare(dp->plat_data->panel))
- DRM_ERROR("failed to turnoff the panel\n");
- }
-
return 0;
}
EXPORT_SYMBOL_GPL(analogix_dp_suspend);
@@ -1433,13 +1428,6 @@ int analogix_dp_resume(struct device *dev)
return ret;
}
- if (dp->plat_data->panel) {
- if (drm_panel_prepare(dp->plat_data->panel)) {
- DRM_ERROR("failed to setup the panel\n");
- return -EBUSY;
- }
- }
-
return 0;
}
EXPORT_SYMBOL_GPL(analogix_dp_resume);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31
2016-07-22 1:42 [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Yakir Yang
2016-07-22 1:50 ` [PATCH v2 2/3] drm/bridge: analogix_dp: turn off the panel when eDP need to disable Yakir Yang
2016-07-22 1:50 ` [PATCH v2 3/3] drm/bridge: analogix_dp: remove the panel prepare/unprepare in suspend/resume Yakir Yang
@ 2016-08-24 14:29 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2016-08-24 14:29 UTC (permalink / raw)
To: Yakir Yang
Cc: Mark Yao, Inki Dae, Thierry Reding, Heiko Stuebner,
Krzysztof Kozlowski, linux-samsung-soc, linux-rockchip,
Jingoo Han, emil.l.velikov, dianders, dri-devel, Tomasz Figa,
Javier Martinez Canillas, daniel.vetter, Stéphane Marchesin,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
On Fri, Jul 22, 2016 at 09:42:30AM +0800, Yakir Yang wrote:
> According to page 16 of Sharp LQ123P1JX31 datasheet, we need to add the
> missing delay timing. Panel prepare time should be t1 (0.5ms~10ms) plus
> t3 (0ms~100ms), and panel enable time should equal to t7 (0ms~50ms), and
> panel unprepare time should be t11 (1ms~50ms) plus t12 (500ms~).
>
> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> Changes in v2:
> - Add the reviewed tag from Sean.
>
> drivers/gpu/drm/panel/panel-simple.c | 5 +++++
> 1 file changed, 5 insertions(+)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-24 14:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 1:42 [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Yakir Yang
2016-07-22 1:50 ` [PATCH v2 2/3] drm/bridge: analogix_dp: turn off the panel when eDP need to disable Yakir Yang
2016-07-22 1:50 ` [PATCH v2 3/3] drm/bridge: analogix_dp: remove the panel prepare/unprepare in suspend/resume Yakir Yang
2016-08-24 14:29 ` [PATCH v2 1/3] drm/panel: simple-panel: add the delay timing for Sharp LQ123P1JX31 Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox