[PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU
Cavitt, Jonathan
jonathan.cavitt at intel.com
Thu May 16 16:22:17 UTC 2024
-----Original Message-----
From: Das, Nirmoy <nirmoy.das at intel.com>
Sent: Thursday, May 16, 2024 8:14 AM
To: intel-gfx at lists.freedesktop.org
Cc: dri-devel at lists.freedesktop.org; Das, Nirmoy <nirmoy.das at intel.com>; Andi Shyti <andi.shyti at linux.intel.com>; Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>; Cavitt, Jonathan <jonathan.cavitt at intel.com>
Subject: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU
>
> The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick
> correct caching mode.")' was not complete as for non LLC sharing platforms
> cpu read can happen from LLC which probably doesn't have the latest
> changes made by GPU.
>
> Cc: Andi Shyti <andi.shyti at linux.intel.com>
> Cc: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
> Cc: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
I see no problem with this
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt
> ---
> drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> index 65a931ea80e9..3527b8f446fe 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> @@ -196,7 +196,7 @@ static int verify_access(struct drm_i915_private *i915,
> if (err)
> goto out_file;
>
> - mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, true);
> + mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, false);
> vaddr = i915_gem_object_pin_map_unlocked(native_obj, mode);
> if (IS_ERR(vaddr)) {
> err = PTR_ERR(vaddr);
> --
> 2.42.0
>
>
More information about the Intel-gfx
mailing list