Skip to contentSkip to conversation

drm/v3d: fix wait for TMU write combiner flush

PATCH Superseded Iago Toral Quiroga 3 participants 5 messages Sep 14, 2021 – Sep 15, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/v3d: fix wait for TMU write combiner flush

The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit.

Fixes spurious Vulkan CTS failures in:
dEQP-VK.binding_model.descriptorset_random.*

---
 drivers/gpu/drm/v3d/v3d_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/v3d/v3d_gem.c +1 -1
index a3529809d547..5159f544bc16 100644
@@ -197,7 +197,7 @@ v3d_clean_caches(struct v3d_dev *v3d)
 
 	V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
 	if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
-		       V3D_L2TCACTL_L2TFLS), 100)) {
+		       V3D_L2TCACTL_TMUWCF), 100)) {
 		DRM_ERROR("Timeout waiting for L1T write combiner flush\n");
 	}
 
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Iago Toral Quiroga

The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit.

Fixes spurious Vulkan CTS failures in:
dEQP-VK.binding_model.descriptorset_random.*

Hi Iago,

makes sense to me.

can you add the fix tag?

Fixes d223f98f02099 ("drm/v3d: Add support for compute shader dispatch")

also, you forgot to add your Signed-off-by tag.

Quoted 9 lines
---
 drivers/gpu/drm/v3d/v3d_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/v3d/v3d_gem.c +0 -0
index a3529809d547..5159f544bc16 100644

drivers/gpu/drm/v3d/v3d_gem.c v3d_clean_caches(struct v3d_dev *v3d) · line 201

Quoted 6 lines
drivers/gpu/drm/v3d/v3d_gem.c +1 -1
@@ -197,7 +197,7 @@ v3d_clean_caches(struct v3d_dev *v3d)
 
 	V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
 	if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
-		       V3D_L2TCACTL_L2TFLS), 100)) {
+		       V3D_L2TCACTL_TMUWCF), 100)) {
 		DRM_ERROR("Timeout waiting for L1T write combiner flush\n");

hm.. would it be clearer to say "TMU write combiner" here?

in the next version, you can already include:

Thanks,

Melissa

Quoted 5 lines
drivers/gpu/drm/v3d/v3d_gem.c +0 -0
 	}
 
Signature · 1 line
2.25.1
author
#2 lore raw
Quoted 9 lines · Melissa Wen
Quoted 6 lines · Iago Toral Quiroga

The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit.

Fixes spurious Vulkan CTS failures in:
dEQP-VK.binding_model.descriptorset_random.*

Hi Iago,

Quoted 7 lines

makes sense to me.

can you add the fix tag?

Fixes d223f98f02099 ("drm/v3d: Add support for compute shader

dispatch")

also, you forgot to add your Signed-off-by tag.

Will include both, thanks.

Quoted 11 lines
Quoted 11 lines
---
 drivers/gpu/drm/v3d/v3d_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/v3d/v3d_gem.c +0 -0
index a3529809d547..5159f544bc16 100644
@@ -197,7 +197,7 @@ v3d_clean_caches(struct v3d_dev *v3d)
 
Quoted 7 lines

drivers/gpu/drm/v3d/v3d_gem.c v3d_clean_caches(struct v3d_dev *v3d)

Quoted 6 lines
drivers/gpu/drm/v3d/v3d_gem.c +1 -1
 	V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
 	if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
-		       V3D_L2TCACTL_L2TFLS), 100)) {
+		       V3D_L2TCACTL_TMUWCF), 100)) {
 		DRM_ERROR("Timeout waiting for L1T write combiner
 flush\n");

hm.. would it be clearer to say "TMU write combiner" here?

Yes, I guess it does. I'll add this too.

Quoted 4 lines

in the next version, you can already include:

Thanks!

Iago

Quoted 8 lines

Thanks,

Melissa

Quoted 5 lines
drivers/gpu/drm/v3d/v3d_gem.c +0 -0
 	}
Signature · 2 lines
-- 
2.25.1
#3 lore raw

PATCH v2 1/1 drm/v3d: fix wait for TMU write combiner flush

In reply to Melissa Wen

The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit.

v2 (Melissa Wen):
- Add Signed-off-by and Fixes tags.
- Change the error message for the timeout to be more clear.

Fixes spurious Vulkan CTS failures in:
dEQP-VK.binding_model.descriptorset_random.*

Fixes d223f98f02099 ("drm/v3d: Add support for compute shader dispatch")
---
 drivers/gpu/drm/v3d/v3d_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/v3d/v3d_gem.c +2 -2
index a3529809d547..1953706bdaeb 100644
@@ -197,8 +197,8 @@ v3d_clean_caches(struct v3d_dev *v3d)
 
 	V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
 	if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
-		       V3D_L2TCACTL_L2TFLS), 100)) {
-		DRM_ERROR("Timeout waiting for L1T write combiner flush\n");
+		       V3D_L2TCACTL_TMUWCF), 100)) {
+		DRM_ERROR("Timeout waiting for TMU write combiner flush\n");
 	}
 
 	mutex_lock(&v3d->cache_clean_lock);
Signature · 1 line
2.25.1
Applied
#4 lore raw
Quoted 8 lines · Iago Toral Quiroga

The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit.

v2 (Melissa Wen):
- Add Signed-off-by and Fixes tags.
- Change the error message for the timeout to be more clear.

Quoted 6 lines

Fixes spurious Vulkan CTS failures in:
dEQP-VK.binding_model.descriptorset_random.*

Fixes d223f98f02099 ("drm/v3d: Add support for compute shader dispatch")

Applied to drm-misc-next.

Thanks,

Melissa

Quoted 22 lines
---
 drivers/gpu/drm/v3d/v3d_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/v3d/v3d_gem.c +2 -2
index a3529809d547..1953706bdaeb 100644
@@ -197,8 +197,8 @@ v3d_clean_caches(struct v3d_dev *v3d)
 
 	V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
 	if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
-		       V3D_L2TCACTL_L2TFLS), 100)) {
-		DRM_ERROR("Timeout waiting for L1T write combiner flush\n");
+		       V3D_L2TCACTL_TMUWCF), 100)) {
+		DRM_ERROR("Timeout waiting for TMU write combiner flush\n");
 	}
 
 	mutex_lock(&v3d->cache_clean_lock);
Signature · 1 line
2.25.1