All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-06-16  7:22   ` hongao
  0 siblings, 0 replies; 9+ messages in thread
From: hongao @ 2022-06-16  7:22 UTC (permalink / raw)
  To: inki.dae, jy0922.shim, sw0312.kim, kyungmin.park, airlied,
	daniel, krzysztof.kozlowski, alim.akhtar
  Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel, hongao

Once EDID is parsed, the monitor HDMI support information is available
through drm_display_info.is_hdmi.

This driver calls drm_detect_hdmi_monitor() to receive the same
information, which is less efficient.

Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
instead.

Signed-off-by: hongao <hongao@uniontech.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 7655142a4651..17e9f5efbcfc 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
 	if (!edid)
 		return -ENODEV;
 
-	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
+	hdata->dvi_mode = !connector->display_info.is_hdmi;
 	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
 			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
 			  edid->width_cm, edid->height_cm);
-- 
2.20.1




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

* [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-06-16  7:22   ` hongao
  0 siblings, 0 replies; 9+ messages in thread
From: hongao @ 2022-06-16  7:22 UTC (permalink / raw)
  To: inki.dae, jy0922.shim, sw0312.kim, kyungmin.park, airlied,
	daniel, krzysztof.kozlowski, alim.akhtar
  Cc: hongao, linux-samsung-soc, linux-arm-kernel, dri-devel, linux-kernel

Once EDID is parsed, the monitor HDMI support information is available
through drm_display_info.is_hdmi.

This driver calls drm_detect_hdmi_monitor() to receive the same
information, which is less efficient.

Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
instead.

Signed-off-by: hongao <hongao@uniontech.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 7655142a4651..17e9f5efbcfc 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
 	if (!edid)
 		return -ENODEV;
 
-	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
+	hdata->dvi_mode = !connector->display_info.is_hdmi;
 	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
 			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
 			  edid->width_cm, edid->height_cm);
-- 
2.20.1




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

* [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-06-16  7:22   ` hongao
  0 siblings, 0 replies; 9+ messages in thread
From: hongao @ 2022-06-16  7:22 UTC (permalink / raw)
  To: inki.dae, jy0922.shim, sw0312.kim, kyungmin.park, airlied,
	daniel, krzysztof.kozlowski, alim.akhtar
  Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel, hongao

Once EDID is parsed, the monitor HDMI support information is available
through drm_display_info.is_hdmi.

This driver calls drm_detect_hdmi_monitor() to receive the same
information, which is less efficient.

Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
instead.

Signed-off-by: hongao <hongao@uniontech.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 7655142a4651..17e9f5efbcfc 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
 	if (!edid)
 		return -ENODEV;
 
-	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
+	hdata->dvi_mode = !connector->display_info.is_hdmi;
 	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
 			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
 			  edid->width_cm, edid->height_cm);
-- 
2.20.1




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
  2022-06-16  7:22   ` hongao
  (?)
@ 2022-06-24  8:16     ` Inki Dae
  -1 siblings, 0 replies; 9+ messages in thread
From: Inki Dae @ 2022-06-24  8:16 UTC (permalink / raw)
  To: hongao, jy0922.shim, sw0312.kim, kyungmin.park, airlied, daniel,
	krzysztof.kozlowski, alim.akhtar
  Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel



22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
> Once EDID is parsed, the monitor HDMI support information is available
> through drm_display_info.is_hdmi.
> 
> This driver calls drm_detect_hdmi_monitor() to receive the same
> information, which is less efficient.
> 
> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
> instead.
> 

Applied.

Thanks,
Inki Dae

> Signed-off-by: hongao <hongao@uniontech.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 7655142a4651..17e9f5efbcfc 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>  	if (!edid)
>  		return -ENODEV;
>  
> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>  			  edid->width_cm, edid->height_cm);

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-06-24  8:16     ` Inki Dae
  0 siblings, 0 replies; 9+ messages in thread
From: Inki Dae @ 2022-06-24  8:16 UTC (permalink / raw)
  To: hongao, jy0922.shim, sw0312.kim, kyungmin.park, airlied, daniel,
	krzysztof.kozlowski, alim.akhtar
  Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel



22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
> Once EDID is parsed, the monitor HDMI support information is available
> through drm_display_info.is_hdmi.
> 
> This driver calls drm_detect_hdmi_monitor() to receive the same
> information, which is less efficient.
> 
> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
> instead.
> 

Applied.

Thanks,
Inki Dae

> Signed-off-by: hongao <hongao@uniontech.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 7655142a4651..17e9f5efbcfc 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>  	if (!edid)
>  		return -ENODEV;
>  
> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>  			  edid->width_cm, edid->height_cm);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-06-24  8:16     ` Inki Dae
  0 siblings, 0 replies; 9+ messages in thread
From: Inki Dae @ 2022-06-24  8:16 UTC (permalink / raw)
  To: hongao, jy0922.shim, sw0312.kim, kyungmin.park, airlied, daniel,
	krzysztof.kozlowski, alim.akhtar
  Cc: linux-samsung-soc, linux-arm-kernel, dri-devel, linux-kernel



22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
> Once EDID is parsed, the monitor HDMI support information is available
> through drm_display_info.is_hdmi.
> 
> This driver calls drm_detect_hdmi_monitor() to receive the same
> information, which is less efficient.
> 
> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
> instead.
> 

Applied.

Thanks,
Inki Dae

> Signed-off-by: hongao <hongao@uniontech.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 7655142a4651..17e9f5efbcfc 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>  	if (!edid)
>  		return -ENODEV;
>  
> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>  			  edid->width_cm, edid->height_cm);

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
  2022-06-24  8:16     ` Inki Dae
  (?)
@ 2022-10-17  9:59       ` Jani Nikula
  -1 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2022-10-17  9:59 UTC (permalink / raw)
  To: Inki Dae, hongao, jy0922.shim, sw0312.kim, kyungmin.park,
	airlied, daniel, krzysztof.kozlowski, alim.akhtar
  Cc: linux-samsung-soc, linux-arm-kernel, dri-devel, linux-kernel

On Fri, 24 Jun 2022, Inki Dae <inki.dae@samsung.com> wrote:
> 22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
>> Once EDID is parsed, the monitor HDMI support information is available
>> through drm_display_info.is_hdmi.
>> 
>> This driver calls drm_detect_hdmi_monitor() to receive the same
>> information, which is less efficient.
>> 
>> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
>> instead.
>> 
>
> Applied.

Sorry, but this is broken. The commit message contains the clue: "Once
EDID is parsed". drm_get_edid() does not parse the EDID, you need to
call drm_connector_update_edid_property() first.

This is what I posted some time ago [1] but apparently was working on a
different baseline.

BR,
Jani.


[1] https://patchwork.freedesktop.org/patch/msgid/f21588dcb93bdb6cf76724506063bdfcdb0a6bb4.1662036058.git.jani.nikula@intel.com


>
> Thanks,
> Inki Dae
>
>> Signed-off-by: hongao <hongao@uniontech.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 7655142a4651..17e9f5efbcfc 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>>  	if (!edid)
>>  		return -ENODEV;
>>  
>> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
>> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>>  			  edid->width_cm, edid->height_cm);

-- 
Jani Nikula, Intel Open Source Graphics Center

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-10-17  9:59       ` Jani Nikula
  0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2022-10-17  9:59 UTC (permalink / raw)
  To: Inki Dae, hongao, jy0922.shim, sw0312.kim, kyungmin.park,
	airlied, daniel, krzysztof.kozlowski, alim.akhtar
  Cc: linux-samsung-soc, dri-devel, linux-arm-kernel, linux-kernel

On Fri, 24 Jun 2022, Inki Dae <inki.dae@samsung.com> wrote:
> 22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
>> Once EDID is parsed, the monitor HDMI support information is available
>> through drm_display_info.is_hdmi.
>> 
>> This driver calls drm_detect_hdmi_monitor() to receive the same
>> information, which is less efficient.
>> 
>> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
>> instead.
>> 
>
> Applied.

Sorry, but this is broken. The commit message contains the clue: "Once
EDID is parsed". drm_get_edid() does not parse the EDID, you need to
call drm_connector_update_edid_property() first.

This is what I posted some time ago [1] but apparently was working on a
different baseline.

BR,
Jani.


[1] https://patchwork.freedesktop.org/patch/msgid/f21588dcb93bdb6cf76724506063bdfcdb0a6bb4.1662036058.git.jani.nikula@intel.com


>
> Thanks,
> Inki Dae
>
>> Signed-off-by: hongao <hongao@uniontech.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 7655142a4651..17e9f5efbcfc 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>>  	if (!edid)
>>  		return -ENODEV;
>>  
>> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
>> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>>  			  edid->width_cm, edid->height_cm);

-- 
Jani Nikula, Intel Open Source Graphics Center

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

* Re: [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
@ 2022-10-17  9:59       ` Jani Nikula
  0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2022-10-17  9:59 UTC (permalink / raw)
  To: Inki Dae, hongao, jy0922.shim, sw0312.kim, kyungmin.park,
	airlied, daniel, krzysztof.kozlowski, alim.akhtar
  Cc: linux-samsung-soc, linux-arm-kernel, dri-devel, linux-kernel

On Fri, 24 Jun 2022, Inki Dae <inki.dae@samsung.com> wrote:
> 22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
>> Once EDID is parsed, the monitor HDMI support information is available
>> through drm_display_info.is_hdmi.
>> 
>> This driver calls drm_detect_hdmi_monitor() to receive the same
>> information, which is less efficient.
>> 
>> Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
>> instead.
>> 
>
> Applied.

Sorry, but this is broken. The commit message contains the clue: "Once
EDID is parsed". drm_get_edid() does not parse the EDID, you need to
call drm_connector_update_edid_property() first.

This is what I posted some time ago [1] but apparently was working on a
different baseline.

BR,
Jani.


[1] https://patchwork.freedesktop.org/patch/msgid/f21588dcb93bdb6cf76724506063bdfcdb0a6bb4.1662036058.git.jani.nikula@intel.com


>
> Thanks,
> Inki Dae
>
>> Signed-off-by: hongao <hongao@uniontech.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 7655142a4651..17e9f5efbcfc 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)
>>  	if (!edid)
>>  		return -ENODEV;
>>  
>> -	hdata->dvi_mode = !drm_detect_hdmi_monitor(edid);
>> +	hdata->dvi_mode = !connector->display_info.is_hdmi;
>>  	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
>>  			  (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>>  			  edid->width_cm, edid->height_cm);

-- 
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-10-17  9:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220616072357epcas1p4921f90a2fe077e360688e0df00a5dde8@epcas1p4.samsung.com>
2022-06-16  7:22 ` [PATCH] drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi hongao
2022-06-16  7:22   ` hongao
2022-06-16  7:22   ` hongao
2022-06-24  8:16   ` Inki Dae
2022-06-24  8:16     ` Inki Dae
2022-06-24  8:16     ` Inki Dae
2022-10-17  9:59     ` Jani Nikula
2022-10-17  9:59       ` Jani Nikula
2022-10-17  9:59       ` Jani Nikula

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.