These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From dcc81b085f4bfb88985a78ced17b98bc7bfa0f73 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 21 Nov 2024 18:28:22 +0000
|
|
Subject: [PATCH] drm/vc4: hdmi: Add a clear_infoframe hook
|
|
|
|
If you disable HDR metadata, then the hardware should stop
|
|
sending the infoframe, and that is implemented by the
|
|
clear_infoframe hook which wasn't implemented. Add it.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 19 +++++++++++++++++++
|
|
1 file changed, 19 insertions(+)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -764,6 +764,24 @@ out:
|
|
return ret;
|
|
}
|
|
|
|
+static int vc4_hdmi_clear_infoframe(struct drm_connector *connector,
|
|
+ enum hdmi_infoframe_type type)
|
|
+{
|
|
+ struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
|
|
+ struct drm_device *drm = connector->dev;
|
|
+ int ret;
|
|
+ int idx;
|
|
+
|
|
+ if (!drm_dev_enter(drm, &idx))
|
|
+ return 0;
|
|
+
|
|
+ ret = vc4_hdmi_stop_packet(vc4_hdmi, type, true);
|
|
+ if (ret)
|
|
+ drm_err(drm, "Failed to wait for infoframe to go idle: %d\n", ret);
|
|
+
|
|
+ drm_dev_exit(idx);
|
|
+ return ret;
|
|
+}
|
|
#define SCRAMBLING_POLLING_DELAY_MS 1000
|
|
|
|
static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder)
|
|
@@ -1722,6 +1740,7 @@ vc4_hdmi_connector_clock_valid(const str
|
|
static const struct drm_connector_hdmi_funcs vc4_hdmi_hdmi_connector_funcs = {
|
|
.tmds_char_rate_valid = vc4_hdmi_connector_clock_valid,
|
|
.write_infoframe = vc4_hdmi_write_infoframe,
|
|
+ .clear_infoframe = vc4_hdmi_clear_infoframe,
|
|
};
|
|
|
|
#define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL
|