Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Vinod Koul <vkoul@kernel.org>, Rob Clark <robdclark@gmail.com>
Cc: 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 v3 05/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d
Date: Wed, 24 Nov 2021 18:43:19 +0300	[thread overview]
Message-ID: <15006114-cef8-89e5-eb50-4c36fd11a293@linaro.org> (raw)
In-Reply-To: <20211116062256.2417186-6-vkoul@kernel.org>

On 16/11/2021 09:22, Vinod Koul wrote:
> We cannot enable mode_3d when we are using the DSC. So pass
> configuration to detect DSC is enabled and not enable mode_3d
> when we are using DSC
> 
> We add a helper dpu_encoder_helper_get_dsc() to detect dsc
> enabled and pass this to .setup_intf_cfg()
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h     | 11 +++++++++++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c |  2 ++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c           |  3 ++-
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h           |  2 ++
>   4 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> index e7270eb6b84b..efb85d595598 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> @@ -332,6 +332,17 @@ static inline enum dpu_3d_blend_mode dpu_encoder_helper_get_3d_blend_mode(
>   	return BLEND_3D_NONE;
>   }
>   
> +static inline bool dpu_encoder_helper_get_dsc(struct dpu_encoder_phys *phys_enc)
> +{
> +	struct drm_encoder *drm_enc = phys_enc->parent;
> +	struct msm_drm_private *priv = drm_enc->dev->dev_private;
> +
> +	if (priv->dsc)
> +		return priv->dsc->dsc_mask;
> +
> +	return 0;
> +}
> +
>   /**
>    * dpu_encoder_helper_split_config - split display configuration helper function
>    *	This helper function may be used by physical encoders to configure
> 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 34a6940d12c5..f3f00f4d0193 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,8 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
>   	intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD;
>   	intf_cfg.stream_sel = cmd_enc->stream_sel;
>   	intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
> +	intf_cfg.dsc = dpu_encoder_helper_get_dsc(phys_enc);
> +

You are going to hate me for the comments on this patch. But this chunk 
should also go into dpu_encoder_phys_vid.c, shouldn't it?

>   	ctl->ops.setup_intf_cfg(ctl, &intf_cfg);
>   }
>   
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> index 64740ddb983e..36831457a91b 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
> @@ -519,7 +519,8 @@ static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx,
>   
>   	intf_cfg |= (cfg->intf & 0xF) << 4;
>   
> -	if (cfg->mode_3d) {
> +	/* In DSC we can't set merge, so check for dsc too */
> +	if (cfg->mode_3d && !cfg->dsc) {
>   		intf_cfg |= BIT(19);
>   		intf_cfg |= (cfg->mode_3d - 0x1) << 20;
>   	}
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> index 806c171e5df2..9847c9c46d6f 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
> @@ -40,6 +40,7 @@ struct dpu_hw_stage_cfg {
>    * @merge_3d:              3d merge block used
>    * @intf_mode_sel:         Interface mode, cmd / vid
>    * @stream_sel:            Stream selection for multi-stream interfaces
> + * @dsc:                   DSC BIT masks
>    */
>   struct dpu_hw_intf_cfg {
>   	enum dpu_intf intf;
> @@ -47,6 +48,7 @@ struct dpu_hw_intf_cfg {
>   	enum dpu_merge_3d merge_3d;
>   	enum dpu_ctl_mode_sel intf_mode_sel;
>   	int stream_sel;
> +	unsigned int dsc;
>   };
>   
>   /**
> 


-- 
With best wishes
Dmitry

  parent reply	other threads:[~2021-11-24 15:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16  6:22 [PATCH v3 00/13] drm/msm: Add Display Stream Compression Support Vinod Koul
2021-11-16  6:22 ` [PATCH v3 01/13] drm/msm/dsi: add support for dsc data Vinod Koul
2021-11-24 15:53   ` Dmitry Baryshkov
2021-11-30  1:14   ` [Freedreno] " Abhinav Kumar
2021-11-16  6:22 ` [PATCH v3 02/13] drm/msm/disp/dpu1: Add support for DSC Vinod Koul
2021-11-24 15:35   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 03/13] drm/msm/disp/dpu1: Add support for DSC in pingpong block Vinod Koul
2022-02-17 21:54   ` Marijn Suijten
2022-02-17 22:06     ` Marijn Suijten
2022-02-17 22:12     ` Dmitry Baryshkov
2022-02-17 22:39       ` Marijn Suijten
2021-11-16  6:22 ` [PATCH v3 04/13] drm/msm/disp/dpu1: Add DSC for SDM845 to hw_catalog Vinod Koul
2021-11-16  6:22 ` [PATCH v3 05/13] drm/msm/disp/dpu1: Don't use DSC with mode_3d Vinod Koul
2021-11-24 15:39   ` Dmitry Baryshkov
2021-11-24 15:40   ` Dmitry Baryshkov
2021-11-24 15:57     ` Dmitry Baryshkov
2021-11-24 15:43   ` Dmitry Baryshkov [this message]
2021-11-16  6:22 ` [PATCH v3 06/13] drm/msm/disp/dpu1: Add DSC support in hw_ctl Vinod Koul
2021-11-24 15:40   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 07/13] drm/msm/disp/dpu1: Add support for DSC in encoder Vinod Koul
2021-11-24 15:58   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 08/13] drm/msm: Add missing structure documentation Vinod Koul
2021-11-16  6:22 ` [PATCH v3 09/13] drm/msm/disp/dpu1: Add support for DSC in topology Vinod Koul
2021-11-24 15:59   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 10/13] drm/msm/disp/dpu1: Add DSC support in RM Vinod Koul
2021-11-24 16:01   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 11/13] drm/msm/dsi: add mode valid callback for dsi_mgr Vinod Koul
2021-11-24 20:33   ` Dmitry Baryshkov
2021-11-16  6:22 ` [PATCH v3 12/13] drm/msm/dsi: Add support for DSC configuration Vinod Koul
2021-11-18 21:47   ` kernel test robot
2021-11-24 16:21   ` Dmitry Baryshkov
2021-11-24 16:27     ` Dmitry Baryshkov
2021-12-11  0:03   ` Marijn Suijten
2022-02-17 11:14     ` [Freedreno] " Vinod Koul
2022-02-17 15:11       ` Marijn Suijten
2022-03-22 17:16         ` Vinod Koul
2022-03-22 18:59           ` Marijn Suijten
2022-03-23 10:57             ` Vinod Koul
2021-11-16  6:22 ` [PATCH v3 13/13] drm/msm/dsi: Pass DSC params to drm_panel Vinod Koul
2021-11-24 16:28   ` Dmitry Baryshkov
2021-11-24 16:51   ` 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=15006114-cef8-89e5-eb50-4c36fd11a293@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --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 \
    --cc=vkoul@kernel.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