All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: neil.armstrong@linaro.org
Cc: Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jonathan Marek <jonathan@marek.ca>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] drm/msm/dpu: add support for SM8550
Date: Wed, 4 Jan 2023 19:48:17 +0200	[thread overview]
Message-ID: <CAA8EJpoi8QFpvR0qWpNpenZKzEZAQpwp3gNpGd3RwHovgC+Odw@mail.gmail.com> (raw)
In-Reply-To: <de3860ba-40f9-cdd5-097c-e015f6b19255@linaro.org>

On Wed, 4 Jan 2023 at 12:08, Neil Armstrong <neil.armstrong@linaro.org> wrote:
>
> On 04/01/2023 10:45, Dmitry Baryshkov wrote:
> > On 04/01/2023 11:08, Neil Armstrong wrote:
> >> Add definitions for the display hardware used on Qualcomm SM8550
> >> platform.
> >>
> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> >> ---
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 197 +++++++++++++++++++++++++
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h |   1 +
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h    |   2 +
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c        |   1 +
> >>   4 files changed, 201 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> >> index b4ca123d8e69..adf5e25269dc 100644
> >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
>
> <snip>
>
> >> @@ -776,6 +821,45 @@ static const struct dpu_ctl_cfg sm8450_ctl[] = {
> >>       },
> >>   };
> >> +static const struct dpu_ctl_cfg sm8550_ctl[] = {
> >> +    {
> >> +    .name = "ctl_0", .id = CTL_0,
> >> +    .base = 0x15000, .len = 0x290,?
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE),
> >
> > CTL_SC7280_MASK | BIT(DPU_CTL_SPLIT_DISPLAY) ?
>
> Indeed DPU_CTL_VM_CFG is missing, will switch to that.
>
> >
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
> >> +    },
> >> +    {
> >> +    .name = "ctl_1", .id = CTL_1,
> >> +    .base = 0x16000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
> >> +    },
> >> +    {
> >> +    .name = "ctl_2", .id = CTL_2,
> >> +    .base = 0x17000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >
> > CTL_SC7280_MASK?
>
> Ack
>
> >
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
> >> +    },
> >> +    {
> >> +    .name = "ctl_3", .id = CTL_3,
> >> +    .base = 0x18000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
> >> +    },
> >> +    {
> >> +    .name = "ctl_4", .id = CTL_4,
> >> +    .base = 0x19000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
> >> +    },
> >> +    {
> >> +    .name = "ctl_5", .id = CTL_5,
> >> +    .base = 0x1a000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
> >> +    },
> >> +};
> >> +
> >>   static const struct dpu_ctl_cfg sc7280_ctl[] = {
> >>       {
> >>       .name = "ctl_0", .id = CTL_0,
>
> <snip>
>
> >> @@ -1268,6 +1386,16 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {
> >>       .len = 0x20, .version = 0x20000},
> >>   };
> >> +#define PP_BLK_DIPHER(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
> >> +    {\
> >> +    .name = _name, .id = _id, \
> >> +    .base = _base, .len = 0, \
> >
> > len = 0 looks incorrect. Any particular reason why can't we use plain PP_BLK here?
>
> The TE block has been moved to the DSI INTF blocks since SM8350 I think, or earlier.

I think, 8150. Marijn has been working on adding support for INTF-based TE.

> This removes the DPU_PINGPONG_DITHER feature used downstream to enable the PP TE callbacks.
> Since there's only the DIPHER sub-block remaining, this is why I set len to 0.

I went on with some research. Usually PP len is 0xd4. However it seems
since 8350 (since the change of DSC block) the PP size should be 0x0),
despite dowsnstream DTs having sde-pp-size=0xd4 for sm8350 and sm8450
(or 0x4 for neo, DPU 9.1.0).
So, it looks like you are correct here (and we should fix 8350/8450
patches instead).

>
> >
> >> +    .features = BIT(DPU_PINGPONG_DITHER), \
> >> +    .merge_3d = _merge_3d, \
> >> +    .sblk = &_sblk, \
> >> +    .intr_done = _done, \
> >> +    .intr_rdptr = _rdptr, \
> >> +    }
> >>   #define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
> >>       {\
> >>       .name = _name, .id = _id, \
>
> <snip>
>


-- 
With best wishes
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: neil.armstrong@linaro.org
Cc: freedreno@lists.freedesktop.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jonathan Marek <jonathan@marek.ca>,
	devicetree@vger.kernel.org, Sean Paul <sean@poorly.run>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 3/6] drm/msm/dpu: add support for SM8550
Date: Wed, 4 Jan 2023 19:48:17 +0200	[thread overview]
Message-ID: <CAA8EJpoi8QFpvR0qWpNpenZKzEZAQpwp3gNpGd3RwHovgC+Odw@mail.gmail.com> (raw)
In-Reply-To: <de3860ba-40f9-cdd5-097c-e015f6b19255@linaro.org>

On Wed, 4 Jan 2023 at 12:08, Neil Armstrong <neil.armstrong@linaro.org> wrote:
>
> On 04/01/2023 10:45, Dmitry Baryshkov wrote:
> > On 04/01/2023 11:08, Neil Armstrong wrote:
> >> Add definitions for the display hardware used on Qualcomm SM8550
> >> platform.
> >>
> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> >> ---
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 197 +++++++++++++++++++++++++
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h |   1 +
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h    |   2 +
> >>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c        |   1 +
> >>   4 files changed, 201 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> >> index b4ca123d8e69..adf5e25269dc 100644
> >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
>
> <snip>
>
> >> @@ -776,6 +821,45 @@ static const struct dpu_ctl_cfg sm8450_ctl[] = {
> >>       },
> >>   };
> >> +static const struct dpu_ctl_cfg sm8550_ctl[] = {
> >> +    {
> >> +    .name = "ctl_0", .id = CTL_0,
> >> +    .base = 0x15000, .len = 0x290,?
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE),
> >
> > CTL_SC7280_MASK | BIT(DPU_CTL_SPLIT_DISPLAY) ?
>
> Indeed DPU_CTL_VM_CFG is missing, will switch to that.
>
> >
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
> >> +    },
> >> +    {
> >> +    .name = "ctl_1", .id = CTL_1,
> >> +    .base = 0x16000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
> >> +    },
> >> +    {
> >> +    .name = "ctl_2", .id = CTL_2,
> >> +    .base = 0x17000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >
> > CTL_SC7280_MASK?
>
> Ack
>
> >
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
> >> +    },
> >> +    {
> >> +    .name = "ctl_3", .id = CTL_3,
> >> +    .base = 0x18000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
> >> +    },
> >> +    {
> >> +    .name = "ctl_4", .id = CTL_4,
> >> +    .base = 0x19000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
> >> +    },
> >> +    {
> >> +    .name = "ctl_5", .id = CTL_5,
> >> +    .base = 0x1a000, .len = 0x290,
> >> +    .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE),
> >> +    .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
> >> +    },
> >> +};
> >> +
> >>   static const struct dpu_ctl_cfg sc7280_ctl[] = {
> >>       {
> >>       .name = "ctl_0", .id = CTL_0,
>
> <snip>
>
> >> @@ -1268,6 +1386,16 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {
> >>       .len = 0x20, .version = 0x20000},
> >>   };
> >> +#define PP_BLK_DIPHER(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
> >> +    {\
> >> +    .name = _name, .id = _id, \
> >> +    .base = _base, .len = 0, \
> >
> > len = 0 looks incorrect. Any particular reason why can't we use plain PP_BLK here?
>
> The TE block has been moved to the DSI INTF blocks since SM8350 I think, or earlier.

I think, 8150. Marijn has been working on adding support for INTF-based TE.

> This removes the DPU_PINGPONG_DITHER feature used downstream to enable the PP TE callbacks.
> Since there's only the DIPHER sub-block remaining, this is why I set len to 0.

I went on with some research. Usually PP len is 0xd4. However it seems
since 8350 (since the change of DSC block) the PP size should be 0x0),
despite dowsnstream DTs having sde-pp-size=0xd4 for sm8350 and sm8450
(or 0x4 for neo, DPU 9.1.0).
So, it looks like you are correct here (and we should fix 8350/8450
patches instead).

>
> >
> >> +    .features = BIT(DPU_PINGPONG_DITHER), \
> >> +    .merge_3d = _merge_3d, \
> >> +    .sblk = &_sblk, \
> >> +    .intr_done = _done, \
> >> +    .intr_rdptr = _rdptr, \
> >> +    }
> >>   #define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
> >>       {\
> >>       .name = _name, .id = _id, \
>
> <snip>
>


-- 
With best wishes
Dmitry

  reply	other threads:[~2023-01-04 17:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  9:08 [PATCH 0/6] drm/msm: add support for SM8450 Neil Armstrong
2023-01-04  9:08 ` Neil Armstrong
2023-01-04  9:08 ` [PATCH 1/6] dt-bindings: display/msm: document the SM8550 DSI PHY Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-06 15:41   ` Krzysztof Kozlowski
2023-01-06 15:41     ` Krzysztof Kozlowski
2023-01-08 23:09     ` Dmitry Baryshkov
2023-01-08 23:09       ` Dmitry Baryshkov
2023-01-09  8:20       ` Neil Armstrong
2023-01-09  8:20         ` Neil Armstrong
2023-01-04  9:08 ` [PATCH 2/6] dt-bindings: display/msm: document the display hardware for SM8550 Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-05  2:53   ` Rob Herring
2023-01-05  2:53     ` Rob Herring
2023-01-08 23:11   ` Dmitry Baryshkov
2023-01-08 23:11     ` Dmitry Baryshkov
2023-01-04  9:08 ` [PATCH 3/6] drm/msm/dpu: add support " Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-04  9:45   ` Dmitry Baryshkov
2023-01-04  9:45     ` Dmitry Baryshkov
2023-01-04 10:08     ` Neil Armstrong
2023-01-04 10:08       ` Neil Armstrong
2023-01-04 17:48       ` Dmitry Baryshkov [this message]
2023-01-04 17:48         ` Dmitry Baryshkov
2023-01-05  9:59         ` neil.armstrong
2023-01-05  9:59           ` neil.armstrong
2023-01-08 23:12   ` Dmitry Baryshkov
2023-01-08 23:12     ` Dmitry Baryshkov
2023-01-04  9:08 ` [PATCH 4/6] drm/msm: mdss: " Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-04  9:46   ` Dmitry Baryshkov
2023-01-04  9:46     ` Dmitry Baryshkov
2023-01-04  9:08 ` [PATCH 5/6] drm/msm/dsi: add support for DSI-PHY on SM8550 Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-04  9:53   ` Dmitry Baryshkov
2023-01-04  9:53     ` Dmitry Baryshkov
2023-01-04 10:11     ` Neil Armstrong
2023-01-04 10:11       ` Neil Armstrong
2023-01-04 17:20       ` Dmitry Baryshkov
2023-01-04 17:20         ` Dmitry Baryshkov
2023-01-04  9:08 ` [PATCH 6/6] drm/msm/dsi: add support for DSI 2.7.0 Neil Armstrong
2023-01-04  9:08   ` Neil Armstrong
2023-01-04  9:54   ` Dmitry Baryshkov
2023-01-04  9:54     ` Dmitry Baryshkov
2023-01-08 23:09 ` [PATCH 0/6] drm/msm: add support for SM8450 Dmitry Baryshkov
2023-01-08 23:09   ` 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=CAA8EJpoi8QFpvR0qWpNpenZKzEZAQpwp3gNpGd3RwHovgC+Odw@mail.gmail.com \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.