dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
@ 2023-03-22 16:05 Rodrigo Siqueira
  2023-03-22 18:01 ` Harry Wentland
  2023-03-25 20:16 ` Pavel Machek
  0 siblings, 2 replies; 5+ messages in thread
From: Rodrigo Siqueira @ 2023-03-22 16:05 UTC (permalink / raw)
  To: airlied, daniel
  Cc: Felipe Clark, Iswara Negulendran, Rodrigo Siqueira, linux-kernel,
	amd-gfx, dri-devel, Anthony Koo

Cc: Anthony Koo <anthony.koo@amd.com>
Cc: Iswara Negulendran <iswara.nagulendran@amd.com>
Cc: Felipe Clark <felipe.clark@amd.com>
Cc: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 include/drm/display/drm_dp.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 632376c291db..d30a9b2f450c 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -977,6 +977,8 @@
 # define DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP		(1 << 5)
 # define DP_EDP_DYNAMIC_BACKLIGHT_CAP			(1 << 6)
 # define DP_EDP_VBLANK_BACKLIGHT_UPDATE_CAP		(1 << 7)
+#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
+# define DP_EDP_OLED_VESA_CAP				(1 << 4)
 
 #define DP_EDP_GENERAL_CAP_2		    0x703
 # define DP_EDP_OVERDRIVE_ENGINE_ENABLED		(1 << 0)
-- 
2.39.2


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

* Re: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
  2023-03-22 16:05 [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions Rodrigo Siqueira
@ 2023-03-22 18:01 ` Harry Wentland
  2023-03-23 19:24   ` Clark, Felipe
  2023-03-25 20:16 ` Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Harry Wentland @ 2023-03-22 18:01 UTC (permalink / raw)
  To: Rodrigo Siqueira, airlied, daniel
  Cc: Felipe Clark, Iswara Negulendran, linux-kernel, dri-devel,
	amd-gfx, Anthony Koo



On 3/22/23 12:05, Rodrigo Siqueira wrote:
> Cc: Anthony Koo <anthony.koo@amd.com>
> Cc: Iswara Negulendran <iswara.nagulendran@amd.com>
> Cc: Felipe Clark <felipe.clark@amd.com>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  include/drm/display/drm_dp.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
> index 632376c291db..d30a9b2f450c 100644
> --- a/include/drm/display/drm_dp.h
> +++ b/include/drm/display/drm_dp.h
> @@ -977,6 +977,8 @@
>  # define DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP		(1 << 5)
>  # define DP_EDP_DYNAMIC_BACKLIGHT_CAP			(1 << 6)
>  # define DP_EDP_VBLANK_BACKLIGHT_UPDATE_CAP		(1 << 7)
> +#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
> +# define DP_EDP_OLED_VESA_CAP				(1 << 4)
>  
>  #define DP_EDP_GENERAL_CAP_2		    0x703
>  # define DP_EDP_OVERDRIVE_ENGINE_ENABLED		(1 << 0)


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

* RE: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
  2023-03-22 18:01 ` Harry Wentland
@ 2023-03-23 19:24   ` Clark, Felipe
  2023-03-24 19:25     ` Clark, Felipe
  0 siblings, 1 reply; 5+ messages in thread
From: Clark, Felipe @ 2023-03-23 19:24 UTC (permalink / raw)
  To: Wentland, Harry, Siqueira, Rodrigo, airlied, daniel
  Cc: linux-kernel, Koo, Anthony, dri-devel, amd-gfx, Nagulendran, Iswara

[AMD Official Use Only - General]

Hello Rodrigo and Harry,
I would like to propose some changes to keep this patch consistent with the naming scheme and general organization of the drm_dp.h file.

#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
It would be better to use the (1<<7) representation for this bit to follow the pattern established by the other defines in the file. Also, a more generic name for this macro would be DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE.

# define DP_EDP_OLED_VESA_CAP   (1 << 4)
A more generic name for this macro would be DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE


In terms of the file structure, DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE should appear underneath the definition of DP_EDP_BACKLIGHT_MODE_SET_REGISTER. Similarly, DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE should appear underneath the definition of DP_EDP_GENERAL_CAP_2

For a complete definition of the millinit based brightness control specification the following should also be added:
#define DP_EDP_PANEL_TARGET_LUMINANCE_VALUE     0x734

Here is a suggested pseudo-patch with all these changes:

#define DP_EDP_GENERAL_CAP_2               0x703
 # define DP_EDP_OVERDRIVE_ENGINE_ENABLED               (1 << 0)
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE (1<<7)

# define DP_EDP_DYNAMIC_BACKLIGHT_ENABLE               (1 << 4)
 # define DP_EDP_REGIONAL_BACKLIGHT_ENABLE              (1 << 5)
 # define DP_EDP_UPDATE_REGION_BRIGHTNESS               (1 << 6) /* eDP 1.4 */
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE (1<<7)

 #define DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET   0x732
 #define DP_EDP_DBC_MAXIMUM_BRIGHTNESS_SET   0x733
+#define DP_EDP_PANEL_TARGET_LUMINANCE_VALUE 0x734


Thank you,
Felipe

-----Original Message-----
From: Wentland, Harry <Harry.Wentland@amd.com>
Sent: Wednesday, March 22, 2023 2:01 PM
To: Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; airlied@gmail.com; daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org; Koo, Anthony <Anthony.Koo@amd.com>; Nagulendran, Iswara <Iswara.Nagulendran@amd.com>; Clark, Felipe <Felipe.Clark@amd.com>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions



On 3/22/23 12:05, Rodrigo Siqueira wrote:
> Cc: Anthony Koo <anthony.koo@amd.com>
> Cc: Iswara Negulendran <iswara.nagulendran@amd.com>
> Cc: Felipe Clark <felipe.clark@amd.com>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  include/drm/display/drm_dp.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/drm/display/drm_dp.h
> b/include/drm/display/drm_dp.h index 632376c291db..d30a9b2f450c 100644
> --- a/include/drm/display/drm_dp.h
> +++ b/include/drm/display/drm_dp.h
> @@ -977,6 +977,8 @@
>  # define DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP           (1 << 5)
>  # define DP_EDP_DYNAMIC_BACKLIGHT_CAP                        (1 << 6)
>  # define DP_EDP_VBLANK_BACKLIGHT_UPDATE_CAP          (1 << 7)
> +#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
> +# define DP_EDP_OLED_VESA_CAP                                (1 << 4)
>
>  #define DP_EDP_GENERAL_CAP_2             0x703
>  # define DP_EDP_OVERDRIVE_ENGINE_ENABLED             (1 << 0)


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

* RE: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
  2023-03-23 19:24   ` Clark, Felipe
@ 2023-03-24 19:25     ` Clark, Felipe
  0 siblings, 0 replies; 5+ messages in thread
From: Clark, Felipe @ 2023-03-24 19:25 UTC (permalink / raw)
  To: Wentland, Harry, Siqueira, Rodrigo, airlied, daniel
  Cc: linux-kernel, Koo, Anthony, dri-devel, amd-gfx, Nagulendran, Iswara

[AMD Official Use Only - General]

Hi Rodrigo and Harry,
There was a typo in the third line of the pseudo-patch I wrote in the previous email. Here is the fixed version:

#define DP_EDP_GENERAL_CAP_2    0x703
 # define DP_EDP_OVERDRIVE_ENGINE_ENABLED       (1 << 0)
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE        (1<<4)

# define DP_EDP_DYNAMIC_BACKLIGHT_ENABLE        (1 << 4)
 # define DP_EDP_REGIONAL_BACKLIGHT_ENABLE      (1 << 5)
 # define DP_EDP_UPDATE_REGION_BRIGHTNESS       (1 << 6) /* eDP 1.4 */
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE (1<<7)

 #define DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET      0x732
 #define DP_EDP_DBC_MAXIMUM_BRIGHTNESS_SET      0x733
+#define DP_EDP_PANEL_TARGET_LUMINANCE_VALUE    0x734

Thank you,
Felipe

-----Original Message-----
From: Clark, Felipe
Sent: Thursday, March 23, 2023 3:25 PM
To: Wentland, Harry <Harry.Wentland@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; airlied@gmail.com; daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org; Koo, Anthony <Anthony.Koo@amd.com>; Nagulendran, Iswara <Iswara.Nagulendran@amd.com>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: RE: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions

Hello Rodrigo and Harry,
I would like to propose some changes to keep this patch consistent with the naming scheme and general organization of the drm_dp.h file.

#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
It would be better to use the (1<<7) representation for this bit to follow the pattern established by the other defines in the file. Also, a more generic name for this macro would be DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE.

# define DP_EDP_OLED_VESA_CAP   (1 << 4)
A more generic name for this macro would be DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE


In terms of the file structure, DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE should appear underneath the definition of DP_EDP_BACKLIGHT_MODE_SET_REGISTER. Similarly, DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE should appear underneath the definition of DP_EDP_GENERAL_CAP_2

For a complete definition of the millinit based brightness control specification the following should also be added:
#define DP_EDP_PANEL_TARGET_LUMINANCE_VALUE     0x734

Here is a suggested pseudo-patch with all these changes:

#define DP_EDP_GENERAL_CAP_2               0x703
 # define DP_EDP_OVERDRIVE_ENGINE_ENABLED               (1 << 0)
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE (1<<7)

# define DP_EDP_DYNAMIC_BACKLIGHT_ENABLE               (1 << 4)
 # define DP_EDP_REGIONAL_BACKLIGHT_ENABLE              (1 << 5)
 # define DP_EDP_UPDATE_REGION_BRIGHTNESS               (1 << 6) /* eDP 1.4 */
+# define DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE (1<<7)

 #define DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET   0x732
 #define DP_EDP_DBC_MAXIMUM_BRIGHTNESS_SET   0x733
+#define DP_EDP_PANEL_TARGET_LUMINANCE_VALUE 0x734


Thank you,
Felipe

-----Original Message-----
From: Wentland, Harry <Harry.Wentland@amd.com>
Sent: Wednesday, March 22, 2023 2:01 PM
To: Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; airlied@gmail.com; daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org; Koo, Anthony <Anthony.Koo@amd.com>; Nagulendran, Iswara <Iswara.Nagulendran@amd.com>; Clark, Felipe <Felipe.Clark@amd.com>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions



On 3/22/23 12:05, Rodrigo Siqueira wrote:
> Cc: Anthony Koo <anthony.koo@amd.com>
> Cc: Iswara Negulendran <iswara.nagulendran@amd.com>
> Cc: Felipe Clark <felipe.clark@amd.com>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  include/drm/display/drm_dp.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/drm/display/drm_dp.h
> b/include/drm/display/drm_dp.h index 632376c291db..d30a9b2f450c 100644
> --- a/include/drm/display/drm_dp.h
> +++ b/include/drm/display/drm_dp.h
> @@ -977,6 +977,8 @@
>  # define DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP           (1 << 5)
>  # define DP_EDP_DYNAMIC_BACKLIGHT_CAP                        (1 << 6)
>  # define DP_EDP_VBLANK_BACKLIGHT_UPDATE_CAP          (1 << 7)
> +#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
> +# define DP_EDP_OLED_VESA_CAP                                (1 << 4)
>
>  #define DP_EDP_GENERAL_CAP_2             0x703
>  # define DP_EDP_OVERDRIVE_ENGINE_ENABLED             (1 << 0)


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

* Re: [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
  2023-03-22 16:05 [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions Rodrigo Siqueira
  2023-03-22 18:01 ` Harry Wentland
@ 2023-03-25 20:16 ` Pavel Machek
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2023-03-25 20:16 UTC (permalink / raw)
  To: Rodrigo Siqueira
  Cc: Felipe Clark, Iswara Negulendran, linux-kernel, amd-gfx,
	dri-devel, Anthony Koo

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

On Wed 2023-03-22 10:05:13, Rodrigo Siqueira wrote:
> Cc: Anthony Koo <anthony.koo@amd.com>
> Cc: Iswara Negulendran <iswara.nagulendran@amd.com>
> Cc: Felipe Clark <felipe.clark@amd.com>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

Some changelog would be useful.


> +++ b/include/drm/display/drm_dp.h
> @@ -977,6 +977,8 @@
>  # define DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP		(1 << 5)
>  # define DP_EDP_DYNAMIC_BACKLIGHT_CAP			(1 << 6)
>  # define DP_EDP_VBLANK_BACKLIGHT_UPDATE_CAP		(1 << 7)
> +#define DP_EDP_OLED_VESA_BRIGHTNESS_ON      0x80
> +# define DP_EDP_OLED_VESA_CAP				(1 << 4)
>  

Are you fixing a compile problem? Otherwise this should go in with the
user...

BR,
							Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2023-03-25 20:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 16:05 [PATCH] drm/display: Add missing OLED Vesa brightnesses definitions Rodrigo Siqueira
2023-03-22 18:01 ` Harry Wentland
2023-03-23 19:24   ` Clark, Felipe
2023-03-24 19:25     ` Clark, Felipe
2023-03-25 20:16 ` Pavel Machek

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