ar71xx/ath79: ag71xx: dont fetch the same var again
[openwrt/staging/wigyori.git] / target / linux / brcm2708 / patches-4.19 / 950-0570-drm-v3d-Drop-unused-v3d_flush_caches.patch
1 From e8fb9a84012e6c866d1143acf04ca855b05f4241 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Mon, 3 Dec 2018 14:24:34 -0800
4 Subject: [PATCH 570/725] drm/v3d: Drop unused v3d_flush_caches().
5
6 Now that I've specified how the end-of-pipeline flushing should work,
7 we're never going to use this function.
8
9 Signed-off-by: Eric Anholt <eric@anholt.net>
10 Reviewed-by: Dave Emett <david.emett@broadcom.com>
11 Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-2-eric@anholt.net
12 (cherry picked from commit 2aa34fd5c7754824cf5488b61ac644f30d3c5c85)
13 ---
14 drivers/gpu/drm/v3d/v3d_drv.h | 1 -
15 drivers/gpu/drm/v3d/v3d_gem.c | 21 ---------------------
16 2 files changed, 22 deletions(-)
17
18 --- a/drivers/gpu/drm/v3d/v3d_drv.h
19 +++ b/drivers/gpu/drm/v3d/v3d_drv.h
20 @@ -308,7 +308,6 @@ void v3d_exec_put(struct v3d_exec_info *
21 void v3d_tfu_job_put(struct v3d_tfu_job *exec);
22 void v3d_reset(struct v3d_dev *v3d);
23 void v3d_invalidate_caches(struct v3d_dev *v3d);
24 -void v3d_flush_caches(struct v3d_dev *v3d);
25
26 /* v3d_irq.c */
27 int v3d_irq_init(struct v3d_dev *v3d);
28 --- a/drivers/gpu/drm/v3d/v3d_gem.c
29 +++ b/drivers/gpu/drm/v3d/v3d_gem.c
30 @@ -175,20 +175,6 @@ v3d_invalidate_slices(struct v3d_dev *v3
31 V3D_SET_FIELD(0xf, V3D_SLCACTL_ICC));
32 }
33
34 -/* Invalidates texture L2 cachelines */
35 -static void
36 -v3d_invalidate_l2t(struct v3d_dev *v3d, int core)
37 -{
38 - V3D_CORE_WRITE(core,
39 - V3D_CTL_L2TCACTL,
40 - V3D_L2TCACTL_L2TFLS |
41 - V3D_SET_FIELD(V3D_L2TCACTL_FLM_CLEAR, V3D_L2TCACTL_FLM));
42 - if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
43 - V3D_L2TCACTL_L2TFLS), 100)) {
44 - DRM_ERROR("Timeout waiting for L2T invalidate\n");
45 - }
46 -}
47 -
48 void
49 v3d_invalidate_caches(struct v3d_dev *v3d)
50 {
51 @@ -199,13 +185,6 @@ v3d_invalidate_caches(struct v3d_dev *v3
52 v3d_flush_l2t(v3d, 0);
53 }
54
55 -void
56 -v3d_flush_caches(struct v3d_dev *v3d)
57 -{
58 - v3d_invalidate_l1td(v3d, 0);
59 - v3d_invalidate_l2t(v3d, 0);
60 -}
61 -
62 static void
63 v3d_attach_object_fences(struct v3d_bo **bos, int bo_count,
64 struct dma_fence *fence)