mirror_ubuntu-kernels/drivers/gpu/drm/i915/selftests
Jani Nikula f6cf3883df drm/i915: use mock device info for creating mock device
Instead of modifying the device info on the fly, use static const mock
device info.

It's not okay to modify device info at runtime; we've added separate
runtime info for info that needs to be modified at runtime. We've added
safeguards to device info to prevent it from being modified, but commit
5e352e32ae ("drm/i915: preparation for using PAT index") just cast the
const away and modified it anyway. This prevents device info from being
moved to rodata.

Fixes: 5e352e32ae ("drm/i915: preparation for using PAT index")
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Fei Yang <fei.yang@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b0db62045a96a3fd4cf123685da88cc777f9b485.1687878757.git.jani.nikula@intel.com
(cherry picked from commit ecc7a3ce07)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2023-07-04 10:40:29 +01:00
..
i915_active.c
i915_gem_evict.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_gem_gtt.c drm/i915/selftest: annotate maybe unused but set variable unused 2023-06-07 13:25:00 +03:00
i915_gem.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_live_selftests.h drm/i915/gt: Add selftests for TLB invalidation 2023-02-01 16:17:41 +00:00
i915_mock_selftests.h
i915_perf_selftests.h
i915_perf.c drm/i915: Replace all non-returning strlcpy with strscpy 2023-05-24 09:38:56 -04:00
i915_random.c
i915_random.h
i915_request.c drm/i915/selftest: Remove avoidable init assignment 2023-03-07 14:20:43 -05:00
i915_selftest.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
i915_sw_fence.c drm/i915/selftests: add local workqueue for SW fence selftest 2023-06-10 06:33:16 +03:00
i915_syncmap.c
i915_vma.c drm/i915: Rename ggtt_view as gtt_view 2022-09-08 10:24:17 +01:00
igt_atomic.c
igt_atomic.h
igt_flush_test.c drm/i915/selftests: Flush all tiles on test exit 2023-01-26 14:11:47 +01:00
igt_flush_test.h
igt_live_test.c drm/i915/selftest: Record GT error for gt failure 2023-04-25 18:03:57 +02:00
igt_live_test.h
igt_mmap.c
igt_mmap.h
igt_reset.c
igt_reset.h
igt_spinner.c drm/i915: Wrap all access to i915_vma.node.start|size 2022-12-06 10:52:42 +01:00
igt_spinner.h
intel_memory_region.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
intel_scheduler_helpers.c drm/i915/selftest: fix intel_selftest_modify_policy argument types 2023-01-23 13:45:04 -05:00
intel_scheduler_helpers.h
intel_uncore.c drm/i915/mtl: Add MTL forcewake support 2022-09-19 08:08:40 -07:00
lib_sw_fence.c
lib_sw_fence.h
librapl.c
librapl.h
mock_drm.h
mock_gem_device.c drm/i915: use mock device info for creating mock device 2023-07-04 10:40:29 +01:00
mock_gem_device.h
mock_gtt.c drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
mock_gtt.h
mock_region.c drm/i915: use i915_sg_dma_sizes() for all backends 2022-11-09 10:07:22 +00:00
mock_region.h
mock_request.c
mock_request.h
mock_uncore.c
mock_uncore.h
scatterlist.c drm/i915: Check for integer truncation on scatterlist creation 2022-12-30 04:19:18 -05:00