From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>, <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
"David Airlie" <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
<quic_ebharadw@quicinc.com>, <linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
Rob Clark <robdclark@chromium.org>
Subject: Re: [PATCH 11/21] drm/msm/dpu: Add RM support for allocating CWB
Date: Tue, 3 Sep 2024 18:04:13 -0700 [thread overview]
Message-ID: <0e5dc874-0b50-4a6b-ba98-83cb01f7cce6@quicinc.com> (raw)
In-Reply-To: <CAA8EJpo0X7yRaqYV-tTco9+9WyexiPN_ey8hKivFrE3jTojUpg@mail.gmail.com>
On 8/30/2024 3:16 PM, Dmitry Baryshkov wrote:
> On Fri, 30 Aug 2024 at 22:28, Jessica Zhang <quic_jesszhan@quicinc.com> wrote:
>>
>>
>>
>> On 8/30/2024 10:18 AM, Dmitry Baryshkov wrote:
>>> On Thu, Aug 29, 2024 at 01:48:32PM GMT, Jessica Zhang wrote:
>>>> Add support for allocating the concurrent writeback mux as part of the
>>>> WB allocation
>>>>
>>>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>>>> ---
>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 5 ++++-
>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 30 +++++++++++++++++++++++++++--
>>>> 2 files changed, 32 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
>>>> index c17d2d356f7a..c43cb55fe1d2 100644
>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
>>>> @@ -1,5 +1,7 @@
>>>> /* SPDX-License-Identifier: GPL-2.0-only */
>>>> -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
>>>> +/*
>>>> + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
>>>> */
>>>>
>>>> #ifndef _DPU_HW_MDSS_H
>>>> @@ -352,6 +354,7 @@ struct dpu_mdss_color {
>>>> #define DPU_DBG_MASK_DSPP (1 << 10)
>>>> #define DPU_DBG_MASK_DSC (1 << 11)
>>>> #define DPU_DBG_MASK_CDM (1 << 12)
>>>> +#define DPU_DBG_MASK_CWB (1 << 13)
>>>>
>>>> /**
>>>> * struct dpu_hw_tear_check - Struct contains parameters to configure
>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
>>>> index bc99b04eae3a..738e9a081b10 100644
>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
>>>> @@ -1,9 +1,10 @@
>>>> // SPDX-License-Identifier: GPL-2.0-only
>>>> /*
>>>> * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
>>>> - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> */
>>>>
>>>> +#include <drm/drm_managed.h>
>>>> #include "msm_drv.h"
>>>> #define pr_fmt(fmt) "[drm:%s] " fmt, __func__
>>>> #include "dpu_kms.h"
>>>> @@ -34,6 +35,7 @@ int dpu_rm_init(struct drm_device *dev,
>>>> void __iomem *mmio)
>>>> {
>>>> int rc, i;
>>>> + struct dpu_hw_blk_reg_map *cwb_reg_map;
>>>>
>>>> if (!rm || !cat || !mmio) {
>>>> DPU_ERROR("invalid kms\n");
>>>> @@ -100,11 +102,35 @@ int dpu_rm_init(struct drm_device *dev,
>>>> rm->hw_intf[intf->id - INTF_0] = hw;
>>>> }
>>>>
>>>> + if (cat->cwb_count > 0) {
>>>> + cwb_reg_map = drmm_kzalloc(dev,
>>>> + sizeof(*cwb_reg_map) * cat->cwb_count,
>>>> + GFP_KERNEL);
>>>
>>> Please move CWB block pointers to dpu_rm. There is no need to allocate a
>>> separate array.
>>
>> Hi Dmitry,
>>
>> Sorry, I'm not sure what you mean here. Can you clarify your comment?
>>
>> This is just allocating an array of the CWB register addresses so that
>> the hw_wb block can use it to configure the CWB mux registers.
>
> Excuse me. I asked to make the cwb_reg_map array a part of the
> existing dpu_rm structure. This way other subblocks can access it
> through dpu_rm API.
Got it, thanks for the clarification. Just wondering, is the intent here
to add CWB to rm's get_assigned_resourced?
The CWB registers will be handled by hw_wb and isn't referenced anywhere
outside of hw_wb (aside from when it's being allocated and passed into
hw_wb_init) so I'm not sure what's the benefit of adding it to the
dpu_rm struct.
>
>>
>> Thanks,
>>
>> Jessica Zhang
>>
>>>
>>>> +
>>>> + if (!cwb_reg_map) {
>>>> + DPU_ERROR("failed cwb object creation\n");
>>>> + return -ENOMEM;
>>>> + }
>>>> + }
>>>> +
>>>> +
>>>> + for (i = 0; i < cat->cwb_count; i++) {
>>>> + struct dpu_hw_blk_reg_map *cwb = &cwb_reg_map[i];
>>>> +
>>>> + cwb->blk_addr = mmio + cat->cwb[i].base;
>>>> + cwb->log_mask = DPU_DBG_MASK_CWB;
>>>> + }
>>>> +
>>>> for (i = 0; i < cat->wb_count; i++) {
>>>> struct dpu_hw_wb *hw;
>>>> const struct dpu_wb_cfg *wb = &cat->wb[i];
>>>>
>>>> - hw = dpu_hw_wb_init(dev, wb, mmio, cat->mdss_ver);
>>>> + if (cat->cwb)
>>>> + hw = dpu_hw_wb_init_with_cwb(dev, wb, mmio,
>>>> + cat->mdss_ver, cwb_reg_map);
>>>> + else
>>>> + hw = dpu_hw_wb_init(dev, wb, mmio, cat->mdss_ver);
>>>> +
>>>> if (IS_ERR(hw)) {
>>>> rc = PTR_ERR(hw);
>>>> DPU_ERROR("failed wb object creation: err %d\n", rc);
>>>>
>>>> --
>>>> 2.34.1
>>>>
>>>
>>> --
>>> With best wishes
>>> Dmitry
>
>
>
> --
> With best wishes
> Dmitry
next prev parent reply other threads:[~2024-09-04 1:04 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 20:48 [PATCH 00/21] drm/msm/dpu: Add Concurrent Writeback Support for DPU 10.x+ Jessica Zhang
2024-08-29 20:48 ` [PATCH 01/21] drm: add clone mode check for CRTC Jessica Zhang
2024-08-29 20:48 ` [PATCH 02/21] drm: print clone mode status in atomic state Jessica Zhang
2024-08-30 16:38 ` Dmitry Baryshkov
2024-08-30 19:42 ` Jessica Zhang
2024-08-29 20:48 ` [PATCH 03/21] drm/msm/dpu: get rid of struct dpu_rm_requirements Jessica Zhang
2024-08-29 20:48 ` [PATCH 04/21] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation Jessica Zhang
2024-08-29 20:48 ` [PATCH 05/21] drm/msm/dpu: move resource allocation to CRTC Jessica Zhang
2024-08-30 16:42 ` Dmitry Baryshkov
2024-08-30 17:01 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 06/21] drm/msm/dpu: fill CRTC resources in dpu_crtc.c Jessica Zhang
2024-08-29 20:48 ` [PATCH 07/21] drm/msm/dpu: Check CRTC encoders are valid clones Jessica Zhang
2024-08-30 17:00 ` Dmitry Baryshkov
2024-09-03 22:18 ` Jessica Zhang
2024-09-04 18:41 ` Dmitry Baryshkov
2024-09-04 19:23 ` Ville Syrjälä
2024-08-29 20:48 ` [PATCH 08/21] drm/msm/dpu: add CWB entry to catalog for SM8650 Jessica Zhang
2024-08-30 17:13 ` Dmitry Baryshkov
2024-09-03 22:20 ` Jessica Zhang
2024-08-29 20:48 ` [PATCH 09/21] drm/msm/dpu: add devcoredumps for cwb registers Jessica Zhang
2024-08-30 17:02 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 10/21] drm/msm/dpu: add CWB support to dpu_hw_wb Jessica Zhang
2024-08-30 17:41 ` Dmitry Baryshkov
2024-09-03 22:22 ` Jessica Zhang
2024-08-29 20:48 ` [PATCH 11/21] drm/msm/dpu: Add RM support for allocating CWB Jessica Zhang
2024-08-30 17:18 ` Dmitry Baryshkov
2024-08-30 19:28 ` Jessica Zhang
2024-08-30 22:16 ` Dmitry Baryshkov
2024-09-04 1:04 ` Jessica Zhang [this message]
2024-09-05 13:30 ` Dmitry Baryshkov
2024-09-06 16:53 ` Jessica Zhang
2024-09-06 17:58 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 12/21] drm/msm/dpu: Add CWB to msm_display_topology Jessica Zhang
2024-08-30 17:21 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 13/21] drm/msm/dpu: Require modeset if clone mode status changes Jessica Zhang
2024-08-30 17:22 ` Dmitry Baryshkov
2024-09-02 13:36 ` Daniel Vetter
2024-09-02 19:20 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 14/21] drm/msm/dpu: Reserve resources for CWB Jessica Zhang
2024-08-30 17:25 ` Dmitry Baryshkov
2024-08-30 20:28 ` Jessica Zhang
2024-08-30 22:27 ` Dmitry Baryshkov
2024-09-04 22:15 ` Jessica Zhang
2024-08-29 20:48 ` [PATCH 15/21] drm/msm/dpu: Configure CWB in writeback encoder Jessica Zhang
2024-08-30 17:47 ` Dmitry Baryshkov
2024-08-30 20:28 ` Jessica Zhang
2024-08-30 22:57 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 16/21] drm/msm/dpu: Program hw_ctl to support CWB Jessica Zhang
2024-08-30 17:29 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 17/21] drm/msm/dpu: Adjust writeback phys encoder setup for CWB Jessica Zhang
2024-08-30 17:30 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 18/21] drm/msm/dpu: Start frame done timer after encoder kickoff Jessica Zhang
2024-08-30 17:31 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 19/21] drm/msm/dpu: Skip trigger flush and start for CWB Jessica Zhang
2024-08-30 17:33 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 20/21] drm/msm/dpu: Reorder encoder kickoff " Jessica Zhang
2024-08-30 17:35 ` Dmitry Baryshkov
2024-08-29 20:48 ` [PATCH 21/21] drm/msm/dpu: Set possible clones for all encoders Jessica Zhang
2024-08-30 17:39 ` 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=0e5dc874-0b50-4a6b-ba98-83cb01f7cce6@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=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_ebharadw@quicinc.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=tzimmermann@suse.de \
/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®