[PATCH RFC 2/2] drm/bridge: samsung-dsim: move clk setup to enable

Jan Remmet J.Remmet at phytec.de
Thu Sep 25 04:58:21 PDT 2025


Am 25.09.25 um 13:47 schrieb Marek Szyprowski:
> On 25.09.2025 13:35, Jan Remmet wrote:
>> Move the samsung_dsim_init and so samsung_dsim_enable_clock to
>> samsung_dsim_atomic_enable.
>>
>> The base clocks may not be ready when pre_enable is called.
>>
>> commit c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable
>> and post-disable") points out that pre_enable hook definition says that
>> "The display pipe (i.e. clocks and timing signals) feeding this bridge
>> will not yet be running when this callback is called".
>>
>> Signed-off-by: Jan Remmet <j.remmet at phytec.de>
> 
> Isn't this similar to this
> patch https://lore.kernel.org/all/20250619-samsung-dsim-fix-v1-1-6b5de68fb115@ideasonboard.com/
> ?

Indeed thanks for pointing to it. I'll try this together with my 
ti-sn65dsi83 changes and send a Tested-by.
I wonder why it is still on the list.

Jan
> 
> 
>> ---
>>    drivers/gpu/drm/bridge/samsung-dsim.c | 14 ++++++++------
>>    1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
>> index b5dd71f6a99057d98cf15090f6081d0460836ec5..53ce3228586ac0f6abfa252b7c15d9eba459c96c 100644
>> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
>> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
>> @@ -1460,6 +1460,14 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,
>>    	}
>>    
>>    	dsi->state |= DSIM_STATE_ENABLED;
>> +}
>> +
>> +static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,
>> +				       struct drm_atomic_state *state)
>> +{
>> +	pr_debug("%s called from %pS\n", __func__, __builtin_return_address(0));
>> +	struct samsung_dsim *dsi = bridge_to_dsi(bridge);
>> +	int ret;
>>    
>>    	/*
>>    	 * For Exynos-DSIM the downstream bridge, or panel are expecting
>> @@ -1470,12 +1478,6 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,
>>    		if (ret)
>>    			return;
>>    	}
>> -}
>> -
>> -static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,
>> -				       struct drm_atomic_state *state)
>> -{
>> -	struct samsung_dsim *dsi = bridge_to_dsi(bridge);
>>    
>>    	samsung_dsim_set_display_mode(dsi);
>>    	samsung_dsim_set_display_enable(dsi, true);
>>
> Best regards



More information about the linux-arm-kernel mailing list