All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/crtc-helper: Add store the property value
       [not found] <CGME20190117085047epcas1p4d1c43063283d38514f275319060b7c70@epcas1p4.samsung.com>
@ 2019-01-17  8:50 ` Hoegeun Kwon
  2019-01-17  9:20   ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Hoegeun Kwon @ 2019-01-17  8:50 UTC (permalink / raw)
  To: maarten.lankhorst, maxime.ripard, sean, airlied, daniel, dri-devel
  Cc: hoegeun.kwon

There is a problem in crtc_helper that property value is not updated
when dpms is turned on or off. So modify the property value when dpms
is on.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
---
 drivers/gpu/drm/drm_crtc_helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index a3c81850e755..57d359f0725c 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -735,6 +735,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
 				DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
 					      set->connectors[i]->name);
 				set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
+
+				drm_object_property_set_value(&set->connectors[i]->base,
+							set->connectors[i]->dev->mode_config.dpms_property,
+							DRM_MODE_DPMS_ON);
 			}
 		}
 		__drm_helper_disable_unused_functions(dev);
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/crtc-helper: Add store the property value
  2019-01-17  8:50 ` [PATCH] drm/crtc-helper: Add store the property value Hoegeun Kwon
@ 2019-01-17  9:20   ` Daniel Vetter
  2019-01-17  9:57     ` Hoegeun Kwon
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2019-01-17  9:20 UTC (permalink / raw)
  To: Hoegeun Kwon; +Cc: maxime.ripard, dri-devel, airlied, sean

On Thu, Jan 17, 2019 at 05:50:44PM +0900, Hoegeun Kwon wrote:
> There is a problem in crtc_helper that property value is not updated
> when dpms is turned on or off. So modify the property value when dpms
> is on.
> 
> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>

This is fixed with atomic, and exynos is atomic. Why do you care about
this?
-Daniel

> ---
>  drivers/gpu/drm/drm_crtc_helper.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index a3c81850e755..57d359f0725c 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -735,6 +735,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
>  				DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
>  					      set->connectors[i]->name);
>  				set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
> +
> +				drm_object_property_set_value(&set->connectors[i]->base,
> +							set->connectors[i]->dev->mode_config.dpms_property,
> +							DRM_MODE_DPMS_ON);
>  			}
>  		}
>  		__drm_helper_disable_unused_functions(dev);
> -- 
> 2.17.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/crtc-helper: Add store the property value
  2019-01-17  9:20   ` Daniel Vetter
@ 2019-01-17  9:57     ` Hoegeun Kwon
  2019-01-17 12:15       ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Hoegeun Kwon @ 2019-01-17  9:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: maxime.ripard, dri-devel, airlied, sean, Hoegeun Kwon


On 1/17/19 6:20 PM, Daniel Vetter wrote:
> On Thu, Jan 17, 2019 at 05:50:44PM +0900, Hoegeun Kwon wrote:
>> There is a problem in crtc_helper that property value is not updated
>> when dpms is turned on or off. So modify the property value when dpms
>> is on.
>>
>> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
> This is fixed with atomic, and exynos is atomic. Why do you care about
> this?
> -Daniel


Thank you Daniel.

That's right, there is no problem with exynos because it uses atomic.

But I think it could be a problem with other connectors that do not use 
atoms.


Best regards,

Hoegeun


>
>> ---
>>   drivers/gpu/drm/drm_crtc_helper.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
>> index a3c81850e755..57d359f0725c 100644
>> --- a/drivers/gpu/drm/drm_crtc_helper.c
>> +++ b/drivers/gpu/drm/drm_crtc_helper.c
>> @@ -735,6 +735,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
>>   				DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
>>   					      set->connectors[i]->name);
>>   				set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
>> +
>> +				drm_object_property_set_value(&set->connectors[i]->base,
>> +							set->connectors[i]->dev->mode_config.dpms_property,
>> +							DRM_MODE_DPMS_ON);
>>   			}
>>   		}
>>   		__drm_helper_disable_unused_functions(dev);
>> -- 
>> 2.17.1
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/crtc-helper: Add store the property value
  2019-01-17  9:57     ` Hoegeun Kwon
@ 2019-01-17 12:15       ` Daniel Vetter
  2019-01-18  1:58         ` Hoegeun Kwon
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2019-01-17 12:15 UTC (permalink / raw)
  To: Hoegeun Kwon; +Cc: Maxime Ripard, Sean Paul, Dave Airlie, dri-devel

On Thu, Jan 17, 2019 at 10:57 AM Hoegeun Kwon <hoegeun.kwon@samsung.com> wrote:
>
>
> On 1/17/19 6:20 PM, Daniel Vetter wrote:
> > On Thu, Jan 17, 2019 at 05:50:44PM +0900, Hoegeun Kwon wrote:
> >> There is a problem in crtc_helper that property value is not updated
> >> when dpms is turned on or off. So modify the property value when dpms
> >> is on.
> >>
> >> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
> > This is fixed with atomic, and exynos is atomic. Why do you care about
> > this?
> > -Daniel
>
>
> Thank you Daniel.
>
> That's right, there is no problem with exynos because it uses atomic.
>
> But I think it could be a problem with other connectors that do not use
> atoms.

Yeah, but not sure we care about those drivers all that much. If
someone does, probably better to convert them to atomic (which is
still happening). We did have the equivalent of your patch in the i915
legacy modeset code, but it was quite tricky to get right. Much easier
with atomic, where properties have the right value by design.
-Daniel

>
> Best regards,
>
> Hoegeun
>
>
> >
> >> ---
> >>   drivers/gpu/drm/drm_crtc_helper.c | 4 ++++
> >>   1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> >> index a3c81850e755..57d359f0725c 100644
> >> --- a/drivers/gpu/drm/drm_crtc_helper.c
> >> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> >> @@ -735,6 +735,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
> >>                              DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
> >>                                            set->connectors[i]->name);
> >>                              set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
> >> +
> >> +                            drm_object_property_set_value(&set->connectors[i]->base,
> >> +                                                    set->connectors[i]->dev->mode_config.dpms_property,
> >> +                                                    DRM_MODE_DPMS_ON);
> >>                      }
> >>              }
> >>              __drm_helper_disable_unused_functions(dev);
> >> --
> >> 2.17.1
> >>



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/crtc-helper: Add store the property value
  2019-01-17 12:15       ` Daniel Vetter
@ 2019-01-18  1:58         ` Hoegeun Kwon
  0 siblings, 0 replies; 5+ messages in thread
From: Hoegeun Kwon @ 2019-01-18  1:58 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Maxime Ripard, dri-devel, Dave Airlie, Sean Paul, Hoegeun Kwon

On 1/17/19 9:15 PM, Daniel Vetter wrote:
> On Thu, Jan 17, 2019 at 10:57 AM Hoegeun Kwon <hoegeun.kwon@samsung.com> wrote:
>>
>> On 1/17/19 6:20 PM, Daniel Vetter wrote:
>>> On Thu, Jan 17, 2019 at 05:50:44PM +0900, Hoegeun Kwon wrote:
>>>> There is a problem in crtc_helper that property value is not updated
>>>> when dpms is turned on or off. So modify the property value when dpms
>>>> is on.
>>>>
>>>> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
>>> This is fixed with atomic, and exynos is atomic. Why do you care about
>>> this?
>>> -Daniel
>>
>> Thank you Daniel.
>>
>> That's right, there is no problem with exynos because it uses atomic.
>>
>> But I think it could be a problem with other connectors that do not use
>> atoms.
> Yeah, but not sure we care about those drivers all that much. If
> someone does, probably better to convert them to atomic (which is
> still happening). We did have the equivalent of your patch in the i915
> legacy modeset code, but it was quite tricky to get right. Much easier
> with atomic, where properties have the right value by design.
> -Daniel


Thank you for the detailed explanation.

Please ignore this patch.


Best regards,

Hoegeun


>
>> Best regards,
>>
>> Hoegeun
>>
>>
>>>> ---
>>>>    drivers/gpu/drm/drm_crtc_helper.c | 4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
>>>> index a3c81850e755..57d359f0725c 100644
>>>> --- a/drivers/gpu/drm/drm_crtc_helper.c
>>>> +++ b/drivers/gpu/drm/drm_crtc_helper.c
>>>> @@ -735,6 +735,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
>>>>                               DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
>>>>                                             set->connectors[i]->name);
>>>>                               set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
>>>> +
>>>> +                            drm_object_property_set_value(&set->connectors[i]->base,
>>>> +                                                    set->connectors[i]->dev->mode_config.dpms_property,
>>>> +                                                    DRM_MODE_DPMS_ON);
>>>>                       }
>>>>               }
>>>>               __drm_helper_disable_unused_functions(dev);
>>>> --
>>>> 2.17.1
>>>>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-18  1:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190117085047epcas1p4d1c43063283d38514f275319060b7c70@epcas1p4.samsung.com>
2019-01-17  8:50 ` [PATCH] drm/crtc-helper: Add store the property value Hoegeun Kwon
2019-01-17  9:20   ` Daniel Vetter
2019-01-17  9:57     ` Hoegeun Kwon
2019-01-17 12:15       ` Daniel Vetter
2019-01-18  1:58         ` Hoegeun Kwon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.