diff mbox series

[v2,1/4] drm/display: Add drm_luminance_range_info

Message ID 20220620072019.2710652-2-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series HDR aux backlight range calculation | expand

Commit Message

Hogander, Jouni June 20, 2022, 7:20 a.m. UTC
Add new data structure 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.

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>
---
 include/drm/drm_connector.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Jani Nikula June 23, 2022, 8:44 a.m. UTC | #1
On Mon, 20 Jun 2022, Jouni Högander <jouni.hogander@intel.com> wrote:
> Add new data structure 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.
>
> 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>

LGTM but I think I'd just fold this into the next patch that actually
uses it.

BR,
Jani.

> ---
>  include/drm/drm_connector.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 3ac4bf87f257..7d8eeac6cc68 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -322,6 +322,22 @@ struct drm_monitor_range_info {
>  	u8 max_vfreq;
>  };
>  
> +/**
> + * 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
>   *
> @@ -623,6 +639,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
diff mbox series

Patch

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 3ac4bf87f257..7d8eeac6cc68 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -322,6 +322,22 @@  struct drm_monitor_range_info {
 	u8 max_vfreq;
 };
 
+/**
+ * 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
  *
@@ -623,6 +639,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