All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Lypak <vladimir.lypak@gmail.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Jordan Crouse <jordan@cosmicpenguin.net>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	"Kristian H. Kristensen" <hoegsberg@google.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Akhil P Oommen <akhilpo@codeaurora.org>,
	Jonathan Marek <jonathan@marek.ca>,
	Iskren Chernev <iskren.chernev@gmail.com>,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/a5xx: Add support for Adreno 506 GPU
Date: Sun, 12 Dec 2021 14:16:01 +0000	[thread overview]
Message-ID: <YbYEIcBSXK9Z0uun@trashcan> (raw)
In-Reply-To: <YXL16V17upehvUwt@ripper>

On Fri, Oct 22, 2021 at 10:33:29AM -0700, Bjorn Andersson wrote:
> On Fri 22 Oct 04:43 PDT 2021, Vladimir Lypak wrote:
> 
> > This GPU is found on SoCs such as MSM8953(650MHz), SDM450(600MHz),
> > SDM632(725MHz).
> > 
> > Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> > ---
> >  drivers/gpu/drm/msm/adreno/a5xx_gpu.c      | 34 ++++++++++++++--------
> >  drivers/gpu/drm/msm/adreno/adreno_device.c | 18 ++++++++++++
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.h    |  5 ++++
> >  3 files changed, 45 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > index 5e2750eb3810..249a0d8bc673 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > @@ -441,7 +441,7 @@ void a5xx_set_hwcg(struct msm_gpu *gpu, bool state)
> >  	const struct adreno_five_hwcg_regs *regs;
> >  	unsigned int i, sz;
> >  
> > -	if (adreno_is_a508(adreno_gpu)) {
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a508(adreno_gpu)) {
> >  		regs = a50x_hwcg;
> >  		sz = ARRAY_SIZE(a50x_hwcg);
> >  	} else if (adreno_is_a509(adreno_gpu) || adreno_is_a512(adreno_gpu)) {
> > @@ -485,7 +485,7 @@ static int a5xx_me_init(struct msm_gpu *gpu)
> >  	OUT_RING(ring, 0x00000000);
> >  
> >  	/* Specify workarounds for various microcode issues */
> > -	if (adreno_is_a530(adreno_gpu)) {
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a530(adreno_gpu)) {
> >  		/* Workaround for token end syncs
> >  		 * Force a WFI after every direct-render 3D mode draw and every
> >  		 * 2D mode 3 draw
> > @@ -620,8 +620,17 @@ static int a5xx_ucode_init(struct msm_gpu *gpu)
> >  
> >  static int a5xx_zap_shader_resume(struct msm_gpu *gpu)
> >  {
> > +	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
> >  	int ret;
> >  
> > +	/*
> > +	 * Adreno 506,508,512 have CPZ Retention feature and
> > +	 * don't need to resume zap shader
> > +	 */
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a508(adreno_gpu) ||
> > +	    adreno_is_a512(adreno_gpu))
> > +		return 0;
> 
> Afaict all other changes in the patch adds a506 support, but this hunk
> changes a508 and a512 behavior.
> 
> I'm not saying that the change is wrong, but this hunk deserves to be in
> it's own patch - so that if there's any impact on those other versions
> it can be tracked down to that specific patch.
> 
> Thanks,
> Bjorn

Hello, Bjorn.

You're right on that. I'm going to remove those changes in V2, since
that SCM call only causes problems on A506 and i can't test it on other
GPUs.

Best regards,
Vladimir

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Lypak <vladimir.lypak@gmail.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Iskren Chernev <iskren.chernev@gmail.com>,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
	Jonathan Marek <jonathan@marek.ca>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Akhil P Oommen <akhilpo@codeaurora.org>,
	dri-devel@lists.freedesktop.org,
	Jordan Crouse <jordan@cosmicpenguin.net>,
	"Kristian H. Kristensen" <hoegsberg@google.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@somainline.org>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	freedreno@lists.freedesktop.org, Sean Paul <sean@poorly.run>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/a5xx: Add support for Adreno 506 GPU
Date: Sun, 12 Dec 2021 14:16:01 +0000	[thread overview]
Message-ID: <YbYEIcBSXK9Z0uun@trashcan> (raw)
In-Reply-To: <YXL16V17upehvUwt@ripper>

On Fri, Oct 22, 2021 at 10:33:29AM -0700, Bjorn Andersson wrote:
> On Fri 22 Oct 04:43 PDT 2021, Vladimir Lypak wrote:
> 
> > This GPU is found on SoCs such as MSM8953(650MHz), SDM450(600MHz),
> > SDM632(725MHz).
> > 
> > Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> > ---
> >  drivers/gpu/drm/msm/adreno/a5xx_gpu.c      | 34 ++++++++++++++--------
> >  drivers/gpu/drm/msm/adreno/adreno_device.c | 18 ++++++++++++
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.h    |  5 ++++
> >  3 files changed, 45 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > index 5e2750eb3810..249a0d8bc673 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > @@ -441,7 +441,7 @@ void a5xx_set_hwcg(struct msm_gpu *gpu, bool state)
> >  	const struct adreno_five_hwcg_regs *regs;
> >  	unsigned int i, sz;
> >  
> > -	if (adreno_is_a508(adreno_gpu)) {
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a508(adreno_gpu)) {
> >  		regs = a50x_hwcg;
> >  		sz = ARRAY_SIZE(a50x_hwcg);
> >  	} else if (adreno_is_a509(adreno_gpu) || adreno_is_a512(adreno_gpu)) {
> > @@ -485,7 +485,7 @@ static int a5xx_me_init(struct msm_gpu *gpu)
> >  	OUT_RING(ring, 0x00000000);
> >  
> >  	/* Specify workarounds for various microcode issues */
> > -	if (adreno_is_a530(adreno_gpu)) {
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a530(adreno_gpu)) {
> >  		/* Workaround for token end syncs
> >  		 * Force a WFI after every direct-render 3D mode draw and every
> >  		 * 2D mode 3 draw
> > @@ -620,8 +620,17 @@ static int a5xx_ucode_init(struct msm_gpu *gpu)
> >  
> >  static int a5xx_zap_shader_resume(struct msm_gpu *gpu)
> >  {
> > +	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
> >  	int ret;
> >  
> > +	/*
> > +	 * Adreno 506,508,512 have CPZ Retention feature and
> > +	 * don't need to resume zap shader
> > +	 */
> > +	if (adreno_is_a506(adreno_gpu) || adreno_is_a508(adreno_gpu) ||
> > +	    adreno_is_a512(adreno_gpu))
> > +		return 0;
> 
> Afaict all other changes in the patch adds a506 support, but this hunk
> changes a508 and a512 behavior.
> 
> I'm not saying that the change is wrong, but this hunk deserves to be in
> it's own patch - so that if there's any impact on those other versions
> it can be tracked down to that specific patch.
> 
> Thanks,
> Bjorn

Hello, Bjorn.

You're right on that. I'm going to remove those changes in V2, since
that SCM call only causes problems on A506 and i can't test it on other
GPUs.

Best regards,
Vladimir

  parent reply	other threads:[~2021-12-12 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 11:43 [PATCH] drm/msm/a5xx: Add support for Adreno 506 GPU Vladimir Lypak
2021-10-22 17:33 ` Bjorn Andersson
2021-12-03 18:51   ` Dmitry Baryshkov
2021-12-03 18:51     ` Dmitry Baryshkov
2021-12-12 15:57     ` Vladimir Lypak
2021-12-12 15:57       ` Vladimir Lypak
2021-12-12 14:16   ` Vladimir Lypak [this message]
2021-12-12 14:16     ` Vladimir Lypak

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=YbYEIcBSXK9Z0uun@trashcan \
    --to=vladimir.lypak@gmail.com \
    --cc=airlied@linux.ie \
    --cc=akhilpo@codeaurora.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hoegsberg@google.com \
    --cc=iskren.chernev@gmail.com \
    --cc=jonathan@marek.ca \
    --cc=jordan@cosmicpenguin.net \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=saiprakash.ranjan@codeaurora.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.