Re: [PATCH] drm: Make drm_pci_agp_init legacy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 07.03.20 um 10:37 schrieb Chris Wilson:
> Pull the drm_pci_agp_init() underneath the legacy ifdeffry alongside its
> only caller.

My I suggest to change the commit message slightly, because the patch
actually moves drm_pci_agp_destroy(). Something along 'implement
_destroy() before _init() to protect the latter by CONFIG_DRM_LEGACY'
should do.

> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

In any case

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

> ---
>  drivers/gpu/drm/drm_pci.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
> index 5218475ad7e7..81aa21561982 100644
> --- a/drivers/gpu/drm/drm_pci.c
> +++ b/drivers/gpu/drm/drm_pci.c
> @@ -166,6 +166,18 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
>  	return drm_pci_irq_by_busid(dev, p);
>  }
>  
> +void drm_pci_agp_destroy(struct drm_device *dev)
> +{
> +	if (dev->agp) {
> +		arch_phys_wc_del(dev->agp->agp_mtrr);
> +		drm_legacy_agp_clear(dev);
> +		kfree(dev->agp);
> +		dev->agp = NULL;
> +	}
> +}
> +
> +#ifdef CONFIG_DRM_LEGACY
> +
>  static void drm_pci_agp_init(struct drm_device *dev)
>  {
>  	if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {
> @@ -180,18 +192,6 @@ static void drm_pci_agp_init(struct drm_device *dev)
>  	}
>  }
>  
> -void drm_pci_agp_destroy(struct drm_device *dev)
> -{
> -	if (dev->agp) {
> -		arch_phys_wc_del(dev->agp->agp_mtrr);
> -		drm_legacy_agp_clear(dev);
> -		kfree(dev->agp);
> -		dev->agp = NULL;
> -	}
> -}
> -
> -#ifdef CONFIG_DRM_LEGACY
> -
>  static int drm_get_pci_dev(struct pci_dev *pdev,
>  			   const struct pci_device_id *ent,
>  			   struct drm_driver *driver)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux