33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ryzer58 <[email protected]>
|
|
Date: Mon, 23 Jun 2025 18:19:15 +0100
|
|
Subject: Backport null pointer check to drm HDMI atomic helper function
|
|
Backport fix from upstream kernel to address null pointer dereference in
|
|
drm_atomic_helper_connector_hdmi_check(). If these checks are not in place,
|
|
then drm_default_rgb_quant_range(), called by
|
|
drm_atomic_helper_connector_hdmi_check() would dereference the NULL pointer
|
|
to_match in drm_match_cea_mode().
|
|
|
|
Signed-off-by: Ryzer58 <[email protected]>
|
|
---
|
|
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
|
|
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
|
|
@@ -502,6 +502,9 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
|
|
connector_state_get_mode(new_conn_state);
|
|
int ret;
|
|
|
|
+ if (!new_conn_state->crtc || !new_conn_state->best_encoder)
|
|
+ return 0;
|
|
+
|
|
new_conn_state->hdmi.is_limited_range = hdmi_is_limited_range(connector, new_conn_state);
|
|
|
|
ret = hdmi_compute_config(connector, new_conn_state, mode);
|
|
--
|
|
Armbian
|
|
|