mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Abhash Kumar Jha <a-kumar2@ti.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
	jernej.skrabec@gmail.com, s-jain1@ti.com, y-d@ti.com,
	benjamin.robin@bootlin.com, andrzej.hajda@intel.com,
	neil.armstrong@linaro.org, rfoss@kernel.org, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
	devarsht@ti.com, u-kumar1@ti.com, sjakhade@cadence.com
Subject: Re: [PATCH] drm/bridge: cdns-mhdp8546: Power on/off the PHY in probe/remove
Date: Tue, 24 Nov 2026 14:53:45 +0200	[thread overview]
Message-ID: <0a42d03c-f6cb-4d61-be9d-53b89b29753d@ideasonboard.com> (raw)
In-Reply-To: <20261124101747.2432344-1-a-kumar2@ti.com>

Hi,

On 24/11/2026 12:17, Abhash Kumar Jha wrote:
> The driver currently calls phy_init()/phy_exit() but never
> phy_power_on()/phy_power_off().
> 
> Follow the PHY API guide's recommendation to call phy_power_on and
> phy_power_off along with phy_init and phy_exit respectively to be
> compatible with different PHYs.
> 
> Signed-off-by: Abhash Kumar Jha <a-kumar2@ti.com>
> ---
>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> index f47717bd10798..86e850a4752dc 100644
> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
> @@ -2369,6 +2369,12 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
>   		goto plat_fini;
>   	}
>   
> +	ret = phy_power_on(mhdp->phy);
> +	if (ret < 0) {
> +		dev_err(mhdp->dev, "Failed to power on PHY: %d\n", ret);
> +		goto phy_exit;
> +	}
> +
>   	/* Initialize the work for modeset in case of link train failure */
>   	INIT_WORK(&mhdp->modeset_retry_work, cdns_mhdp_modeset_retry_fn);
>   	INIT_WORK(&mhdp->hpd_work, cdns_mhdp_hpd_work);
> @@ -2378,7 +2384,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
>   
>   	ret = cdns_mhdp_load_firmware(mhdp);
>   	if (ret)
> -		goto phy_exit;
> +		goto power_off;
>   
>   	if (mhdp->hdcp_supported)
>   		cdns_mhdp_hdcp_init(mhdp);
> @@ -2387,6 +2393,8 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
>   
>   	return 0;
>   
> +power_off:
> +	phy_power_off(mhdp->phy);
>   phy_exit:
>   	phy_exit(mhdp->phy);
>   plat_fini:
> @@ -2424,6 +2432,7 @@ static void cdns_mhdp_remove(struct platform_device *pdev)
>   				ERR_PTR(ret));
>   	}
>   
> +	phy_power_off(mhdp->phy);
>   	phy_exit(mhdp->phy);
>   
>   	if (mhdp->info && mhdp->info->ops && mhdp->info->ops->exit)

I think this one is fine, so:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

However, I fear there's something wrong with the torrent driver itself. 
I didn't study it carefully, but looks like it supports bootloader 
enabled PHY, and it then sets 'already_configured' field. When that's 
set, all these calls, and dp_configuration() are ignored. And that field 
is only cleared on system suspend hook. So it looks quite broken, if the 
PHY is enabled when the torrent driver probes, the DP driver can't 
configure it at all. Blanking the display or even unloading/loading the 
DP driver does not affect it.

Could you have a look at that too?

  Tomi


  reply	other threads:[~2026-11-24 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 10:17 Abhash Kumar Jha
2026-11-24 12:53 ` Tomi Valkeinen [this message]
2026-11-24 13:00   ` Benjamin Robin
2026-11-24 13:26     ` Tomi Valkeinen

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=0a42d03c-f6cb-4d61-be9d-53b89b29753d@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a-kumar2@ti.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=benjamin.robin@bootlin.com \
    --cc=devarsht@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=s-jain1@ti.com \
    --cc=simona@ffwll.ch \
    --cc=sjakhade@cadence.com \
    --cc=tzimmermann@suse.de \
    --cc=u-kumar1@ti.com \
    --cc=y-d@ti.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

all inboxes | Powered by JetHome®