aboutsummaryrefslogtreecommitdiffstats
path: root/tools/e2fsprogs
Commit message (Expand)AuthorAgeFilesLines
* e2fsprogs: update to 1.42.8, fixes a build errorFelix Fietkau2013-10-281-2/+2
* build: BSD compile fixesFelix Fietkau2013-03-072-0/+37
* e2fsprogs: upgrade to version 1.42.7Luka Perkov2013-02-281-3/+3
* tools: e2fsprogs: delete doc/ directory after unpacking to ensure that makein...Jo-Philipp Wich2012-12-021-0/+5
* tools/e2fsprogs: enable parallel buildsFelix Fietkau2012-09-151-0/+2
* use HOST_STATIC_LINKING instead of hardcoding -staticJo-Philipp Wich2012-08-121-1/+1
* e2fsprogs: link staticallyJo-Philipp Wich2012-08-101-0/+1
* tools/e2fsprogs: don't build e4defragGabor Juhos2012-06-191-0/+11
* e2fsprogs: fix md5sum issueLuka Perkov2012-06-171-1/+1
* e2fsprogs: update to 1.42.4Luka Perkov2012-06-171-2/+2
* tools/e2fsprogs: disable building elf shared libraries, it is unnecessary and...Felix Fietkau2012-06-101-1/+1
* more e2fsprogs fixesJohn Crispin2012-06-101-3/+2
* fix build breakage introduced by [32142]John Crispin2012-06-101-1/+2
* e2fsprogs: update to 1.42.3Luka Perkov2012-06-096-115/+4
* e2fsprogs: add posix_memalign related portability patch from #8508Felix Fietkau2012-06-071-0/+31
* tools/e2fsprogs: move uuid/uuid.h into a subdirectory, it conflicts with a sy...Felix Fietkau2011-02-201-0/+3
* revert r24851, it breaks compilation on many hostsJo-Philipp Wich2011-01-012-2/+28
* tools/e2fsprogs: update to version 1.41.14Alexandros C. Couloumbis2010-12-292-28/+2
* e2fsprogs: add two compile fixes.Hauke Mehrtens2010-12-192-0/+62
* e2fsprogs: update to version 1.41.13Hauke Mehrtens2010-12-181-2/+2
* tools/e2fsprogs: fix freebsd compile issueAlexandros C. Couloumbis2010-11-241-0/+18
* tools/e2fsprogs: update to e2fsprogs-1.41.12Alexandros C. Couloumbis2010-11-241-2/+2
* e2fsprogs: fix libuuid installationFelix Fietkau2010-11-221-0/+1
* e2fsprogs: clean up the makefile and install libuuidFelix Fietkau2010-11-221-29/+3
* add e2fsprogs to tools and use that instead of libuuidImre Kaloz2010-11-222-0/+77
me.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From 82a5aa1df1b04efef46c7be82a7d71ea5300ce92 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Wed, 2 Dec 2020 18:36:24 +0000
Subject: [PATCH] drm/vc4: Add HDR metadata property to the VC5 HDMI
 connectors

Now that we can export deeper colour depths, add in the signalling
for HDR metadata.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 28 ++++++++++++++++++++++++++++
 drivers/gpu/drm/vc4/vc4_hdmi.h |  3 +++
 2 files changed, 31 insertions(+)

--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -312,6 +312,10 @@ static int vc4_hdmi_connector_init(struc
 	connector->doublescan_allowed = 0;
 	connector->stereo_allowed = 1;
 
+	if (vc4_hdmi->variant->supports_hdr)
+		drm_object_attach_property(&connector->base,
+			connector->dev->mode_config.hdr_output_metadata_property, 0);
+
 	drm_connector_attach_encoder(connector, encoder);
 
 	return 0;
@@ -451,6 +455,25 @@ static void vc4_hdmi_set_audio_infoframe
 	vc4_hdmi_write_infoframe(encoder, &frame);
 }
 
+static void vc4_hdmi_set_hdr_infoframe(struct drm_encoder *encoder)
+{
+	struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
+	struct drm_connector *connector = &vc4_hdmi->connector;
+	struct drm_connector_state *conn_state = connector->state;
+	union hdmi_infoframe frame;
+
+	if (!vc4_hdmi->variant->supports_hdr)
+		return;
+
+	if (!conn_state->hdr_output_metadata)
+		return;
+
+	if (drm_hdmi_infoframe_set_hdr_metadata(&frame.drm, conn_state))
+		return;
+
+	vc4_hdmi_write_infoframe(encoder, &frame);
+}
+
 static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder)
 {
 	struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
@@ -463,6 +486,8 @@ static void vc4_hdmi_set_infoframes(stru
 	 */
 	if (vc4_hdmi->audio.streaming)
 		vc4_hdmi_set_audio_infoframe(encoder);
+
+	vc4_hdmi_set_hdr_infoframe(encoder);
 }
 
 static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,
@@ -2300,6 +2325,7 @@ static const struct vc4_hdmi_variant bcm
 	.phy_rng_enable		= vc4_hdmi_phy_rng_enable,
 	.phy_rng_disable	= vc4_hdmi_phy_rng_disable,
 	.channel_map		= vc4_hdmi_channel_map,
+	.supports_hdr		= false,
 };
 
 static const struct vc4_hdmi_variant bcm2711_hdmi0_variant = {
@@ -2327,6 +2353,7 @@ static const struct vc4_hdmi_variant bcm
 	.phy_rng_enable		= vc5_hdmi_phy_rng_enable,
 	.phy_rng_disable	= vc5_hdmi_phy_rng_disable,
 	.channel_map		= vc5_hdmi_channel_map,
+	.supports_hdr		= true,
 };
 
 static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
@@ -2354,6 +2381,7 @@ static const struct vc4_hdmi_variant bcm
 	.phy_rng_enable		= vc5_hdmi_phy_rng_enable,
 	.phy_rng_disable	= vc5_hdmi_phy_rng_disable,
 	.channel_map		= vc5_hdmi_channel_map,
+	.supports_hdr		= true,
 };
 
 static const struct of_device_id vc4_hdmi_dt_match[] = {
--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
@@ -99,6 +99,9 @@ struct vc4_hdmi_variant {
 
 	/* Callback to get channel map */
 	u32 (*channel_map)(struct vc4_hdmi *vc4_hdmi, u32 channel_mask);
+
+	/* Enables HDR metadata */
+	bool supports_hdr;
 };
 
 /* HDMI audio information */