Skip to contentSkip to conversation

drm/msm: A couple gen8 fixes

PATCH In review Rob Clark 3 participants 7 messages Jan 9 – Jan 11

Subsystems (4)
lore
Share & tools
lore

Rob Clark

author maintainer
#0 lore raw

cover drm/msm: A couple gen8 fixes

Fixes for a couple things I noticed in testing.

Rob Clark (2):
drm/msm: Fix x2-85 TPL1_DBG_ECO_CNTL1
drm/msm: Fix GMEM_BASE for gen8

 drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.52.0
author maintainer
#1 lore raw

PATCH 1/2 drm/msm: Fix x2-85 TPL1_DBG_ECO_CNTL1

We actually need to set b26, just claiming to do so is not enough :-)

Fixes 01ff3bf27215 ("drm/msm/a8xx: Add support for Adreno X2-85 GPU")
---
 drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/a6xx_catalog.c +1 -1
index ac9a95aab2fb..e15d654733ea 100644
@@ -1691,7 +1691,7 @@ static const struct adreno_reglist_pipe x285_nonctxt_regs[] = {
 	{ REG_A7XX_SP_READ_SEL, 0x0001ff00, BIT(PIPE_NONE) },
 	{ REG_A6XX_TPL1_DBG_ECO_CNTL, 0x10000000, BIT(PIPE_NONE) },
 	/* BIT(26): Disable final clamp for bicubic filtering */
-	{ REG_A6XX_TPL1_DBG_ECO_CNTL1, 0x00000720, BIT(PIPE_NONE) },
+	{ REG_A6XX_TPL1_DBG_ECO_CNTL1, 0x04000720, BIT(PIPE_NONE) },
 	{ REG_A6XX_UCHE_MODE_CNTL, 0x80080000, BIT(PIPE_NONE) },
 	{ REG_A8XX_UCHE_CCHE_MODE_CNTL, 0x00001000, BIT(PIPE_NONE) },
 	{ REG_A8XX_UCHE_CCHE_CACHE_WAYS, 0x00000800, BIT(PIPE_NONE) },
Signature · 1 line
2.52.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] drm/msm: Fix x2-85 TPL1_DBG_ECO_CNTL1

Quoted 8 lines · Rob Clark

We actually need to set b26, just claiming to do so is not enough :-)

Fixes 01ff3bf27215 ("drm/msm/a8xx: Add support for Adreno X2-85 GPU")
---
 drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes
Dmitry
author maintainer
#3 lore raw

PATCH 2/2 drm/msm: Fix GMEM_BASE for gen8

In reply to Rob Clark

This should also be zero for gen8.

Fixes 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -2
index 1c80909e63ca..d5fe6f6f0dec 100644
@@ -376,8 +376,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx,
 		*value = adreno_gpu->info->gmem;
 		return 0;
 	case MSM_PARAM_GMEM_BASE:
-		if (adreno_is_a650_family(adreno_gpu) ||
-		    adreno_is_a740_family(adreno_gpu))
+		if (adreno_gpu->info->family >= ADRENO_6XX_GEN4)
 			*value = 0;
 		else
 			*value = 0x100000;
Signature · 1 line
2.52.0
#4 lore raw

Re: [PATCH 2/2] drm/msm: Fix GMEM_BASE for gen8

Quoted 13 lines · Rob Clark

This should also be zero for gen8.

Fixes 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/msm/adreno/adreno_gpu.c +0 -0
index 1c80909e63ca..d5fe6f6f0dec 100644

drivers/gpu/drm/msm/adreno/adreno_gpu.c int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx, · line 379

Quoted 6 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -2
@@ -376,8 +376,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx,
 		*value = adreno_gpu->info->gmem;
 		return 0;
 	case MSM_PARAM_GMEM_BASE:
-		if (adreno_is_a650_family(adreno_gpu) ||
-		    adreno_is_a740_family(adreno_gpu))
+		if (adreno_gpu->info->family >= ADRENO_6XX_GEN4)

What about a7xx gen1? should it also be 0?

Quoted 6 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +0 -0
 			*value = 0;
 		else
 			*value = 0x100000;
Signature · 1 line
2.52.0
Signature · 2 lines
With best wishes
Dmitry
#5 lore raw

Re: [PATCH 2/2] drm/msm: Fix GMEM_BASE for gen8

Quoted 10 lines · Dmitry Baryshkov
Quoted 8 lines · Rob Clark

This should also be zero for gen8.

Fixes 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines

drivers/gpu/drm/msm/adreno/adreno_gpu.c int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx, · line 379

Quoted 11 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -2
index 1c80909e63ca..d5fe6f6f0dec 100644
@@ -376,8 +376,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx,
              *value = adreno_gpu->info->gmem;
              return 0;
      case MSM_PARAM_GMEM_BASE:
-             if (adreno_is_a650_family(adreno_gpu) ||
-                 adreno_is_a740_family(adreno_gpu))
+             if (adreno_gpu->info->family >= ADRENO_6XX_GEN4)

What about a7xx gen1? should it also be 0?

*probably*.. I'm guessing this was incorrect before

BR,
-R

Quoted 11 lines
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +0 -1
                      *value = 0;
              else
                      *value = 0x100000;
--

2.52.0

--
With best wishes
Dmitry

#6 lore raw

Re: [PATCH 2/2] drm/msm: Fix GMEM_BASE for gen8

Quoted 26 lines · Rob Clark
Quoted 10 lines · Dmitry Baryshkov
Quoted 8 lines · Rob Clark

This should also be zero for gen8.

Fixes 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines

drivers/gpu/drm/msm/adreno/adreno_gpu.c int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx, · line 379

Quoted 11 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -2
index 1c80909e63ca..d5fe6f6f0dec 100644
@@ -376,8 +376,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_context *ctx,
              *value = adreno_gpu->info->gmem;
              return 0;
      case MSM_PARAM_GMEM_BASE:
-             if (adreno_is_a650_family(adreno_gpu) ||
-                 adreno_is_a740_family(adreno_gpu))
+             if (adreno_gpu->info->family >= ADRENO_6XX_GEN4)

What about a7xx gen1? should it also be 0?

Quoted 1 line

*probably*.. I'm guessing this was incorrect before

I'd at least mention it in the commit message.

Quoted 15 lines

BR,
-R

Quoted 11 lines
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.c +0 -1
                      *value = 0;
              else
                      *value = 0x100000;
--

2.52.0

--
With best wishes
Dmitry

Signature · 2 lines
With best wishes
Dmitry