diff mbox

[04/13] drm/exynos: use empty function instead of drm_helper_connector_dpms

Message ID 1345197059-25583-5-git-send-email-inki.dae@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Inki Dae Aug. 17, 2012, 9:50 a.m. UTC
crtc and encoder's dpms callback will be called before connector's dpms
is called so drm_helper_connector_dpms doesn't need to be called.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_connector.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Comments

Joonyoung Shim Aug. 20, 2012, 1:12 a.m. UTC | #1
On 08/17/2012 06:50 PM, Inki Dae wrote:
> crtc and encoder's dpms callback will be called before connector's dpms
> is called so drm_helper_connector_dpms doesn't need to be called.

I can't understand this description. I know crtc and encoder dpms are called
by drm_helper_connector_dpms.

> Signed-off-by: Inki Dae <inki.dae@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>   drivers/gpu/drm/exynos/exynos_drm_connector.c |    9 ++++++++-
>   1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
> index d956819..65acf0d 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
> @@ -226,6 +226,13 @@ static struct drm_connector_helper_funcs exynos_connector_helper_funcs = {
>   	.best_encoder	= exynos_drm_best_encoder,
>   };
>   
> +static void exynos_drm_connector_dpms(struct drm_connector *connector, int mode)
> +{
> +	DRM_DEBUG_KMS("%s\n", __FILE__);
> +
> +	/* drm framework doesn't check NULL. */
> +}
> +
>   static int exynos_drm_connector_fill_modes(struct drm_connector *connector,
>   				unsigned int max_width, unsigned int max_height)
>   {
> @@ -285,7 +292,7 @@ static void exynos_drm_connector_destroy(struct drm_connector *connector)
>   }
>   
>   static struct drm_connector_funcs exynos_connector_funcs = {
> -	.dpms		= drm_helper_connector_dpms,
> +	.dpms		= exynos_drm_connector_dpms,
>   	.fill_modes	= exynos_drm_connector_fill_modes,
>   	.detect		= exynos_drm_connector_detect,
>   	.destroy	= exynos_drm_connector_destroy,
Inki Dae Aug. 20, 2012, 2:50 a.m. UTC | #2
2012/8/20 Joonyoung Shim <jy0922.shim@samsung.com>:
> On 08/17/2012 06:50 PM, Inki Dae wrote:
>>
>> crtc and encoder's dpms callback will be called before connector's dpms
>> is called so drm_helper_connector_dpms doesn't need to be called.
>
>
> I can't understand this description. I know crtc and encoder dpms are called
> by drm_helper_connector_dpms.
>

Ah, right. there is my missing point. for pm, we need
drm_helper_connector_dpms call. actually, this patch is for avoiding
duplicated call of mode_set but I didn't consider pm.

Thanks.

>
>> Signed-off-by: Inki Dae <inki.dae@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>>   drivers/gpu/drm/exynos/exynos_drm_connector.c |    9 ++++++++-
>>   1 files changed, 8 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c
>> b/drivers/gpu/drm/exynos/exynos_drm_connector.c
>> index d956819..65acf0d 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
>> @@ -226,6 +226,13 @@ static struct drm_connector_helper_funcs
>> exynos_connector_helper_funcs = {
>>         .best_encoder   = exynos_drm_best_encoder,
>>   };
>>   +static void exynos_drm_connector_dpms(struct drm_connector *connector,
>> int mode)
>> +{
>> +       DRM_DEBUG_KMS("%s\n", __FILE__);
>> +
>> +       /* drm framework doesn't check NULL. */
>> +}
>> +
>>   static int exynos_drm_connector_fill_modes(struct drm_connector
>> *connector,
>>                                 unsigned int max_width, unsigned int
>> max_height)
>>   {
>> @@ -285,7 +292,7 @@ static void exynos_drm_connector_destroy(struct
>> drm_connector *connector)
>>   }
>>     static struct drm_connector_funcs exynos_connector_funcs = {
>> -       .dpms           = drm_helper_connector_dpms,
>> +       .dpms           = exynos_drm_connector_dpms,
>>         .fill_modes     = exynos_drm_connector_fill_modes,
>>         .detect         = exynos_drm_connector_detect,
>>         .destroy        = exynos_drm_connector_destroy,
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index d956819..65acf0d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -226,6 +226,13 @@  static struct drm_connector_helper_funcs exynos_connector_helper_funcs = {
 	.best_encoder	= exynos_drm_best_encoder,
 };
 
+static void exynos_drm_connector_dpms(struct drm_connector *connector, int mode)
+{
+	DRM_DEBUG_KMS("%s\n", __FILE__);
+
+	/* drm framework doesn't check NULL. */
+}
+
 static int exynos_drm_connector_fill_modes(struct drm_connector *connector,
 				unsigned int max_width, unsigned int max_height)
 {
@@ -285,7 +292,7 @@  static void exynos_drm_connector_destroy(struct drm_connector *connector)
 }
 
 static struct drm_connector_funcs exynos_connector_funcs = {
-	.dpms		= drm_helper_connector_dpms,
+	.dpms		= exynos_drm_connector_dpms,
 	.fill_modes	= exynos_drm_connector_fill_modes,
 	.detect		= exynos_drm_connector_detect,
 	.destroy	= exynos_drm_connector_destroy,