public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
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	[thread overview]
Message-ID: <review-patch1-20260212222029.15777-2-jpeisach@ubuntu.com> (raw)
In-Reply-To: <20260212222029.15777-2-jpeisach@ubuntu.com>

Patch Review

This patch performs the core migration from `struct edid` to `const struct drm_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 *connector,
>  	return NULL;
>  }
>  
> -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_edid));
> +	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 = drm_get_edid(connector,
> -						      &amdgpu_connector->ddc_bus->aux.ddc);
> +		amdgpu_connector->edid = drm_edid_read_ddc(connector,
> +							  &amdgpu_connector->ddc_bus->aux.ddc);

The conversion from `drm_get_edid()` to `drm_edid_read_ddc()` is correct throughout.

> @@ -311,11 +311,11 @@ static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector)
>  	int ret;
>  
>  	if (amdgpu_connector->edid) {
> -		drm_connector_update_edid_property(connector, amdgpu_connector->edid);
> -		ret = drm_add_edid_modes(connector, amdgpu_connector->edid);
> +		drm_edid_connector_update(connector, amdgpu_connector->edid);
> +		ret = drm_edid_connector_add_modes(connector);
>  		return ret;
>  	}

The change to `drm_edid_connector_add_modes(connector)` is correct. The new API 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 *connector, bool force)
>  			ret = connector_status_connected;
>  		} else {
>  			amdgpu_connector->use_digital =
> -				!!(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;
>  	}
>  
> -	sad_count = drm_edid_to_speaker_allocation(amdgpu_connector->edid, &sadb);
> +	sad_count = drm_edid_to_speaker_allocation(drm_edid_raw(amdgpu_connector->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

  reply	other threads:[~2026-02-13  6:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 22:20 [PATCH 0/2] drm/amdgpu/amdgpu_connectors: Use struct drm_edid Joshua Peisach
2026-02-12 22:20 ` [PATCH 1/2] drm/amdgpu/amdgpu_connectors: use struct drm_edid instead of struct edid Joshua Peisach
2026-02-13  6:24   ` Claude Code Review Bot [this message]
2026-02-12 22:20 ` [PATCH 2/2] drm/amdgpu/amdgpu_connectors: remove amdgpu_connector_free_edid Joshua Peisach
2026-02-13  6:24   ` Claude review: " Claude Code Review Bot
2026-02-13  6:18 ` Claude review: drm/amdgpu/amdgpu_connectors: Use struct drm_edid Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch1-20260212222029.15777-2-jpeisach@ubuntu.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox