[1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported
diff mbox

Message ID 1474639600-30090-1-git-send-email-tomeu.vizoso@collabora.com
State New
Headers show

Commit Message

Tomeu Vizoso Sept. 23, 2016, 2:06 p.m. UTC
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(+)

Comments

Sean Paul Sept. 27, 2016, 1:28 p.m. UTC | #1
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
>
Archit Taneja Oct. 3, 2016, 11:13 a.m. UTC | #2
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
>>

Patch
diff mbox

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);