All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kory Maincent" <kory.maincent@bootlin.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RFC v2 3/4] drm/bridge: Wire drmm_connector_dp_init() via new DRM_BRIDGE_OP_DP flag
Date: Fri, 19 Jun 2026 14:18:35 +0000	[thread overview]
Message-ID: <20260619141835.B94431F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260619-feat_link_cap-v2-3-a3dec4c02ad9@bootlin.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Unconditional call to drmm_connector_dp_init() breaks bridge chains with downstream format converters.
- [Low] Kernel-doc for DRM_BRIDGE_OP_DP incorrectly references a non-existent structure member.
--

commit 95b54bb01e2f24e6a00ddf825b25aaa6985fa864
Author: Kory Maincent <kory.maincent@bootlin.com>

drm/bridge: Wire drmm_connector_dp_init() via new DRM_BRIDGE_OP_DP flag
    
Introduce DRM_BRIDGE_OP_DP to indicate bridges that provide DP connector
operations. Update drm_bridge_connector_init() to use
drmm_connector_dp_init() when this flag is present to expose link training
state properties.

> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
> index 39cc18f78eda1..5238b1ec738ce 100644
> --- a/drivers/gpu/drm/display/drm_bridge_connector.c
> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c

[ ... ]

> @@ -986,6 +1003,13 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
>  					       max_bpc);
>  		if (ret)
>  			return ERR_PTR(ret);
> +	} else if (bridge_connector->bridge_dp) {
> +		ret = drmm_connector_dp_init(drm, connector,
> +					     &drm_bridge_connector_funcs,
> +					     bridge_connector->bridge_dp->dp_link_caps,
> +					     connector_type, ddc);
> +		if (ret)
> +			return ERR_PTR(ret);

[Severity: High]
If a DRM bridge chain consists of a DisplayPort transmitter followed by a
format-converting bridge (e.g., DP-to-VGA or DP-to-LVDS), the final
connector_type of the chain will be the output format (like
DRM_MODE_CONNECTOR_VGA).

Since drmm_connector_dp_init() explicitly enforces that connector_type must
be DRM_MODE_CONNECTOR_DisplayPort or DRM_MODE_CONNECTOR_eDP, will this call
immediately return -EINVAL and break display initialization for legitimate
format-converted hardware combinations?

Does the branch condition need to verify the final connector_type is actually
DP/eDP before forcing the DP initialization path?

>  	} else {
>  		ret = drmm_connector_init(drm, connector,

[ ... ]

> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index a8d67bd9ee505..63db754d21146 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -1092,6 +1092,14 @@ enum drm_bridge_ops {
>  	 * &drm_bridge_funcs->hdmi_clear_spd_infoframe callbacks.
>  	 */
>  	DRM_BRIDGE_OP_HDMI_SPD_INFOFRAME = BIT(10),
> +	/**
> +	 * @DRM_BRIDGE_OP_DP: The bridge provides DisplayPort connector
> +	 * operations, including link training support. Bridges that set
> +	 * this flag must provide DisplayPort-related information and
> +	 * fill the &drm_bridge->dp_link_train_caps link training

[Severity: Low]
This isn't a bug, but there's a typo in the documentation. It references
&drm_bridge->dp_link_train_caps, but the actual structure member added
in this patch is named dp_link_caps.

> +	 * capabilities.
> +	 */
> +	DRM_BRIDGE_OP_DP = BIT(11),
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260619-feat_link_cap-v2-0-a3dec4c02ad9@bootlin.com?part=3

  reply	other threads:[~2026-06-19 14:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 14:08 [PATCH RFC v2 0/4] Add support for DisplayPort link training information report Kory Maincent
2026-06-19 14:08 ` [PATCH RFC v2 1/4] drm: Introduce DisplayPort connector helpers with link training state Kory Maincent
2026-06-19 14:23   ` sashiko-bot
2026-06-19 14:08 ` [PATCH RFC v2 2/4] drm/i915/display/dp: Adopt dp_connector helpers to expose " Kory Maincent
2026-06-19 14:37   ` sashiko-bot
2026-06-19 14:08 ` [PATCH RFC v2 3/4] drm/bridge: Wire drmm_connector_dp_init() via new DRM_BRIDGE_OP_DP flag Kory Maincent
2026-06-19 14:18   ` sashiko-bot [this message]
2026-06-19 14:08 ` [PATCH RFC v2 4/4] drm/mediatek: Use dp_connector helpers to report link training state Kory Maincent
2026-06-19 14:20   ` sashiko-bot
2026-06-19 14:18 ` ✗ Fi.CI.BUILD: failure for Add support for DisplayPort link training information report (rev2) Patchwork
2026-06-19 17:49 ` [PATCH RFC v2 0/4] Add support for DisplayPort link training information report Kory Maincent

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=20260619141835.B94431F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kory.maincent@bootlin.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.