From: Vinod Koul <vkoul@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>,
linux-arm-msm@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Jonathan Marek <jonathan@marek.ca>,
Abhinav Kumar <abhinavk@codeaurora.org>,
Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH 08/11] drm/msm/disp/dpu1: Add support for DSC in encoder
Date: Wed, 6 Oct 2021 18:13:16 +0530 [thread overview]
Message-ID: <YV2Z5JbfFAgLo0n6@matsya> (raw)
In-Reply-To: <0227846a-47b1-96e7-f14c-7dc3b4f1ba47@linaro.org>
On 29-07-21, 23:54, Dmitry Baryshkov wrote:
> On 15/07/2021 09:52, Vinod Koul wrote:
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> > index 8d942052db8a..41140b781e66 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> > @@ -21,12 +21,17 @@
> > #include "dpu_hw_intf.h"
> > #include "dpu_hw_ctl.h"
> > #include "dpu_hw_dspp.h"
> > +#include "dpu_hw_dsc.h"
> > #include "dpu_formats.h"
> > #include "dpu_encoder_phys.h"
> > #include "dpu_crtc.h"
> > #include "dpu_trace.h"
> > #include "dpu_core_irq.h"
> > +#define DSC_MODE_SPLIT_PANEL BIT(0)
> > +#define DSC_MODE_MULTIPLEX BIT(1)
> > +#define DSC_MODE_VIDEO BIT(2)
>
> This should go into dpu_hw_dsc.h. Ah. They are already defined there and
> just redefined there. Remove the defines here.
Sure, updated
> It might be cleaner to add bool flags to struct msm_display_dsc_config and
> then calculate common mode in the dpu_hw_dsc_config().
How would that be better than calculating here? I dont see much of an
advantage.
> > +static void dpu_encoder_dsc_pipe_cfg(struct dpu_hw_dsc *hw_dsc,
> > + struct dpu_hw_pingpong *hw_pp,
> > + struct msm_display_dsc_config *dsc,
> > + u32 common_mode)
> > +{
> > + if (hw_dsc->ops.dsc_config)
> > + hw_dsc->ops.dsc_config(hw_dsc, dsc, common_mode);
> > +
> > + if (hw_dsc->ops.dsc_config_thresh)
> > + hw_dsc->ops.dsc_config_thresh(hw_dsc, dsc);
> > +
> > + if (hw_pp->ops.setup_dsc)
> > + hw_pp->ops.setup_dsc(hw_pp);
> > +
> > + if (hw_pp->ops.enable_dsc)
> > + hw_pp->ops.enable_dsc(hw_pp);
>
> I think, we do not need to split these operations, I'd suggest having just
> hw_dsc->ops.dsc_config() and hw_pp->ops.enable_dsc(), merging
> dsc_config_thres() and setup_dsc() into respective methods.
Merging hw_dsc->ops.dsc_config() and hw_dsc->ops.dsc_config_thresh() would make
it from L to XL size, so lets keep them split.
We could merge the small hw_pp->ops.setup_dsc() and
hw_pp->ops.enable_dsc() though.
> > void dpu_encoder_prepare_for_kickoff(struct drm_encoder *drm_enc)
> > {
> > struct dpu_encoder_virt *dpu_enc;
> > struct dpu_encoder_phys *phys;
> > + struct msm_drm_private *priv;
> > bool needs_hw_reset = false;
> > unsigned int i;
> > @@ -1841,6 +1977,10 @@ void dpu_encoder_prepare_for_kickoff(struct drm_encoder *drm_enc)
> > dpu_encoder_helper_hw_reset(dpu_enc->phys_encs[i]);
> > }
> > }
> > +
> > + priv = drm_enc->dev->dev_private;
> > + if (priv->dsc)
> > + dpu_encoder_prep_dsc(dpu_enc, priv->dsc);
>
> Not quite. This makes dsc config global, while we can have several encoders
> enabled at once (think of DSI + DP). So the dsc should be a per-encoder
> setting rather than global.
I agree it would make sense to have per-encoder. The DP part needs to be
comprehended for DSC and would need more changes. I think updating this
for DP then and making it generic as required for DP would be better,
right? In that case I will skip moving to encoder for now.
--
~Vinod
next prev parent reply other threads:[~2021-10-06 12:43 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 6:51 [PATCH 00/11] drm/msm: Add Display Stream Compression Support Vinod Koul
2021-07-15 6:51 ` [PATCH 01/11] drm/msm/dsi: add support for dsc data Vinod Koul
2021-08-02 22:55 ` [Freedreno] " abhinavk
2021-10-06 5:24 ` Vinod Koul
2021-07-15 6:51 ` [PATCH 02/11] drm/msm/disp/dpu1: Add support for DSC Vinod Koul
2021-07-19 8:28 ` kernel test robot
2021-08-02 23:03 ` [Freedreno] " abhinavk
2021-10-06 5:36 ` Vinod Koul
2021-07-15 6:51 ` [PATCH 03/11] drm/msm/disp/dpu1: Add support for DSC in pingpong block Vinod Koul
2021-08-02 23:07 ` [Freedreno] " abhinavk
2021-07-15 6:51 ` [PATCH 04/11] drm/msm/disp/dpu1: Add DSC support in RM Vinod Koul
2021-07-29 20:23 ` Dmitry Baryshkov
2021-10-06 10:26 ` Vinod Koul
2021-08-02 23:24 ` [Freedreno] " abhinavk
2021-10-06 10:27 ` Vinod Koul
2021-07-15 6:51 ` [PATCH 05/11] drm/msm/disp/dpu1: Add DSC for SDM845 to hw_catalog Vinod Koul
2021-07-29 20:25 ` Dmitry Baryshkov
2021-10-06 10:50 ` Vinod Koul
2021-08-02 23:29 ` [Freedreno] " abhinavk
2021-10-06 10:52 ` Vinod Koul
2021-07-15 6:51 ` [PATCH 06/11] drm/msm/disp/dpu1: Add DSC support in hw_ctl Vinod Koul
2021-07-29 22:15 ` Dmitry Baryshkov
2021-10-06 12:21 ` Vinod Koul
2021-08-03 0:00 ` [Freedreno] " abhinavk
2021-10-06 12:21 ` Vinod Koul
2021-07-15 6:51 ` [PATCH 07/11] drm/msm/disp/dpu1: Don't use DSC with mode_3d Vinod Koul
2021-08-03 0:24 ` [Freedreno] " abhinavk
2021-10-06 12:22 ` Vinod Koul
2021-07-15 6:52 ` [PATCH 08/11] drm/msm/disp/dpu1: Add support for DSC in encoder Vinod Koul
2021-07-19 8:54 ` kernel test robot
2021-07-29 20:54 ` Dmitry Baryshkov
2021-10-06 12:43 ` Vinod Koul [this message]
2021-08-03 0:57 ` [Freedreno] " abhinavk
2021-10-06 12:47 ` Vinod Koul
2021-07-15 6:52 ` [PATCH 09/11] drm/msm/disp/dpu1: Add support for DSC in topology Vinod Koul
2021-08-03 1:05 ` [Freedreno] " abhinavk
2021-07-15 6:52 ` [PATCH 10/11] drm/msm/dsi: Add support for DSC configuration Vinod Koul
2021-07-19 9:26 ` kernel test robot
2021-07-29 22:10 ` Dmitry Baryshkov
2021-08-03 1:16 ` [Freedreno] " abhinavk
2021-07-15 6:52 ` [PATCH 11/11] drm/msm/dsi: Pass DSC params to drm_panel Vinod Koul
2021-08-03 1:22 ` [Freedreno] " abhinavk
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=YV2Z5JbfFAgLo0n6@matsya \
--to=vkoul@kernel.org \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=jonathan@marek.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sumit.semwal@linaro.org \
/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).