* [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported
@ 2016-09-23 14:06 Tomeu Vizoso
2016-09-23 14:06 ` [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it Tomeu Vizoso
2016-09-27 13:28 ` [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Sean Paul
0 siblings, 2 replies; 6+ messages in thread
From: Tomeu Vizoso @ 2016-09-23 14:06 UTC (permalink / raw)
To: linux-kernel
Cc: Tomeu Vizoso, Sean Paul, Yakir Yang, Archit Taneja, David Airlie,
dri-devel
So users know whether PSR should be enabled or not.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Yakir Yang <ykk@rock-chips.com>
Cc: Archit Taneja <architt@codeaurora.org>
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++++++
include/drm/bridge/analogix_dp.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index bf992460a6c7..91d8540ac8f0 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -98,6 +98,14 @@ static int analogix_dp_detect_hpd(struct analogix_dp_device *dp)
return 0;
}
+int analogix_dp_psr_supported(struct device *dev)
+{
+ struct analogix_dp_device *dp = dev_get_drvdata(dev);
+
+ return dp->psr_support;
+}
+EXPORT_SYMBOL_GPL(analogix_dp_psr_supported);
+
int analogix_dp_enable_psr(struct device *dev)
{
struct analogix_dp_device *dp = dev_get_drvdata(dev);
diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
index 5f498ca07eea..c99d6eaef1ac 100644
--- a/include/drm/bridge/analogix_dp.h
+++ b/include/drm/bridge/analogix_dp.h
@@ -38,6 +38,7 @@ struct analogix_dp_plat_data {
struct drm_connector *);
};
+int analogix_dp_psr_supported(struct device *dev);
int analogix_dp_enable_psr(struct device *dev);
int analogix_dp_disable_psr(struct device *dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it
2016-09-23 14:06 [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Tomeu Vizoso
@ 2016-09-23 14:06 ` Tomeu Vizoso
2016-09-27 13:28 ` Sean Paul
2016-09-27 13:28 ` [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Sean Paul
1 sibling, 1 reply; 6+ messages in thread
From: Tomeu Vizoso @ 2016-09-23 14:06 UTC (permalink / raw)
To: linux-kernel
Cc: Tomeu Vizoso, Sean Paul, Yakir Yang, Archit Taneja, Mark Yao,
David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
linux-rockchip
There's no point in enabling PSR when the panel doesn't support it.
This also avoids a problem when PSR gets enabled when a CRTC is being
disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR
interrupt on which we wait will never arrive. This was observed on
RK3288 with a panel without PSR (veyron-jaq Chromebook).
It's very easy to reproduce by running the kms_rmfb test in IGT a few
times.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Yakir Yang <ykk@rock-chips.com>
Cc: Archit Taneja <architt@codeaurora.org>
---
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index e83be157cc2a..8548e8271639 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -85,6 +85,9 @@ static void analogix_dp_psr_set(struct drm_encoder *encoder, bool enabled)
struct rockchip_dp_device *dp = to_dp(encoder);
unsigned long flags;
+ if (!analogix_dp_psr_supported(dp->dev))
+ return;
+
dev_dbg(dp->dev, "%s PSR...\n", enabled ? "Entry" : "Exit");
spin_lock_irqsave(&dp->psr_lock, flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported
2016-09-23 14:06 [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Tomeu Vizoso
2016-09-23 14:06 ` [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it Tomeu Vizoso
@ 2016-09-27 13:28 ` Sean Paul
2016-10-03 11:13 ` Archit Taneja
1 sibling, 1 reply; 6+ messages in thread
From: Sean Paul @ 2016-09-27 13:28 UTC (permalink / raw)
To: Tomeu Vizoso
Cc: Linux Kernel Mailing List, Yakir Yang, David Airlie, dri-devel,
Archit Taneja
On Fri, Sep 23, 2016 at 10:06 AM, Tomeu Vizoso
<tomeu.vizoso@collabora.com> wrote:
> So users know whether PSR should be enabled or not.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Yakir Yang <ykk@rock-chips.com>
> Cc: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++++++
> include/drm/bridge/analogix_dp.h | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index bf992460a6c7..91d8540ac8f0 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -98,6 +98,14 @@ static int analogix_dp_detect_hpd(struct analogix_dp_device *dp)
> return 0;
> }
>
> +int analogix_dp_psr_supported(struct device *dev)
> +{
> + struct analogix_dp_device *dp = dev_get_drvdata(dev);
> +
> + return dp->psr_support;
> +}
> +EXPORT_SYMBOL_GPL(analogix_dp_psr_supported);
> +
> int analogix_dp_enable_psr(struct device *dev)
> {
> struct analogix_dp_device *dp = dev_get_drvdata(dev);
> diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
> index 5f498ca07eea..c99d6eaef1ac 100644
> --- a/include/drm/bridge/analogix_dp.h
> +++ b/include/drm/bridge/analogix_dp.h
> @@ -38,6 +38,7 @@ struct analogix_dp_plat_data {
> struct drm_connector *);
> };
>
> +int analogix_dp_psr_supported(struct device *dev);
> int analogix_dp_enable_psr(struct device *dev);
> int analogix_dp_disable_psr(struct device *dev);
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it
2016-09-23 14:06 ` [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it Tomeu Vizoso
@ 2016-09-27 13:28 ` Sean Paul
2016-10-03 11:13 ` Archit Taneja
0 siblings, 1 reply; 6+ messages in thread
From: Sean Paul @ 2016-09-27 13:28 UTC (permalink / raw)
To: Tomeu Vizoso
Cc: Linux Kernel Mailing List, Yakir Yang, Archit Taneja, Mark Yao,
David Airlie, Heiko Stuebner, dri-devel, Linux ARM Kernel,
linux-rockchip
On Fri, Sep 23, 2016 at 10:06 AM, Tomeu Vizoso
<tomeu.vizoso@collabora.com> wrote:
> There's no point in enabling PSR when the panel doesn't support it.
>
> This also avoids a problem when PSR gets enabled when a CRTC is being
> disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR
> interrupt on which we wait will never arrive. This was observed on
> RK3288 with a panel without PSR (veyron-jaq Chromebook).
>
> It's very easy to reproduce by running the kms_rmfb test in IGT a few
> times.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Thanks for digging into this.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Yakir Yang <ykk@rock-chips.com>
> Cc: Archit Taneja <architt@codeaurora.org>
> ---
> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index e83be157cc2a..8548e8271639 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -85,6 +85,9 @@ static void analogix_dp_psr_set(struct drm_encoder *encoder, bool enabled)
> struct rockchip_dp_device *dp = to_dp(encoder);
> unsigned long flags;
>
> + if (!analogix_dp_psr_supported(dp->dev))
> + return;
> +
> dev_dbg(dp->dev, "%s PSR...\n", enabled ? "Entry" : "Exit");
>
> spin_lock_irqsave(&dp->psr_lock, flags);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported
2016-09-27 13:28 ` [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Sean Paul
@ 2016-10-03 11:13 ` Archit Taneja
0 siblings, 0 replies; 6+ messages in thread
From: Archit Taneja @ 2016-10-03 11:13 UTC (permalink / raw)
To: Sean Paul, Tomeu Vizoso
Cc: Linux Kernel Mailing List, Yakir Yang, David Airlie, dri-devel
On 09/27/2016 06:58 PM, Sean Paul wrote:
> On Fri, Sep 23, 2016 at 10:06 AM, Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
>> So users know whether PSR should be enabled or not.
>>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>> Cc: Sean Paul <seanpaul@chromium.org>
>> Cc: Yakir Yang <ykk@rock-chips.com>
>> Cc: Archit Taneja <architt@codeaurora.org>
>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
queued to drm-misc.
Archit
>
>> ---
>> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++++++
>> include/drm/bridge/analogix_dp.h | 1 +
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> index bf992460a6c7..91d8540ac8f0 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -98,6 +98,14 @@ static int analogix_dp_detect_hpd(struct analogix_dp_device *dp)
>> return 0;
>> }
>>
>> +int analogix_dp_psr_supported(struct device *dev)
>> +{
>> + struct analogix_dp_device *dp = dev_get_drvdata(dev);
>> +
>> + return dp->psr_support;
>> +}
>> +EXPORT_SYMBOL_GPL(analogix_dp_psr_supported);
>> +
>> int analogix_dp_enable_psr(struct device *dev)
>> {
>> struct analogix_dp_device *dp = dev_get_drvdata(dev);
>> diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
>> index 5f498ca07eea..c99d6eaef1ac 100644
>> --- a/include/drm/bridge/analogix_dp.h
>> +++ b/include/drm/bridge/analogix_dp.h
>> @@ -38,6 +38,7 @@ struct analogix_dp_plat_data {
>> struct drm_connector *);
>> };
>>
>> +int analogix_dp_psr_supported(struct device *dev);
>> int analogix_dp_enable_psr(struct device *dev);
>> int analogix_dp_disable_psr(struct device *dev);
>>
>> --
>> 2.7.4
>>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it
2016-09-27 13:28 ` Sean Paul
@ 2016-10-03 11:13 ` Archit Taneja
0 siblings, 0 replies; 6+ messages in thread
From: Archit Taneja @ 2016-10-03 11:13 UTC (permalink / raw)
To: Sean Paul, Tomeu Vizoso
Cc: Linux Kernel Mailing List, Yakir Yang, Mark Yao, David Airlie,
Heiko Stuebner, dri-devel, Linux ARM Kernel, linux-rockchip
On 09/27/2016 06:58 PM, Sean Paul wrote:
> On Fri, Sep 23, 2016 at 10:06 AM, Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
>> There's no point in enabling PSR when the panel doesn't support it.
>>
>> This also avoids a problem when PSR gets enabled when a CRTC is being
>> disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR
>> interrupt on which we wait will never arrive. This was observed on
>> RK3288 with a panel without PSR (veyron-jaq Chromebook).
>>
>> It's very easy to reproduce by running the kms_rmfb test in IGT a few
>> times.
>>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>
> Thanks for digging into this.
>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>
queued to drm-misc.
Archit
>
>
>> Cc: Sean Paul <seanpaul@chromium.org>
>> Cc: Yakir Yang <ykk@rock-chips.com>
>> Cc: Archit Taneja <architt@codeaurora.org>
>> ---
>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> index e83be157cc2a..8548e8271639 100644
>> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> @@ -85,6 +85,9 @@ static void analogix_dp_psr_set(struct drm_encoder *encoder, bool enabled)
>> struct rockchip_dp_device *dp = to_dp(encoder);
>> unsigned long flags;
>>
>> + if (!analogix_dp_psr_supported(dp->dev))
>> + return;
>> +
>> dev_dbg(dp->dev, "%s PSR...\n", enabled ? "Entry" : "Exit");
>>
>> spin_lock_irqsave(&dp->psr_lock, flags);
>> --
>> 2.7.4
>>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-03 11:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 14:06 [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Tomeu Vizoso
2016-09-23 14:06 ` [PATCH 2/2] drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it Tomeu Vizoso
2016-09-27 13:28 ` Sean Paul
2016-10-03 11:13 ` Archit Taneja
2016-09-27 13:28 ` [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Sean Paul
2016-10-03 11:13 ` Archit Taneja
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).