mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <freedreno@lists.freedesktop.org>,
	Rob Clark <robdclark@gmail.com>, "Sean Paul" <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	"David Airlie" <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>, <quic_jesszhan@quicinc.com>,
	<quic_parellan@quicinc.com>, <quic_khsieh@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 10/16] drm/msm/dpu: add support to disable CDM block during encoder cleanup
Date: Thu, 30 Nov 2023 15:58:24 -0800	[thread overview]
Message-ID: <5c16e398-4010-718b-d91d-5fc3781b9c0a@quicinc.com> (raw)
In-Reply-To: <CAA8EJpoUDjTEytGnx0NUKD_grY=azoXgm_sqwNBJVTD7LwCe0g@mail.gmail.com>



On 8/30/2023 5:14 PM, Dmitry Baryshkov wrote:
> On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>> In preparation of setting up CDM block, add the logic to disable it
>> properly during encoder cleanup.
>>
>> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c      | 8 ++++++++
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 ++
>>   2 files changed, 10 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> index 582680804016..1b1e07292a9e 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> @@ -26,6 +26,7 @@
>>   #include "dpu_hw_dspp.h"
>>   #include "dpu_hw_dsc.h"
>>   #include "dpu_hw_merge3d.h"
>> +#include "dpu_hw_cdm.h"
>>   #include "dpu_formats.h"
>>   #include "dpu_encoder_phys.h"
>>   #include "dpu_crtc.h"
>> @@ -2097,6 +2098,13 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
>>                                          phys_enc->hw_pp->merge_3d->idx);
>>          }
>>
>> +       if (phys_enc->hw_cdm && phys_enc->hw_cdm->ops.bind_pingpong_blk && phys_enc->hw_pp) {
>> +               phys_enc->hw_cdm->ops.bind_pingpong_blk(phys_enc->hw_cdm,
>> +                                                       false, phys_enc->hw_pp->idx);
> 
> But it was already bound in the cdm->enable, wasn't it?
> 

This is disable. I think you missed the "false" parameter.

> Also the update_pending_flush_cdm should be called even for DPU < 5.0,
> where there should be no bind_pingpong_blk callback.
> 

Ack. This is a good catch!

>> +               if (phys_enc->hw_ctl->ops.update_pending_flush_cdm)
>> +                       phys_enc->hw_ctl->ops.update_pending_flush_cdm(phys_enc->hw_ctl);
>> +       }
>> +
>>          if (dpu_enc->dsc) {
>>                  dpu_encoder_unprep_dsc(dpu_enc);
>>                  dpu_enc->dsc = NULL;
>> 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 24dbc28be4f8..510c1c41ddbc 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
>> @@ -150,6 +150,7 @@ enum dpu_intr_idx {
>>    * @hw_pp:             Hardware interface to the ping pong registers
>>    * @hw_intf:           Hardware interface to the intf registers
>>    * @hw_wb:             Hardware interface to the wb registers
>> + * @hw_cdm:            Hardware interface to the CDM registers
>>    * @dpu_kms:           Pointer to the dpu_kms top level
>>    * @cached_mode:       DRM mode cached at mode_set time, acted on in enable
>>    * @enabled:           Whether the encoder has enabled and running a mode
>> @@ -178,6 +179,7 @@ struct dpu_encoder_phys {
>>          struct dpu_hw_pingpong *hw_pp;
>>          struct dpu_hw_intf *hw_intf;
>>          struct dpu_hw_wb *hw_wb;
>> +       struct dpu_hw_cdm *hw_cdm;
>>          struct dpu_kms *dpu_kms;
>>          struct drm_display_mode cached_mode;
>>          enum dpu_enc_split_role split_role;
>> --
>> 2.40.1
>>
> 
> 

  reply	other threads:[~2023-11-30 23:58 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230830224910.8091-1-quic_abhinavk@quicinc.com>
2023-08-30 22:48 ` [PATCH 01/16] drm/msm/dpu: fix writeback programming for YUV cases Abhinav Kumar
2023-08-30 23:38   ` Dmitry Baryshkov
2023-08-30 22:48 ` [PATCH 02/16] drm/msm/dpu: add formats check for writeback encoder Abhinav Kumar
2023-08-30 23:39   ` Dmitry Baryshkov
2023-08-30 22:48 ` [PATCH 03/16] drm/msm/dpu: rename dpu_encoder_phys_wb_setup_cdp to match its functionality Abhinav Kumar
2023-08-30 23:40   ` Dmitry Baryshkov
2023-08-30 22:48 ` [PATCH 04/16] drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog Abhinav Kumar
2023-08-30 22:57   ` Dmitry Baryshkov
2023-11-30 22:41     ` Abhinav Kumar
2023-08-30 22:48 ` [PATCH 05/16] drm/msm/dpu: add cdm blocks to sm8250 dpu_hw_catalog Abhinav Kumar
2023-08-30 22:48 ` [PATCH 06/16] drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block Abhinav Kumar
2023-08-31  0:00   ` Dmitry Baryshkov
2023-11-30 23:36     ` Abhinav Kumar
2023-12-01  7:05       ` Dmitry Baryshkov
2023-12-01 18:19         ` Abhinav Kumar
2023-12-01 21:10           ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 07/16] drm/msm/dpu: add cdm blocks to RM Abhinav Kumar
2023-08-30 23:48   ` Dmitry Baryshkov
2023-11-30 23:47     ` Abhinav Kumar
2023-12-06 21:02       ` Abhinav Kumar
2023-12-06 22:23         ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 08/16] drm/msm/dpu: add support to allocate CDM from RM Abhinav Kumar
2023-08-31  0:06   ` Dmitry Baryshkov
2023-11-30 23:50     ` Abhinav Kumar
2023-12-01  8:39       ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 09/16] drm/msm/dpu: add CDM related logic to dpu_hw_ctl layer Abhinav Kumar
2023-08-31  0:12   ` Dmitry Baryshkov
2023-11-30 23:54     ` Abhinav Kumar
2023-08-30 22:49 ` [PATCH 10/16] drm/msm/dpu: add support to disable CDM block during encoder cleanup Abhinav Kumar
2023-08-31  0:14   ` Dmitry Baryshkov
2023-11-30 23:58     ` Abhinav Kumar [this message]
2023-12-01  8:36       ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 11/16] drm/msm/dpu: add an API to setup the CDM block for writeback Abhinav Kumar
2023-08-31  0:11   ` Dmitry Baryshkov
2023-12-01  0:41     ` Abhinav Kumar
2023-12-01  7:20       ` Dmitry Baryshkov
2023-12-01 19:04         ` Abhinav Kumar
2023-12-01 21:15           ` [Freedreno] " Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 12/16] drm/msm/dpu: plug-in the cdm related bits to writeback setup Abhinav Kumar
2023-08-31  0:15   ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 13/16] drm/msm/dpu: reserve cdm blocks for writeback in case of YUV output Abhinav Kumar
2023-08-31  0:23   ` Dmitry Baryshkov
2023-12-01  0:45     ` Abhinav Kumar
2023-08-30 22:49 ` [PATCH 14/16] drm/msm/dpu: do not allow YUV formats if no CDM block is present Abhinav Kumar
2023-08-31  0:24   ` Dmitry Baryshkov
2023-12-01  0:50     ` Abhinav Kumar
2023-12-01  7:14       ` Dmitry Baryshkov
2023-08-30 22:49 ` [PATCH 15/16] drm/msm/dpu: add NV12 in the list of supported WB formats Abhinav Kumar
2023-08-31  0:26   ` Dmitry Baryshkov
2023-12-07  1:09     ` Abhinav Kumar
2023-08-30 22:49 ` [PATCH 16/16] drm/msm/dpu: add cdm blocks to dpu snapshot Abhinav Kumar
2023-08-31  0:27   ` 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=5c16e398-4010-718b-d91d-5fc3781b9c0a@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=quic_khsieh@quicinc.com \
    --cc=quic_parellan@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®