[PATCH 4/4] Revert "drm/amd/display: implement force function in amdgpu_dm_connector_funcs"

Jani Nikula jani.nikula at intel.com
Tue Aug 22 12:01:40 UTC 2023


This reverts commit 0ba4a784a14592abed41873e339eab78ceb6e230.

drm_edid_override_connector_update() is *not* supposed to be used by
drivers directly.

>From the documentation:

  Only to be used from drm_helper_probe_single_connector_modes() as a
  fallback for when DDC probe failed during drm_get_edid() and caused
  the override/firmware EDID to be skipped.

It's impossible to unify firmare and override EDID handling and property
updates if drivers mess with this directly.

Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Alex Hung <alex.hung at amd.com>
Cc: Chao-kai Wang <Stylon.Wang at amd.com>
Cc: Daniel Wheeler <daniel.wheeler at amd.com>
Cc: Harry Wentland <harry.wentland at amd.com>
Cc: Hersen Wu <hersenxs.wu at amd.com>
Cc: Leo Li <sunpeng.li at amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
Cc: Wenchieh Chien <wenchieh.chien at amd.com>
Cc: David Airlie <airlied at gmail.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 +------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index adfe2fcb915c..25151085508f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6317,31 +6317,6 @@ amdgpu_dm_connector_late_register(struct drm_connector *connector)
 	return 0;
 }
 
-void amdgpu_dm_connector_funcs_force(struct drm_connector *connector)
-{
-	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
-	struct dc_link *dc_link = aconnector->dc_link;
-	struct dc_sink *dc_em_sink = aconnector->dc_em_sink;
-	struct edid *edid;
-
-	if (!connector->edid_override)
-		return;
-
-	drm_edid_override_connector_update(&aconnector->base);
-	edid = aconnector->base.edid_blob_ptr->data;
-	aconnector->edid = edid;
-
-	/* Update emulated (virtual) sink's EDID */
-	if (dc_em_sink && dc_link) {
-		memset(&dc_em_sink->edid_caps, 0, sizeof(struct dc_edid_caps));
-		memmove(dc_em_sink->dc_edid.raw_edid, edid, (edid->extensions + 1) * EDID_LENGTH);
-		dm_helpers_parse_edid_caps(
-			dc_link,
-			&dc_em_sink->dc_edid,
-			&dc_em_sink->edid_caps);
-	}
-}
-
 static const struct drm_connector_funcs amdgpu_dm_connector_funcs = {
 	.reset = amdgpu_dm_connector_funcs_reset,
 	.detect = amdgpu_dm_connector_detect,
@@ -6352,8 +6327,7 @@ static const struct drm_connector_funcs amdgpu_dm_connector_funcs = {
 	.atomic_set_property = amdgpu_dm_connector_atomic_set_property,
 	.atomic_get_property = amdgpu_dm_connector_atomic_get_property,
 	.late_register = amdgpu_dm_connector_late_register,
-	.early_unregister = amdgpu_dm_connector_unregister,
-	.force = amdgpu_dm_connector_funcs_force
+	.early_unregister = amdgpu_dm_connector_unregister
 };
 
 static int get_modes(struct drm_connector *connector)
-- 
2.39.2



More information about the amd-gfx mailing list