[Intel-gfx] [PATCH v2 1/6] drm/i915: use mock device info for creating mock device
Andi Shyti
andi.shyti at linux.intel.com
Thu Jun 29 11:53:30 UTC 2023
Hi Jani,
On Tue, Jun 27, 2023 at 06:13:58PM +0300, Jani Nikula wrote:
> 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
> 5e352e32aec2 ("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: 5e352e32aec2 ("drm/i915: preparation for using PAT index")
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> Cc: Fei Yang <fei.yang at intel.com>
> Cc: Andi Shyti <andi.shyti at linux.intel.com>
> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
thanks for fixing this!
Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>
Andi
More information about the Intel-gfx
mailing list