Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] drm/i915/dp: incomplete downstream ports signature match
--

commit 025075775ae9b93d6ea2089caff0dfbc102027cd
Author: Conor Svensson <[email protected]>

drm/i915/dp: Ignore inconsistent TMDS limits on an Anker DP branch

This commit adds an experimental workaround to clear derived TMDS limits
for a specific Anker DP branch device that reports inconsistent capabilities
when hotplugged, which can cause the loss of native modes.

Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/17180

> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0cd5e6b5034cf..beba989860056 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
[ ... ]
> +static bool
> +intel_dp_has_anker_tmds_mismatch(struct intel_dp *intel_dp,
> +                              const struct drm_edid *drm_edid)
> +{
> +     static const struct drm_dp_dpcd_ident branch = {
> +             .oui = { 0x90, 0xcc, 0x24 },
> +             .device_id = { 'S', 'Y', 'N', 'A', 'b', 0x10 },
> +             .hw_rev = 0x10,
> +             .sw_major_rev = 0x06,
> +             .sw_minor_rev = 0x05,
> +     };
> +     static const u8 downstream_ports[] = {
> +             0x0a, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +     };
[ ... ]
> +     return !memcmp(&intel_dp->desc.ident, &branch, sizeof(branch)) &&
> +             !memcmp(intel_dp->downstream_ports, downstream_ports,
> +                     sizeof(downstream_ports)) &&

[Severity: Low]
Does this comparison in intel_dp_has_anker_tmds_mismatch() strictly validate
the entire downstream port state as intended?

Because the local downstream_ports array is defined with only 8 elements,
sizeof(downstream_ports) evaluates to 8. However, intel_dp->downstream_ports
is a 16-byte array (DP_MAX_DOWNSTREAM_PORTS).

This partial match could theoretically trigger the quirk on a different device
that shares the same firmware and first 8 bytes of port capabilities but
differs in the remaining 8 bytes, which seems contrary to the deliberately
narrow intent described in the commit message.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to