[Intel-gfx] [RFC PATCH v2 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 16 18:58:53 UTC 2020


Quoting Akeem G Abodunrin (2020-01-14 17:45:48)
> diff --git a/drivers/gpu/drm/i915/gt/gen7_renderclear.h b/drivers/gpu/drm/i915/gt/gen7_renderclear.h
> new file mode 100644
> index 000000000000..4b88dd8d0fd4
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/gt/gen7_renderclear.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2019 Intel Corporation
> + */
> +
> +#ifndef __GEN7_RENDERCLEAR_H__
> +#define __GEN7_RENDERCLEAR_H__
> +
> +#define batch_advance(Y, CS) GEM_BUG_ON((Y)->end != (CS))

It works better if you actually put it to use, after every
batch_alloc_items() [give or take]. And it doesn't need to be used
outside of gen7_renderclear.c so can live there.
-Chris


More information about the Intel-gfx mailing list