drm/xe/display: Avoid calling readq()
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 19 Jan 2024 00:16:10 +0000 (16:16 -0800)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 24 Jan 2024 10:13:25 +0000 (11:13 +0100)
commit981460d8ee6042b14149fd8931ae27b91f2146b1
tree343acd0ab3827b7e668266e0e7e5392a97d3b459
parent52e8948c6b6a41603371996b9bc0e43e17d690b4
drm/xe/display: Avoid calling readq()

readq() is not available in 32bits and i915_gem_object_read_from_page()
is supposed to allow reading arbitrary sizes determined by the `size`
argument. Currently the only caller only passes a size == 8 so the
second problem is not that big. Migrate to calling
memcpy()/memcpy_fromio() to allow possible changes in the display side
and to fix the build on 32b architectures.

v2: Use memcpy/memcpy_fromio directly rather than using iosys-map with
    the same size == 8 bytes restriction (Matt Roper)

Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240119001612.2991381-4-lucas.demarchi@intel.com
(cherry picked from commit 406663f777bee53e9ad93dc080c333d4655ab7de)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h