Message ID | 20240706034004.801329-4-mwen@igalia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid | expand |
On 2024-07-05 21:35, Melissa Wen wrote: > Connectors have source physical address available in display > info. Use drm_dp_cec_attach() to use it instead of parsing the EDID > again. > > Signed-off-by: Melissa Wen <mwen@igalia.com> > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 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 49b8c5b00728..163850aeac4a 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -3477,10 +3477,9 @@ void amdgpu_dm_update_connector_after_detect( > aconnector->drm_edid = drm_edid_alloc(edid, sink->dc_edid.length); > drm_edid_connector_update(connector, aconnector->drm_edid); > > - /* FIXME: Get rid of drm_edid_raw() */ > if (aconnector->dc_link->aux_mode) > - drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, > - drm_edid_raw(aconnector->drm_edid)); drm_dp_cec_set_edid is removed here. I guess it doesn't matter if edid or drm_edid_raw(aconnector->drm_edid) is past here. > + drm_dp_cec_attach(&aconnector->dm_dp_aux.aux, > + connector->display_info.source_physical_address); > } > > if (!aconnector->timing_requested) {
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 49b8c5b00728..163850aeac4a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3477,10 +3477,9 @@ void amdgpu_dm_update_connector_after_detect( aconnector->drm_edid = drm_edid_alloc(edid, sink->dc_edid.length); drm_edid_connector_update(connector, aconnector->drm_edid); - /* FIXME: Get rid of drm_edid_raw() */ if (aconnector->dc_link->aux_mode) - drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, - drm_edid_raw(aconnector->drm_edid)); + drm_dp_cec_attach(&aconnector->dm_dp_aux.aux, + connector->display_info.source_physical_address); } if (!aconnector->timing_requested) {
Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen <mwen@igalia.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)