[Intel-gfx] [PATCH] drm/i915: stop assigning drm->dev_private pointer

Stimson, Dale B dale.b.stimson at intel.com
Tue Feb 25 21:07:39 UTC 2020


On 2020-02-24 13:33:12, Jani Nikula wrote:
> We no longer need or use it as we subclass struct drm_device in our
> struct drm_i915_private, and can always use to_i915() to get at
> i915. Stop assigning the pointer to catch anyone trying to add new users
> for ->dev_private.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Dale B Stimson <dale.b.stimson at intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.c                  | 2 --
>  drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 -
>  2 files changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 4034e431cc4c..d5aed3b7d7e3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1372,8 +1372,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		return ERR_PTR(err);
>  	}
>  
> -	i915->drm.dev_private = i915;
> -
>  	i915->drm.pdev = pdev;
>  	pci_set_drvdata(pdev, i915);
>  
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index 3b8986983afc..754d0eb6beaa 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -144,7 +144,6 @@ struct drm_i915_private *mock_gem_device(void)
>  		goto put_device;
>  	}
>  	i915->drm.pdev = pdev;
> -	i915->drm.dev_private = i915;
>  
>  	intel_runtime_pm_init_early(&i915->runtime_pm);
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list