From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Marijn Suijten <marijn.suijten@somainline.org>
Cc: <linux-arm-msm@vger.kernel.org>,
<freedreno@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] drm/msm/dpu: Set DATABUS_WIDEN on command mode encoders
Date: Fri, 16 Jun 2023 14:18:39 -0700 [thread overview]
Message-ID: <cce68370-3fd9-4c9a-258e-af0d5d057fda@quicinc.com> (raw)
In-Reply-To: <c74c9e0e-d059-f0e3-4350-03089c37131a@linaro.org>
On 6/14/2023 12:56 AM, Dmitry Baryshkov wrote:
> On 14/06/2023 04:57, Jessica Zhang wrote:
>> Add a DPU INTF op to set the DATABUS_WIDEN register to enable the
>> databus-widen mode datapath.
>>
>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>> ---
>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 3 +++
>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 12 ++++++++++++
>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 3 +++
>> 3 files changed, 18 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>> index b856c6286c85..124ba96bebda 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
>> @@ -70,6 +70,9 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
>> if (intf_cfg.dsc != 0 && phys_enc->hw_intf->ops.enable_compression)
>> phys_enc->hw_intf->ops.enable_compression(phys_enc->hw_intf);
>> +
>> + if (phys_enc->hw_intf->ops.enable_widebus)
>> + phys_enc->hw_intf->ops.enable_widebus(phys_enc->hw_intf);
>
> No. Please provide a single function which takes necessary
> configuration, including compression and wide_bus_enable.
>
There are two ways to look at this. Your point is coming from the
perspective that its programming the same register but just a different
bit. But that will also make it a bit confusing.
So lets say the function is called intf_cfg2_xxx(..., bool widebus, bool
data_compress)
Now for the caller who wants to just enable widebus this will be
intf_cfg2_xxx(....., true, false)
if we want to do both
intf_cfg2_xxx(...., true, true)
the last one where we want to do just data_compress(highly unlikely and
not recommended)
intf_cfg2_xxx(...., false, true)
Now someone looking at the code will have to go and find out what each
bool is.
Whereas with separate ops, its kind of implicit.
For that reason, I dont think this patch is bad at all.
next prev parent reply other threads:[~2023-06-16 21:19 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 1:57 [PATCH 0/3] Add support for databus widen mode Jessica Zhang
2023-06-14 1:57 ` [PATCH 1/3] drm/msm/dpu: Add DPU_INTF_DATABUS_WIDEN feature flag for DPU >= 5.0 Jessica Zhang
2023-06-14 7:50 ` Dmitry Baryshkov
2023-06-14 11:42 ` Marijn Suijten
2023-06-14 12:01 ` Dmitry Baryshkov
2023-06-14 12:23 ` Marijn Suijten
2023-06-14 19:35 ` Abhinav Kumar
2023-06-14 19:54 ` Abhinav Kumar
2023-06-14 20:39 ` [Freedreno] " Abhinav Kumar
2023-06-14 20:43 ` Dmitry Baryshkov
2023-06-16 21:10 ` Abhinav Kumar
2023-06-17 0:37 ` Dmitry Baryshkov
2023-06-20 21:37 ` Jessica Zhang
2023-06-20 22:11 ` Dmitry Baryshkov
2023-06-20 23:37 ` Jessica Zhang
2023-06-14 21:41 ` Marijn Suijten
2023-06-16 21:13 ` Abhinav Kumar
2023-06-16 21:58 ` Marijn Suijten
2023-06-14 22:49 ` Marijn Suijten
2023-06-16 21:06 ` Abhinav Kumar
2023-06-16 22:00 ` Marijn Suijten
2023-06-14 1:57 ` [PATCH 2/3] drm/msm/dpu: Set DATABUS_WIDEN on command mode encoders Jessica Zhang
2023-06-14 7:56 ` Dmitry Baryshkov
2023-06-16 21:18 ` Abhinav Kumar [this message]
2023-06-16 21:54 ` Marijn Suijten
2023-06-17 0:35 ` Dmitry Baryshkov
2023-06-20 21:38 ` Jessica Zhang
2023-06-20 22:10 ` Dmitry Baryshkov
2023-06-21 15:17 ` Marijn Suijten
2023-06-21 16:36 ` Dmitry Baryshkov
2023-06-21 19:00 ` Marijn Suijten
2023-06-21 23:01 ` Abhinav Kumar
2023-06-21 23:46 ` Dmitry Baryshkov
2023-06-22 22:37 ` Abhinav Kumar
2023-06-22 23:14 ` Dmitry Baryshkov
2023-06-22 23:37 ` [Freedreno] " Abhinav Kumar
2023-06-29 17:26 ` Abhinav Kumar
2023-06-29 17:37 ` Jessica Zhang
2023-06-14 1:57 ` [PATCH 3/3] drm/msm/dsi: Enable DATABUS_WIDEN for DSI command mode Jessica Zhang
2023-06-14 7:49 ` Dmitry Baryshkov
2023-06-14 10:03 ` Marijn Suijten
2023-06-22 23:04 ` Abhinav Kumar
2023-06-23 7:02 ` Marijn Suijten
2023-06-16 21:23 ` Abhinav Kumar
2023-06-14 9:56 ` Marijn Suijten
2023-06-23 0:01 ` [Freedreno] " Abhinav Kumar
2023-06-23 0:41 ` Dmitry Baryshkov
2023-06-23 7:19 ` Marijn Suijten
2023-06-23 17:29 ` Abhinav Kumar
2023-06-23 20:14 ` Marijn Suijten
2023-06-23 20:34 ` Abhinav Kumar
2023-06-23 21:33 ` Marijn Suijten
2023-06-23 21:47 ` Abhinav Kumar
2023-06-14 10:09 ` [PATCH 0/3] Add support for databus widen mode Marijn Suijten
2023-06-16 11:30 ` 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=cce68370-3fd9-4c9a-258e-af0d5d057fda@quicinc.com \
--to=quic_abhinavk@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_jesszhan@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;
as well as URLs for NNTP newsgroup(s).