All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>, Vinod Koul <vkoul@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: Re: [PATCH v5 08/10] drm/msm/dpu: add support for MDP_TOP blackhole
Date: Thu, 24 Nov 2022 22:01:55 -0800	[thread overview]
Message-ID: <5eab17ea-0688-f63d-ab73-fe4c15db7092@quicinc.com> (raw)
In-Reply-To: <20221123210403.3593366-9-dmitry.baryshkov@linaro.org>



On 11/23/2022 1:04 PM, Dmitry Baryshkov wrote:
> On sm8450 a register block was removed from MDP TOP. Accessing it during
> snapshotting results in NoC errors / immediate reboot. Skip accessing
> these registers during snapshot.
> 
> Tested-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h |  3 +++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c        | 11 +++++++++--
>   2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> index 38aa38ab1568..8da4c5ba6dc3 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> @@ -82,6 +82,8 @@ enum {
>    * @DPU_MDP_UBWC_1_0,      This chipsets supports Universal Bandwidth
>    *                         compression initial revision
>    * @DPU_MDP_UBWC_1_5,      Universal Bandwidth compression version 1.5
> + * @DPU_MDP_PERIPH_0_REMOVED Indicates that access to periph top0 block results
> + *			   in a failure
shouldnt this be that "indicates that the top register block is not 
contiguous and the two sub-blocks are separated by an offset"
>    * @DPU_MDP_MAX            Maximum value
>   
>    */
> @@ -92,6 +94,7 @@ enum {
>   	DPU_MDP_UBWC_1_0,
>   	DPU_MDP_UBWC_1_5,
>   	DPU_MDP_AUDIO_SELECT,
> +	DPU_MDP_PERIPH_0_REMOVED,
>   	DPU_MDP_MAX
>   };
>   
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index f3660cd14f4f..4ac14de55139 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -927,8 +927,15 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
>   		msm_disp_snapshot_add_block(disp_state, cat->wb[i].len,
>   				dpu_kms->mmio + cat->wb[i].base, "wb_%d", i);
>   
> -	msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
> -			dpu_kms->mmio + cat->mdp[0].base, "top");
> +	if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) {
> +		msm_disp_snapshot_add_block(disp_state, 0x380,
> +				dpu_kms->mmio + cat->mdp[0].base, "top");
> +		msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len - 0x3a8,
> +				dpu_kms->mmio + cat->mdp[0].base + 0x3a8, "top_2");

I recall one of the comments from konrad that this should come from the 
catalog rather than a hard-coded offset which you wanted to keep it for 
a later time. I am fine with that.

But instead of a hard-coded offset, do you want to have a macro so that 
atleast we know what the value means and can fix it in the future? 
Otherwise it would end up being one of those numbers which someone later 
on wouldnt understand where it comes from and what it means.

> +	} else {
> +		msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
> +				dpu_kms->mmio + cat->mdp[0].base, "top");
> +	}
>   
>   	pm_runtime_put_sync(&dpu_kms->pdev->dev);
>   }

WARNING: multiple messages have this Message-ID (diff)
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Vinod Koul <vkoul@kernel.org>,
	freedreno@lists.freedesktop.org
Subject: Re: [PATCH v5 08/10] drm/msm/dpu: add support for MDP_TOP blackhole
Date: Thu, 24 Nov 2022 22:01:55 -0800	[thread overview]
Message-ID: <5eab17ea-0688-f63d-ab73-fe4c15db7092@quicinc.com> (raw)
In-Reply-To: <20221123210403.3593366-9-dmitry.baryshkov@linaro.org>



On 11/23/2022 1:04 PM, Dmitry Baryshkov wrote:
> On sm8450 a register block was removed from MDP TOP. Accessing it during
> snapshotting results in NoC errors / immediate reboot. Skip accessing
> these registers during snapshot.
> 
> Tested-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h |  3 +++
>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c        | 11 +++++++++--
>   2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> index 38aa38ab1568..8da4c5ba6dc3 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
> @@ -82,6 +82,8 @@ enum {
>    * @DPU_MDP_UBWC_1_0,      This chipsets supports Universal Bandwidth
>    *                         compression initial revision
>    * @DPU_MDP_UBWC_1_5,      Universal Bandwidth compression version 1.5
> + * @DPU_MDP_PERIPH_0_REMOVED Indicates that access to periph top0 block results
> + *			   in a failure
shouldnt this be that "indicates that the top register block is not 
contiguous and the two sub-blocks are separated by an offset"
>    * @DPU_MDP_MAX            Maximum value
>   
>    */
> @@ -92,6 +94,7 @@ enum {
>   	DPU_MDP_UBWC_1_0,
>   	DPU_MDP_UBWC_1_5,
>   	DPU_MDP_AUDIO_SELECT,
> +	DPU_MDP_PERIPH_0_REMOVED,
>   	DPU_MDP_MAX
>   };
>   
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index f3660cd14f4f..4ac14de55139 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -927,8 +927,15 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
>   		msm_disp_snapshot_add_block(disp_state, cat->wb[i].len,
>   				dpu_kms->mmio + cat->wb[i].base, "wb_%d", i);
>   
> -	msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
> -			dpu_kms->mmio + cat->mdp[0].base, "top");
> +	if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) {
> +		msm_disp_snapshot_add_block(disp_state, 0x380,
> +				dpu_kms->mmio + cat->mdp[0].base, "top");
> +		msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len - 0x3a8,
> +				dpu_kms->mmio + cat->mdp[0].base + 0x3a8, "top_2");

I recall one of the comments from konrad that this should come from the 
catalog rather than a hard-coded offset which you wanted to keep it for 
a later time. I am fine with that.

But instead of a hard-coded offset, do you want to have a macro so that 
atleast we know what the value means and can fix it in the future? 
Otherwise it would end up being one of those numbers which someone later 
on wouldnt understand where it comes from and what it means.

> +	} else {
> +		msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
> +				dpu_kms->mmio + cat->mdp[0].base, "top");
> +	}
>   
>   	pm_runtime_put_sync(&dpu_kms->pdev->dev);
>   }

  reply	other threads:[~2022-11-25  6:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 21:03 [PATCH v5 00/10] drm/msm: add support for SM8450 Dmitry Baryshkov
2022-11-23 21:03 ` Dmitry Baryshkov
2022-11-23 21:03 ` [PATCH v5 01/10] dt-bindings: display/msm: *dpu.yaml: split required properties clauses Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-23 21:03 ` [PATCH v5 02/10] dt-bindings: display/msm: *mdss.yaml: " Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-23 21:03 ` [PATCH v5 03/10] dt-bindings: display/msm: add sm8350 and sm8450 DSI PHYs Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-23 21:03 ` [PATCH v5 04/10] dt-bindings: display/msm: add support for the display on SM8450 Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-28 11:17   ` Krzysztof Kozlowski
2022-11-28 11:17     ` Krzysztof Kozlowski
2022-11-23 21:03 ` [PATCH v5 05/10] drm/msm/dsi/phy: rework register setting for 7nm PHY Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-23 21:03 ` [PATCH v5 06/10] drm/msm/dsi: add support for DSI-PHY on SM8350 and SM8450 Dmitry Baryshkov
2022-11-23 21:03   ` Dmitry Baryshkov
2022-11-23 21:04 ` [PATCH v5 07/10] drm/msm/dsi: add support for DSI 2.6.0 Dmitry Baryshkov
2022-11-23 21:04   ` Dmitry Baryshkov
2022-11-23 21:04 ` [PATCH v5 08/10] drm/msm/dpu: add support for MDP_TOP blackhole Dmitry Baryshkov
2022-11-23 21:04   ` Dmitry Baryshkov
2022-11-25  6:01   ` Abhinav Kumar [this message]
2022-11-25  6:01     ` Abhinav Kumar
2022-12-07  0:51     ` Dmitry Baryshkov
2022-12-07  0:51       ` Dmitry Baryshkov
2022-11-23 21:04 ` [PATCH v5 09/10] drm/msm/dpu: add support for SM8450 Dmitry Baryshkov
2022-11-23 21:04   ` Dmitry Baryshkov
2022-11-23 21:04 ` [PATCH v5 10/10] drm/msm: mdss " Dmitry Baryshkov
2022-11-23 21:04   ` 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=5eab17ea-0688-f63d-ab73-fe4c15db7092@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=agross@kernel.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.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 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.