mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Rob Clark <robdclark@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>, <quic_abhinavk@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/4] drm/msm/dpu: Move DPU encoder wide_bus_en setting
Date: Mon, 7 Aug 2023 16:17:28 -0700	[thread overview]
Message-ID: <9918624f-184d-3ddc-189b-35b162ef5b18@quicinc.com> (raw)
In-Reply-To: <mdmxxxs5atqtunsast542fucmoewpvjjqj7bdhbs2yuzgv52ws@qbrdltjo3734>



On 8/2/2023 12:32 PM, Marijn Suijten wrote:
> I find this title very undescriptive, it doesn't really explain from/to
> where this move is happening nor why.
> 
> On 2023-08-02 11:08:48, Jessica Zhang wrote:
>> Move the setting of dpu_enc.wide_bus_en to
>> dpu_encoder_virt_atomic_enable() so that it mirrors the setting of
>> dpu_enc.dsc.
> 
> mirroring "the setting of dpu_enc.dsc" very much sounds like you are
> mirroring _its value_, but that is not the case.  You are moving the
> initialization (or just setting, because it could also be overwriting?)
> to _the same place_ where .dsc is assigned.

Hi Marijn,

Hmm.. got it. Will reword it to "mirror how dpu_enc.dsc is being set" if 
that makes it clearer.

> 
> I am pretty sure that this has a runtime impact which we discussed
> before (hotplug...?) but the commit message omits that.  This is
> mandatory.

I'm assuming the prior discussion you're referring to is with Kuogee on 
his DSC fix [1]. Unlike DSC, both DSI and DP know if wide bus is enabled 
upon initialization.

The main reasons the setting of the wide_bus_en flag was moved here were

1) to mirror how dpu_enc.dsc was being set (as stated in the commit 
message) as wide bus is related to DSC,

and 2) account for the possibility of DSC for DSI being set during 
runtime in the future.

Thanks,

Jessica Zhang

[1] https://patchwork.freedesktop.org/patch/543867/

> 
> - Marijn
> 
>>
>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 +++++++----
>>   1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> index d34e684a4178..3dcd37c48aac 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> @@ -1194,11 +1194,18 @@ static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc,
>>   	struct dpu_encoder_virt *dpu_enc = NULL;
>>   	int ret = 0;
>>   	struct drm_display_mode *cur_mode = NULL;
>> +	struct msm_drm_private *priv = drm_enc->dev->dev_private;
>> +	struct msm_display_info *disp_info;
>>   
>>   	dpu_enc = to_dpu_encoder_virt(drm_enc);
>> +	disp_info = &dpu_enc->disp_info;
>>   
>>   	dpu_enc->dsc = dpu_encoder_get_dsc_config(drm_enc);
>>   
>> +	if (disp_info->intf_type == INTF_DP)
>> +		dpu_enc->wide_bus_en = msm_dp_wide_bus_available(
>> +				priv->dp[disp_info->h_tile_instance[0]]);
>> +
>>   	mutex_lock(&dpu_enc->enc_lock);
>>   	cur_mode = &dpu_enc->base.crtc->state->adjusted_mode;
>>   
>> @@ -2383,10 +2390,6 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
>>   	timer_setup(&dpu_enc->frame_done_timer,
>>   			dpu_encoder_frame_done_timeout, 0);
>>   
>> -	if (disp_info->intf_type == INTF_DP)
>> -		dpu_enc->wide_bus_en = msm_dp_wide_bus_available(
>> -				priv->dp[disp_info->h_tile_instance[0]]);
>> -
>>   	INIT_DELAYED_WORK(&dpu_enc->delayed_off_work,
>>   			dpu_encoder_off_work);
>>   	dpu_enc->idle_timeout = IDLE_TIMEOUT;
>>
>> -- 
>> 2.41.0
>>

  reply	other threads:[~2023-08-07 23:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 18:08 [PATCH v3 0/4] drm/msm: Enable widebus for DSI Jessica Zhang
2023-08-02 18:08 ` [PATCH v3 1/4] drm/msm/dpu: Move DPU encoder wide_bus_en setting Jessica Zhang
2023-08-02 18:22   ` Dmitry Baryshkov
2023-08-02 19:32   ` Marijn Suijten
2023-08-07 23:17     ` Jessica Zhang [this message]
2023-08-02 18:08 ` [PATCH v3 2/4] drm/msm/dpu: Enable widebus for DSI INTF Jessica Zhang
2023-08-02 18:20   ` Dmitry Baryshkov
2023-08-07 21:40     ` Jessica Zhang
2023-08-17 17:07       ` Dmitry Baryshkov
2023-08-02 19:39   ` Marijn Suijten
2023-08-07 22:21     ` Jessica Zhang
2023-08-02 18:08 ` [PATCH v3 3/4] drm/msm/dsi: Add DATABUS_WIDEN MDP_CTRL2 bit Jessica Zhang
2023-08-02 18:26   ` Dmitry Baryshkov
2023-08-02 18:08 ` [PATCH v3 4/4] drm/msm/dsi: Enable widebus for DSI Jessica Zhang
2023-08-02 18:25   ` Dmitry Baryshkov

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=9918624f-184d-3ddc-189b-35b162ef5b18@quicinc.com \
    --to=quic_jesszhan@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /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®