diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-15 08:19:28 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-15 16:23:09 +0000 |
commit | bc76298e68e791f878d76f9b7a911713c85b2843 (patch) | |
tree | 86b8146ae173e35441ff57157cf283699f5dadb1 /drivers/gpu/drm/i915/i915_drv.c | |
parent | 62d4028fb0b9ce6250d66c39ebe887522d77eb3c (diff) | |
download | op-kernel-dev-bc76298e68e791f878d76f9b7a911713c85b2843.zip op-kernel-dev-bc76298e68e791f878d76f9b7a911713c85b2843.tar.gz |
drm/i915: Store gen_mask inside the static device info
Rather than deriving the gen_mask from the static intel_device_info->gen
at runtime, pre-fill it in the static data.
v2: Undefine local macros at end of their scope.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180215081930.11477-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index a9931b8..046c073 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -909,8 +909,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv, device_info->platform_mask = BIT(device_info->platform); BUG_ON(device_info->gen > sizeof(device_info->gen_mask) * BITS_PER_BYTE); - device_info->gen_mask = BIT(device_info->gen - 1); - spin_lock_init(&dev_priv->irq_lock); spin_lock_init(&dev_priv->gpu_error.lock); mutex_init(&dev_priv->backlight_lock); |