[igt-dev] [PATCH 4/5] i915/gem_mocs_settings: fix global MOCS on gen 11

Kumar Valsan, Prathap prathap.kumar.valsan at intel.com
Mon Jul 29 20:53:35 UTC 2019


On Thu, Jul 25, 2019 at 01:33:53PM -0700, Lucas De Marchi wrote:
> Gen 11 still has the per-context MOCS table. It's gen 12 and later that
> only has a global MOCS table available so it doesn't make sense to test
> dirtying it per context.
MOCS is global GEN11HP onwards. For GEN11 LP, LLC MOCS are private to
context, however L3 MOCS will not be saved and restored per context.

Better to consider Gen11 MOCS as global and skip the dirty
test.

Thanks,
Prathap
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>  tests/i915/gem_mocs_settings.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c
> index e3da8515..9ec0b122 100644
> --- a/tests/i915/gem_mocs_settings.c
> +++ b/tests/i915/gem_mocs_settings.c
> @@ -483,12 +483,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)
>  	uint32_t ctx_clean_id;
>  	uint32_t ctx_dirty_id;
>  
> -	/* As mocs is global for GEN11+, trying privileged write to dirty
> +	/*
> +	 * As mocs is global for GEN12+, trying privileged write to dirty
>  	 * the mocs and testing context save and restore of mocs between
>  	 * contexts is bound to fail.
>  	 */
>  	if (flags & MOCS_DIRTY_VALUES)
> -		igt_skip_on(intel_gen(intel_get_drm_devid(fd)) >= 11);
> +		igt_skip_on(intel_gen(intel_get_drm_devid(fd)) >= 12);
>  
>  	gem_require_ring(fd, engine);
>  
> -- 
> 2.21.0
> 


More information about the igt-dev mailing list