mbox series

[SRU,K/OEM-6.0/U,0/3] Fix oled brightness set above frame-average luminance

Message ID 20221010054453.49478-1-aaron.ma@canonical.com
Headers show
Series Fix oled brightness set above frame-average luminance | expand

Message

Aaron Ma Oct. 10, 2022, 5:44 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1978986

[Impact]
The brightness is not changed obviously during 200 to 255 on AMD
or 400 to 512 on Intel.

[Fix]
Read HDR meta to detect the max and min luminance.
max_cll defines the content light luminance for individual pixel.
max_fall defines frame-average level luminance.
Use max_fall value instead of max_cll as a limit for brightness control.

[Test]
Verified on AMD Cezanne, Barcelo, Rembrandt and Intel ADL, also on LCD
panel and
OLED panel. The brightness is changed more obivously on OLED panel, and
no affect on LCD panel.

[Where problems could occur]
Low risk, It may cause the max brightness can't be set.

All 3 patches are already SRUed for J/OEM-5.17,
this SRU is for K/OEM-6.0/U.
Pathes for OEM-5.17 are the same as K, OEM-5.17 doesn't apply them
yet, in case the patches of no SAUCE tag are perferred.

Jouni Högander (3):
  drm: New function to get luminance range based on static hdr metadata
  drm/amdgpu_dm: Rely on split out luminance calculation function
  drm/i915: Use luminance range calculated during edid parsing

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++-----------
 drivers/gpu/drm/drm_edid.c                    | 52 ++++++++++++++++++-
 .../drm/i915/display/intel_dp_aux_backlight.c | 15 +++++-
 include/drm/drm_connector.h                   | 21 ++++++++
 4 files changed, 89 insertions(+), 34 deletions(-)

Comments

Tim Gardner Oct. 10, 2022, 12:41 p.m. UTC | #1
On 10/9/22 23:44, Aaron Ma wrote:
> BugLink: https://bugs.launchpad.net/bugs/1978986
> 
> [Impact]
> The brightness is not changed obviously during 200 to 255 on AMD
> or 400 to 512 on Intel.
> 
> [Fix]
> Read HDR meta to detect the max and min luminance.
> max_cll defines the content light luminance for individual pixel.
> max_fall defines frame-average level luminance.
> Use max_fall value instead of max_cll as a limit for brightness control.
> 
> [Test]
> Verified on AMD Cezanne, Barcelo, Rembrandt and Intel ADL, also on LCD
> panel and
> OLED panel. The brightness is changed more obivously on OLED panel, and
> no affect on LCD panel.
> 
> [Where problems could occur]
> Low risk, It may cause the max brightness can't be set.
> 
> All 3 patches are already SRUed for J/OEM-5.17,
> this SRU is for K/OEM-6.0/U.
> Pathes for OEM-5.17 are the same as K, OEM-5.17 doesn't apply them
> yet, in case the patches of no SAUCE tag are perferred.
> 
> Jouni Högander (3):
>    drm: New function to get luminance range based on static hdr metadata
>    drm/amdgpu_dm: Rely on split out luminance calculation function
>    drm/i915: Use luminance range calculated during edid parsing
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++-----------
>   drivers/gpu/drm/drm_edid.c                    | 52 ++++++++++++++++++-
>   .../drm/i915/display/intel_dp_aux_backlight.c | 15 +++++-
>   include/drm/drm_connector.h                   | 21 ++++++++
>   4 files changed, 89 insertions(+), 34 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Andrea Righi Oct. 12, 2022, 6:40 a.m. UTC | #2
On Mon, Oct 10, 2022 at 01:44:49PM +0800, Aaron Ma wrote:
> BugLink: https://bugs.launchpad.net/bugs/1978986
> 
> [Impact]
> The brightness is not changed obviously during 200 to 255 on AMD
> or 400 to 512 on Intel.
> 
> [Fix]
> Read HDR meta to detect the max and min luminance.
> max_cll defines the content light luminance for individual pixel.
> max_fall defines frame-average level luminance.
> Use max_fall value instead of max_cll as a limit for brightness control.
> 
> [Test]
> Verified on AMD Cezanne, Barcelo, Rembrandt and Intel ADL, also on LCD
> panel and
> OLED panel. The brightness is changed more obivously on OLED panel, and
> no affect on LCD panel.
> 
> [Where problems could occur]
> Low risk, It may cause the max brightness can't be set.
> 
> All 3 patches are already SRUed for J/OEM-5.17,
> this SRU is for K/OEM-6.0/U.
> Pathes for OEM-5.17 are the same as K, OEM-5.17 doesn't apply them
> yet, in case the patches of no SAUCE tag are perferred.

Applied to kinetic/linux and kinetic/linux-unstable.

Thanks,
-Andrea
Timo Aaltonen Oct. 14, 2022, 7:44 a.m. UTC | #3
Aaron Ma kirjoitti 10.10.2022 klo 8.44:
> BugLink: https://bugs.launchpad.net/bugs/1978986
> 
> [Impact]
> The brightness is not changed obviously during 200 to 255 on AMD
> or 400 to 512 on Intel.
> 
> [Fix]
> Read HDR meta to detect the max and min luminance.
> max_cll defines the content light luminance for individual pixel.
> max_fall defines frame-average level luminance.
> Use max_fall value instead of max_cll as a limit for brightness control.
> 
> [Test]
> Verified on AMD Cezanne, Barcelo, Rembrandt and Intel ADL, also on LCD
> panel and
> OLED panel. The brightness is changed more obivously on OLED panel, and
> no affect on LCD panel.
> 
> [Where problems could occur]
> Low risk, It may cause the max brightness can't be set.
> 
> All 3 patches are already SRUed for J/OEM-5.17,
> this SRU is for K/OEM-6.0/U.
> Pathes for OEM-5.17 are the same as K, OEM-5.17 doesn't apply them
> yet, in case the patches of no SAUCE tag are perferred.
> 
> Jouni Högander (3):
>    drm: New function to get luminance range based on static hdr metadata
>    drm/amdgpu_dm: Rely on split out luminance calculation function
>    drm/i915: Use luminance range calculated during edid parsing
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++-----------
>   drivers/gpu/drm/drm_edid.c                    | 52 ++++++++++++++++++-
>   .../drm/i915/display/intel_dp_aux_backlight.c | 15 +++++-
>   include/drm/drm_connector.h                   | 21 ++++++++
>   4 files changed, 89 insertions(+), 34 deletions(-)
> 

applied to oem-6.0, thanks
Timo Aaltonen Oct. 14, 2022, 7:48 a.m. UTC | #4
Aaron Ma kirjoitti 10.10.2022 klo 8.44:
> BugLink: https://bugs.launchpad.net/bugs/1978986
> 
> [Impact]
> The brightness is not changed obviously during 200 to 255 on AMD
> or 400 to 512 on Intel.
> 
> [Fix]
> Read HDR meta to detect the max and min luminance.
> max_cll defines the content light luminance for individual pixel.
> max_fall defines frame-average level luminance.
> Use max_fall value instead of max_cll as a limit for brightness control.
> 
> [Test]
> Verified on AMD Cezanne, Barcelo, Rembrandt and Intel ADL, also on LCD
> panel and
> OLED panel. The brightness is changed more obivously on OLED panel, and
> no affect on LCD panel.
> 
> [Where problems could occur]
> Low risk, It may cause the max brightness can't be set.
> 
> All 3 patches are already SRUed for J/OEM-5.17,
> this SRU is for K/OEM-6.0/U.
> Pathes for OEM-5.17 are the same as K, OEM-5.17 doesn't apply them
> yet, in case the patches of no SAUCE tag are perferred.
> 
> Jouni Högander (3):
>    drm: New function to get luminance range based on static hdr metadata
>    drm/amdgpu_dm: Rely on split out luminance calculation function
>    drm/i915: Use luminance range calculated during edid parsing
> 
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++-----------
>   drivers/gpu/drm/drm_edid.c                    | 52 ++++++++++++++++++-
>   .../drm/i915/display/intel_dp_aux_backlight.c | 15 +++++-
>   include/drm/drm_connector.h                   | 21 ++++++++
>   4 files changed, 89 insertions(+), 34 deletions(-)
> 

applied to oem-5.17 too, with minor fuzz in the first patch