[PATCH] drm/display: Add missing OLED Vesa brightnesses definitions
Clark, Felipe
Felipe.Clark at amd.com
Thu Mar 23 19:24:47 UTC 2023
[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 at amd.com>
Sent: Wednesday, March 22, 2023 2:01 PM
To: Siqueira, Rodrigo <Rodrigo.Siqueira at amd.com>; airlied at gmail.com; daniel at ffwll.ch
Cc: amd-gfx at lists.freedesktop.org; Koo, Anthony <Anthony.Koo at amd.com>; Nagulendran, Iswara <Iswara.Nagulendran at amd.com>; Clark, Felipe <Felipe.Clark at amd.com>; dri-devel at lists.freedesktop.org; linux-kernel at 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 at amd.com>
> Cc: Iswara Negulendran <iswara.nagulendran at amd.com>
> Cc: Felipe Clark <felipe.clark at amd.com>
> Cc: Harry Wentland <Harry.Wentland at amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
Reviewed-by: Harry Wentland <harry.wentland at 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)
More information about the amd-gfx
mailing list