mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 08:36:42 +07:00
drm/i915/selftests: Markup __iomem for igt_gem_coherency
Silence sparse warnings by using __iomem markup and io accessors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171114191842.19063-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
b099a4459d
commit
fb4e14860b
@ -33,7 +33,7 @@ static int cpu_set(struct drm_i915_gem_object *obj,
|
||||
{
|
||||
unsigned int needs_clflush;
|
||||
struct page *page;
|
||||
typeof(v) *map;
|
||||
u32 *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_obj_prepare_shmem_write(obj, &needs_clflush);
|
||||
@ -59,7 +59,7 @@ static int cpu_get(struct drm_i915_gem_object *obj,
|
||||
{
|
||||
unsigned int needs_clflush;
|
||||
struct page *page;
|
||||
typeof(v) map;
|
||||
u32 *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_obj_prepare_shmem_read(obj, &needs_clflush);
|
||||
@ -82,7 +82,7 @@ static int gtt_set(struct drm_i915_gem_object *obj,
|
||||
u32 v)
|
||||
{
|
||||
struct i915_vma *vma;
|
||||
typeof(v) *map;
|
||||
u32 __iomem *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_set_to_gtt_domain(obj, true);
|
||||
@ -98,7 +98,7 @@ static int gtt_set(struct drm_i915_gem_object *obj,
|
||||
if (IS_ERR(map))
|
||||
return PTR_ERR(map);
|
||||
|
||||
map[offset / sizeof(*map)] = v;
|
||||
iowrite32(v, &map[offset / sizeof(*map)]);
|
||||
i915_vma_unpin_iomap(vma);
|
||||
|
||||
return 0;
|
||||
@ -109,7 +109,7 @@ static int gtt_get(struct drm_i915_gem_object *obj,
|
||||
u32 *v)
|
||||
{
|
||||
struct i915_vma *vma;
|
||||
typeof(v) map;
|
||||
u32 __iomem *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_set_to_gtt_domain(obj, false);
|
||||
@ -125,7 +125,7 @@ static int gtt_get(struct drm_i915_gem_object *obj,
|
||||
if (IS_ERR(map))
|
||||
return PTR_ERR(map);
|
||||
|
||||
*v = map[offset / sizeof(*map)];
|
||||
*v = ioread32(&map[offset / sizeof(*map)]);
|
||||
i915_vma_unpin_iomap(vma);
|
||||
|
||||
return 0;
|
||||
@ -135,7 +135,7 @@ static int wc_set(struct drm_i915_gem_object *obj,
|
||||
unsigned long offset,
|
||||
u32 v)
|
||||
{
|
||||
typeof(v) *map;
|
||||
u32 *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_set_to_wc_domain(obj, true);
|
||||
@ -156,7 +156,7 @@ static int wc_get(struct drm_i915_gem_object *obj,
|
||||
unsigned long offset,
|
||||
u32 *v)
|
||||
{
|
||||
typeof(v) map;
|
||||
u32 *map;
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_set_to_wc_domain(obj, false);
|
||||
|
Loading…
Reference in New Issue
Block a user