armbian_build/patch/kernel/archive/sunxi-6.13/patches.armbian/Revert-drm-sun4i-hdmi-switch-to-struct-drm_edid.patch
2025-03-21 10:24:35 +01:00

50 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 9 Sep 2024 14:40:49 +0300
Subject: Revert "drm/sun4i: hdmi: switch to struct drm_edid"
This reverts commit bd730c77fa37fe2dda4b6e23f6921ef8a9b1bb97.
---
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 18 ++++------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -218,24 +218,20 @@ sun4i_hdmi_connector_mode_valid(struct drm_connector *connector,
static int sun4i_hdmi_get_modes(struct drm_connector *connector)
{
struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector);
- const struct drm_edid *drm_edid;
+ struct edid *edid;
int ret;
- drm_edid = drm_edid_read_ddc(connector, hdmi->ddc_i2c ?: hdmi->i2c);
-
- drm_edid_connector_update(connector, drm_edid);
- cec_s_phys_addr(hdmi->cec_adap,
- connector->display_info.source_physical_address, false);
-
- if (!drm_edid)
+ edid = drm_get_edid(connector, hdmi->ddc_i2c ?: hdmi->i2c);
+ if (!edid)
return 0;
DRM_DEBUG_DRIVER("Monitor is %s monitor\n",
connector->display_info.is_hdmi ? "an HDMI" : "a DVI");
-
- ret = drm_edid_connector_add_modes(connector);
- drm_edid_free(drm_edid);
+ drm_connector_update_edid_property(connector, edid);
+ cec_s_phys_addr_from_edid(hdmi->cec_adap, edid);
+ ret = drm_add_edid_modes(connector, edid);
+ kfree(edid);
return ret;
}
--
Armbian