[v2,5/6] drm/v3d: Stop trying to flush L2C on V3D 3.3+
diff mbox series

Message ID 20181203222438.25417-5-eric@anholt.net
State New
Headers show
Series
  • [v2,1/6] drm/v3d: Document cache flushing ABI.
Related show

Commit Message

Eric Anholt Dec. 3, 2018, 10:24 p.m. UTC
This cache was replaced with the slice accessing the L2T in the newer
generations.  Noted by Dave during review.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/v3d/v3d_gem.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Dave Emett Dec. 4, 2018, 11:54 a.m. UTC | #1
On Mon, 3 Dec 2018 at 22:24, Eric Anholt <eric@anholt.net> wrote:
>
> This cache was replaced with the slice accessing the L2T in the newer
> generations.  Noted by Dave during review.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Dave Emett <david.emett@broadcom.com>

> ---
>  drivers/gpu/drm/v3d/v3d_gem.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
> index c268c7c79566..8a4be9515179 100644
> --- a/drivers/gpu/drm/v3d/v3d_gem.c
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -130,10 +130,15 @@ v3d_flush_l3(struct v3d_dev *v3d)
>         }
>  }
>
> -/* Invalidates the (read-only) L2 cache. */
> +/* Invalidates the (read-only) L2C cache.  This was the L2 cache for
> + * uniforms and instructions on V3D 3.2.
> + */
>  static void
> -v3d_invalidate_l2(struct v3d_dev *v3d, int core)
> +v3d_invalidate_l2c(struct v3d_dev *v3d, int core)
>  {
> +       if (v3d->ver > 32)
> +               return;
> +
>         V3D_CORE_WRITE(core, V3D_CTL_L2CACTL,
>                        V3D_L2CACTL_L2CCLR |
>                        V3D_L2CACTL_L2CENA);
> @@ -168,7 +173,7 @@ v3d_invalidate_caches(struct v3d_dev *v3d)
>  {
>         v3d_flush_l3(v3d);
>
> -       v3d_invalidate_l2(v3d, 0);
> +       v3d_invalidate_l2c(v3d, 0);
>         v3d_invalidate_slices(v3d, 0);
>         v3d_flush_l2t(v3d, 0);
>  }
> --
> 2.20.0.rc1
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index c268c7c79566..8a4be9515179 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -130,10 +130,15 @@  v3d_flush_l3(struct v3d_dev *v3d)
 	}
 }
 
-/* Invalidates the (read-only) L2 cache. */
+/* Invalidates the (read-only) L2C cache.  This was the L2 cache for
+ * uniforms and instructions on V3D 3.2.
+ */
 static void
-v3d_invalidate_l2(struct v3d_dev *v3d, int core)
+v3d_invalidate_l2c(struct v3d_dev *v3d, int core)
 {
+	if (v3d->ver > 32)
+		return;
+
 	V3D_CORE_WRITE(core, V3D_CTL_L2CACTL,
 		       V3D_L2CACTL_L2CCLR |
 		       V3D_L2CACTL_L2CENA);
@@ -168,7 +173,7 @@  v3d_invalidate_caches(struct v3d_dev *v3d)
 {
 	v3d_flush_l3(v3d);
 
-	v3d_invalidate_l2(v3d, 0);
+	v3d_invalidate_l2c(v3d, 0);
 	v3d_invalidate_slices(v3d, 0);
 	v3d_flush_l2t(v3d, 0);
 }