[PATCH v3 16/39] drm/bridge: cdns-mhdp8546: clear the EDID property on failures

Jani Nikula jani.nikula at intel.com
Tue Jan 23 19:37:22 UTC 2024


If EDID read fails, clear the EDID property.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
index e44cb89c33f0..e226acc5c15e 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
@@ -1524,12 +1524,14 @@ static int cdns_mhdp_get_modes(struct drm_connector *connector)
 		return 0;
 
 	drm_edid = cdns_mhdp_edid_read(mhdp, connector);
+
+	drm_edid_connector_update(connector, drm_edid);
+
 	if (!drm_edid) {
 		dev_err(mhdp->dev, "Failed to read EDID\n");
 		return 0;
 	}
 
-	drm_edid_connector_update(connector, drm_edid);
 	num_modes = drm_edid_connector_add_modes(connector);
 	drm_edid_free(drm_edid);
 
-- 
2.39.2



More information about the dri-devel mailing list