mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Dharma.B@microchip.com>
To: <mripard@kernel.org>
Cc: <Manikandan.M@microchip.com>, <andrzej.hajda@intel.com>,
	<neil.armstrong@linaro.org>, <rfoss@kernel.org>,
	<Laurent.pinchart@ideasonboard.com>, <jonas@kwiboo.se>,
	<jernej.skrabec@gmail.com>, <maarten.lankhorst@linux.intel.com>,
	<tzimmermann@suse.de>, <airlied@gmail.com>, <simona@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/3] drm/bridge: microchip-lvds: switch to use atomic variants
Date: Wed, 25 Jun 2025 03:42:32 +0000	[thread overview]
Message-ID: <13f93095-c339-4238-843b-1f92ea83018b@microchip.com> (raw)
In-Reply-To: <20250624-beautiful-goose-of-penetration-c4ffde@houat>

On 24/06/25 4:32 pm, Maxime Ripard wrote:
> On Tue, Jun 24, 2025 at 02:54:15PM +0530, Dharma Balasubiramani wrote:
>> Modernize the bridge ops to use atomic_enable/disable.
>>
>> Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
>> ---
>>   drivers/gpu/drm/bridge/microchip-lvds.c | 26 ++++++++++++++++++++++----
>>   1 file changed, 22 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c
>> index 42751124b868..e4ff46b03d54 100644
>> --- a/drivers/gpu/drm/bridge/microchip-lvds.c
>> +++ b/drivers/gpu/drm/bridge/microchip-lvds.c
>> @@ -111,7 +111,8 @@ static int mchp_lvds_attach(struct drm_bridge *bridge,
>>   				 bridge, flags);
>>   }
>>   
>> -static void mchp_lvds_enable(struct drm_bridge *bridge)
>> +static void mchp_lvds_atomic_pre_enable(struct drm_bridge *bridge,
>> +					struct drm_atomic_state *state)
>>   {
>>   	struct mchp_lvds *lvds = bridge_to_lvds(bridge);
>>   	int ret;
>> @@ -127,11 +128,26 @@ static void mchp_lvds_enable(struct drm_bridge *bridge)
>>   		dev_err(lvds->dev, "failed to get pm runtime: %d\n", ret);
>>   		return;
>>   	}
>> +}
>>   
>> +static void mchp_lvds_atomic_enable(struct drm_bridge *bridge,
>> +				    struct drm_atomic_state *state)
>> +{
>> +	struct mchp_lvds *lvds = bridge_to_lvds(bridge);
>>   	lvds_serialiser_on(lvds);
>>   }
>>
>> -static void mchp_lvds_disable(struct drm_bridge *bridge)
>> +static void mchp_lvds_atomic_disable(struct drm_bridge *bridge,
>> +				     struct drm_atomic_state *state)
>> +{
>> +	struct mchp_lvds *lvds = bridge_to_lvds(bridge);
>> +
>> +	/* Turn off the serialiser */
>> +	lvds_writel(lvds, LVDSC_CR, 0);
>> +}
>> +
>> +static void mchp_lvds_atomic_post_disable(struct drm_bridge *bridge,
>> +					  struct drm_atomic_state *state)
>>   {
>>   	struct mchp_lvds *lvds = bridge_to_lvds(bridge);
>>   
>> @@ -141,8 +157,10 @@ static void mchp_lvds_disable(struct drm_bridge *bridge)
>>   
>>   static const struct drm_bridge_funcs mchp_lvds_bridge_funcs = {
>>   	.attach = mchp_lvds_attach,
>> -	.enable = mchp_lvds_enable,
>> -	.disable = mchp_lvds_disable,
>> +	.atomic_pre_enable = mchp_lvds_atomic_pre_enable,
>> +	.atomic_enable = mchp_lvds_atomic_enable,
>> +	.atomic_disable = mchp_lvds_atomic_disable,
>> +	.atomic_post_disable = mchp_lvds_atomic_post_disable,
>>   };
> 
> Like I said to you earlier today, it's not just what you claim it is.
> You're splitting enable into atomic_pre_enable and atomic_enable, and
> disable into atomic_disable and atomic_post_disable.
> 
> At the *very* least this should be explained in your commit log, and it
> would be much better if it was done in another patch.

Sure, I’ll split the changes into two commits:

1. Convert .enable → atomic_enable() and .disable → atomic_disable()

2. Introduce atomic_pre_enable() and atomic_post_disable(), moving the 
sleepable operations accordingly.


> 
> Maxime


-- 
With Best Regards,
Dharma B.

  reply	other threads:[~2025-06-25  3:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  9:24 [PATCH v4 0/3] drm/bridge: microchip-lvds: clean up and fix bus formats Dharma Balasubiramani
2025-06-24  9:24 ` [PATCH v4 1/3] drm/bridge: microchip-lvds: drop unused drm_panel Dharma Balasubiramani
2025-06-24 10:42   ` Laurent Pinchart
2025-06-24 10:46     ` Dharma.B
2025-06-24 10:50       ` Laurent Pinchart
2025-06-24 10:53         ` Dharma.B
2025-06-24  9:24 ` [PATCH v4 2/3] drm/bridge: microchip-lvds: switch to use atomic variants Dharma Balasubiramani
2025-06-24 11:02   ` Maxime Ripard
2025-06-25  3:42     ` Dharma.B [this message]
2025-06-24  9:24 ` [PATCH v4 3/3] drm/bridge: microchip-lvds: fix bus format mismatch with VESA displays Dharma Balasubiramani

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=13f93095-c339-4238-843b-1f92ea83018b@microchip.com \
    --to=dharma.b@microchip.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Manikandan.M@microchip.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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®