diff options
author | Jouni Högander <jouni.hogander@intel.com> | 2022-07-19 11:56:58 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2022-08-11 21:10:04 +0200 |
commit | 82068edeb5090b6f999457483623b39b6546ef74 (patch) | |
tree | 8e2e0fc06901b563b42498bfa0b3b62b4e1d2efd /include/drm | |
parent | drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of... (diff) | |
download | linux-82068edeb5090b6f999457483623b39b6546ef74.tar.xz linux-82068edeb5090b6f999457483623b39b6546ef74.zip |
drm: New function to get luminance range based on static hdr metadata
Split luminance min/max calculation using static hdr metadata from
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:update_connector_ext_caps
into drm/drm_edid.c and use it during edid parsing. Calculated range is
stored into connector->display_info->luminance_range.
Add new data structure (drm_luminance_range_inf) to store luminance range
calculated using data from EDID's static hdr metadata block. Add this new
struct as a part of drm_display_info struct.
v3: Squashed adding drm_luminance_range_info patch here
v2: Calculate range during edid parsing
Cc: Roman Li <roman.li@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220719095700.14923-2-jouni.hogander@intel.com
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_connector.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 2c6fa746efac..248206bbd975 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -324,6 +324,22 @@ struct drm_monitor_range_info { }; /** + * struct drm_luminance_range_info - Panel's luminance range for + * &drm_display_info. Calculated using data in EDID + * + * This struct is used to store a luminance range supported by panel + * as calculated using data from EDID's static hdr metadata. + * + * @min_luminance: This is the min supported luminance value + * + * @max_luminance: This is the max supported luminance value + */ +struct drm_luminance_range_info { + u32 min_luminance; + u32 max_luminance; +}; + +/** * enum drm_privacy_screen_status - privacy screen status * * This enum is used to track and control the state of the integrated privacy @@ -625,6 +641,11 @@ struct drm_display_info { struct drm_monitor_range_info monitor_range; /** + * @luminance_range: Luminance range supported by panel + */ + struct drm_luminance_range_info luminance_range; + + /** * @mso_stream_count: eDP Multi-SST Operation (MSO) stream count from * the DisplayID VESA vendor block. 0 for conventional Single-Stream * Transport (SST), or 2 or 4 MSO streams. |