From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amdgpu/amdgpu_connectors: use struct drm_edid instead of struct edid Date: Fri, 13 Feb 2026 16:24:45 +1000 Message-ID: In-Reply-To: <20260212222029.15777-2-jpeisach@ubuntu.com> References: <20260212222029.15777-1-jpeisach@ubuntu.com> <20260212222029.15777-2-jpeisach@ubuntu.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This patch performs the core migration from `struct edid` to `const struct dr= m_edid`, updating the field type in `struct amdgpu_connector` and converting = all associated function calls to use the new API. > @@ -246,10 +246,10 @@ amdgpu_connector_find_encoder(struct drm_connector *c= onnector, > return NULL; > } > =20 > -static struct edid * > +static const struct drm_edid * > amdgpu_connector_get_hardcoded_edid(struct amdgpu_device *adev) > { > - return drm_edid_duplicate(drm_edid_raw(adev->mode_info.bios_hardcoded_edi= d)); > + return drm_edid_dup(adev->mode_info.bios_hardcoded_edid); > } The conversion from `drm_edid_duplicate(drm_edid_raw(...))` to `drm_edid_dup(= )` is correct and cleaner. > - amdgpu_connector->edid =3D drm_get_edid(connector, > - &amdgpu_connector->ddc_bus->aux.ddc); > + amdgpu_connector->edid =3D drm_edid_read_ddc(connector, > + &amdgpu_connector->ddc_bus->aux.ddc); The conversion from `drm_get_edid()` to `drm_edid_read_ddc()` is correct thro= ughout. > @@ -311,11 +311,11 @@ static int amdgpu_connector_ddc_get_modes(struct drm_= connector *connector) > int ret; > =20 > if (amdgpu_connector->edid) { > - drm_connector_update_edid_property(connector, amdgpu_connector->edid); > - ret =3D drm_add_edid_modes(connector, amdgpu_connector->edid); > + drm_edid_connector_update(connector, amdgpu_connector->edid); > + ret =3D drm_edid_connector_add_modes(connector); > return ret; > } The change to `drm_edid_connector_add_modes(connector)` is correct. The new A= PI retrieves the EDID from the connector's internal state that was set by the= earlier `drm_edid_connector_update()` call. > @@ -883,7 +883,7 @@ amdgpu_connector_vga_detect(struct drm_connector *conne= ctor, bool force) > ret =3D connector_status_connected; > } else { > amdgpu_connector->use_digital =3D > - !!(amdgpu_connector->edid->input & DRM_EDID_INPUT_DIGITAL); > + drm_edid_is_digital(amdgpu_connector->edid); Good use of the helper function instead of raw field access. > @@ -1298,7 +1298,7 @@ static void dce_v10_0_audio_write_speaker_allocation(= struct drm_encoder *encoder > return; > } > =20 > - sad_count =3D drm_edid_to_speaker_allocation(amdgpu_connector->edid, &sad= b); > + sad_count =3D drm_edid_to_speaker_allocation(drm_edid_raw(amdgpu_connecto= r->edid), &sadb); Correctly unwraps to the raw EDID for functions that haven't been updated to = accept `struct drm_edid`. Overall, this patch is well-executed with no issues found. --- Generated by Claude Code Patch Reviewer