There isn't any generic code that uses ->idle so remove it.
Unified · Split
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | extern bool hang_debug; |
| 41 | 41 | |
| 42 | 42 | static void a3xx_dump(struct msm_gpu *gpu); |
| 43 | +static bool a3xx_idle(struct msm_gpu *gpu); | |
| 43 | 44 | |
| 44 | 45 | static bool a3xx_me_init(struct msm_gpu *gpu) |
| 45 | 46 | { |
| @@ -65,7 +66,7 @@ static bool a3xx_me_init(struct msm_gpu *gpu) · 19 unmodified lines | ||
| 65 | 66 | OUT_RING(ring, 0x00000000); |
| 66 | 67 | |
| 67 | 68 | gpu->funcs->flush(gpu); |
| 68 | − return gpu->funcs->idle(gpu); | |
| 69 | + return a3xx_idle(gpu); | |
| 69 | 70 | } |
| 70 | 71 | |
| 71 | 72 | static int a3xx_hw_init(struct msm_gpu *gpu) |
| @@ -446,7 +447,6 @@ static const struct adreno_gpu_funcs funcs = { · 374 unmodified lines | ||
| 446 | 447 | .last_fence = adreno_last_fence, |
| 447 | 448 | .submit = adreno_submit, |
| 448 | 449 | .flush = adreno_flush, |
| 449 | − .idle = a3xx_idle, | |
| 450 | 450 | .irq = a3xx_irq, |
| 451 | 451 | .destroy = a3xx_destroy, |
| 452 | 452 | #ifdef CONFIG_DEBUG_FS |
| @@ -31,6 +31,7 @@ · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | extern bool hang_debug; |
| 33 | 33 | static void a4xx_dump(struct msm_gpu *gpu); |
| 34 | +static bool a4xx_idle(struct msm_gpu *gpu); | |
| 34 | 35 | |
| 35 | 36 | /* |
| 36 | 37 | * a4xx_enable_hwcg() - Program the clock control registers |
| @@ -137,7 +138,7 @@ static bool a4xx_me_init(struct msm_gpu *gpu) · 100 unmodified lines | ||
| 137 | 138 | OUT_RING(ring, 0x00000000); |
| 138 | 139 | |
| 139 | 140 | gpu->funcs->flush(gpu); |
| 140 | − return gpu->funcs->idle(gpu); | |
| 141 | + return a4xx_idle(gpu); | |
| 141 | 142 | } |
| 142 | 143 | |
| 143 | 144 | static int a4xx_hw_init(struct msm_gpu *gpu) |
| @@ -534,7 +535,6 @@ static const struct adreno_gpu_funcs funcs = { · 390 unmodified lines | ||
| 534 | 535 | .last_fence = adreno_last_fence, |
| 535 | 536 | .submit = adreno_submit, |
| 536 | 537 | .flush = adreno_flush, |
| 537 | − .idle = a4xx_idle, | |
| 538 | 538 | .irq = a4xx_irq, |
| 539 | 539 | .destroy = a4xx_destroy, |
| 540 | 540 | #ifdef CONFIG_DEBUG_FS |
| @@ -287,7 +287,7 @@ static int a5xx_me_init(struct msm_gpu *gpu) · 286 unmodified lines | ||
| 287 | 287 | |
| 288 | 288 | gpu->funcs->flush(gpu); |
| 289 | 289 | |
| 290 | − return gpu->funcs->idle(gpu) ? 0 : -EINVAL; | |
| 290 | + return a5xx_idle(gpu) ? 0 : -EINVAL; | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | static struct drm_gem_object *a5xx_ucode_load_bo(struct msm_gpu *gpu, |
| @@ -638,7 +638,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu) · 344 unmodified lines | ||
| 638 | 638 | OUT_RING(gpu->rb, 0x0F); |
| 639 | 639 | |
| 640 | 640 | gpu->funcs->flush(gpu); |
| 641 | − if (!gpu->funcs->idle(gpu)) | |
| 641 | + if (!a5xx_idle(gpu)) | |
| 642 | 642 | return -EINVAL; |
| 643 | 643 | } |
| 644 | 644 | |
| @@ -655,7 +655,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu) · 10 unmodified lines | ||
| 655 | 655 | OUT_RING(gpu->rb, 0x00000000); |
| 656 | 656 | |
| 657 | 657 | gpu->funcs->flush(gpu); |
| 658 | − if (!gpu->funcs->idle(gpu)) | |
| 658 | + if (!a5xx_idle(gpu)) | |
| 659 | 659 | return -EINVAL; |
| 660 | 660 | } else { |
| 661 | 661 | /* Print a warning so if we die, we know why */ |
| @@ -732,7 +732,7 @@ static inline bool _a5xx_check_idle(struct msm_gpu *gpu) · 70 unmodified lines | ||
| 732 | 732 | A5XX_RBBM_INT_0_MASK_MISC_HANG_DETECT); |
| 733 | 733 | } |
| 734 | 734 | |
| 735 | −static bool a5xx_idle(struct msm_gpu *gpu) | |
| 735 | +bool a5xx_idle(struct msm_gpu *gpu) | |
| 736 | 736 | { |
| 737 | 737 | /* wait for CP to drain ringbuffer: */ |
| 738 | 738 | if (!adreno_idle(gpu)) |
| @@ -1037,7 +1037,6 @@ static const struct adreno_gpu_funcs funcs = { · 298 unmodified lines | ||
| 1037 | 1037 | .last_fence = adreno_last_fence, |
| 1038 | 1038 | .submit = a5xx_submit, |
| 1039 | 1039 | .flush = adreno_flush, |
| 1040 | − .idle = a5xx_idle, | |
| 1041 | 1040 | .irq = a5xx_irq, |
| 1042 | 1041 | .destroy = a5xx_destroy, |
| 1043 | 1042 | #ifdef CONFIG_DEBUG_FS |
| @@ -58,5 +58,6 @@ static inline int spin_usecs(struct msm_gpu *gpu, uint32_t usecs, · 57 unmodified lines | ||
| 58 | 58 | return -ETIMEDOUT; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | +bool a5xx_idle(struct msm_gpu *gpu); | |
| 61 | 62 | |
| 62 | 63 | #endif /* __A5XX_GPU_H__ */ |
| @@ -194,7 +194,7 @@ static int a5xx_gpmu_init(struct msm_gpu *gpu) · 193 unmodified lines | ||
| 194 | 194 | |
| 195 | 195 | gpu->funcs->flush(gpu); |
| 196 | 196 | |
| 197 | − if (!gpu->funcs->idle(gpu)) { | |
| 197 | + if (!a5xx_idle(gpu)) { | |
| 198 | 198 | DRM_ERROR("%s: Unable to load GPMU firmware. GPMU will not be active\n", |
| 199 | 199 | gpu->name); |
| 200 | 200 | return -EINVAL; |
| @@ -50,7 +50,6 @@ struct msm_gpu_funcs { · 49 unmodified lines | ||
| 50 | 50 | void (*submit)(struct msm_gpu *gpu, struct msm_gem_submit *submit, |
| 51 | 51 | struct msm_file_private *ctx); |
| 52 | 52 | void (*flush)(struct msm_gpu *gpu); |
| 53 | − bool (*idle)(struct msm_gpu *gpu); | |
| 54 | 53 | irqreturn_t (*irq)(struct msm_gpu *irq); |
| 55 | 54 | uint32_t (*last_fence)(struct msm_gpu *gpu); |
| 56 | 55 | void (*recover)(struct msm_gpu *gpu); |