[PATCH v5 15/17] drm/bridge: analogix_dp: Remove panel disabling and enabling in analogix_dp_set_bridge()

Damon Ding damon.ding at rock-chips.com
Wed Sep 24 19:19:26 PDT 2025


Hi Dmitry,

On 9/12/2025 7:09 PM, Dmitry Baryshkov wrote:
> On Fri, Sep 12, 2025 at 04:58:44PM +0800, Damon Ding wrote:
>> The &drm_panel_funcs.enable() and &drm_panel_funcs.disable() mainly
>> help turn on/off the backlight to make the image visible, and the
>> backlight operations are even needless if drm_panel_of_backlight() or
>> drm_panel_dp_aux_backlight() is applied, in which case the enabling
>> and disabling process just add necessary delays.
> 
> Not necessary, it can actually be turning the panel off and on. Maybe
> it's worth squashing this patch into the panel_bridge conversion as it
> will point out that these functions are still being called at a correct
> times by the DRM bridge framework.
> 

Will do in v6.

>>
>> Therefore, it should make sense to remove panel disabling and move
>> panel enabling after analogix_dp_set_bridge() finished.
>>
>> Signed-off-by: Damon Ding <damon.ding at rock-chips.com>
>> ---
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> index 66d0cca1f268..c98058e9c917 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -749,9 +749,6 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
>>   {
>>   	int ret;
>>   
>> -	/* Keep the panel disabled while we configure video */
>> -	drm_panel_disable(dp->plat_data->panel);
>> -
>>   	ret = analogix_dp_train_link(dp);
>>   	if (ret) {
>>   		dev_err(dp->dev, "unable to do link train, ret=%d\n", ret);
>> @@ -771,9 +768,6 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
>>   		return ret;
>>   	}
>>   
>> -	/* Safe to enable the panel now */
>> -	drm_panel_enable(dp->plat_data->panel);
>> -
>>   	/* Check whether panel supports fast training */
>>   	ret = analogix_dp_fast_link_train_detection(dp);
>>   	if (ret)
>> @@ -1156,6 +1150,7 @@ static void analogix_dp_bridge_atomic_enable(struct drm_bridge *bridge,
>>   	while (timeout_loop < MAX_PLL_LOCK_LOOP) {
>>   		if (analogix_dp_set_bridge(dp) == 0) {
>>   			dp->dpms_mode = DRM_MODE_DPMS_ON;
>> +			drm_panel_enable(dp->plat_data->panel);
>>   			return;
>>   		}
>>   		dev_err(dp->dev, "failed to set bridge, retry: %d\n",
>> -- 
>> 2.34.1
>>
> 

Best regards,
Damon




More information about the linux-arm-kernel mailing list