mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:20:53 +07:00
drm/pci: Move drm_pci_alloc/free under CONFIG_DRM_LEGACY
All other users have been removed, yay! Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> [fix checkpatch warning] Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200403110610.2344842-1-daniel.vetter@ffwll.ch
This commit is contained in:
parent
c76d4ab764
commit
33775336d5
@ -36,6 +36,8 @@
|
||||
#include "drm_internal.h"
|
||||
#include "drm_legacy.h"
|
||||
|
||||
#ifdef CONFIG_DRM_LEGACY
|
||||
|
||||
/**
|
||||
* drm_pci_alloc - Allocate a PCI consistent memory block, for DMA.
|
||||
* @dev: DRM device
|
||||
@ -93,6 +95,7 @@ void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(drm_pci_free);
|
||||
#endif
|
||||
|
||||
static int drm_get_pci_domain(struct drm_device *dev)
|
||||
{
|
||||
|
@ -194,11 +194,26 @@ void drm_legacy_idlelock_release(struct drm_lock_data *lock);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
|
||||
size_t align);
|
||||
void drm_pci_free(struct drm_device *dev, struct drm_dma_handle *dmah);
|
||||
|
||||
int drm_legacy_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
|
||||
void drm_legacy_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
|
||||
|
||||
#else
|
||||
|
||||
static inline struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev,
|
||||
size_t size, size_t align)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void drm_pci_free(struct drm_device *dev,
|
||||
struct drm_dma_handle *dmah)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int drm_legacy_pci_init(struct drm_driver *driver,
|
||||
struct pci_driver *pdriver)
|
||||
{
|
||||
|
@ -34,30 +34,4 @@
|
||||
|
||||
#include <linux/pci.h>
|
||||
|
||||
struct drm_dma_handle;
|
||||
struct drm_device;
|
||||
struct drm_driver;
|
||||
struct drm_master;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
|
||||
size_t align);
|
||||
void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);
|
||||
|
||||
#else
|
||||
|
||||
static inline struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev,
|
||||
size_t size, size_t align)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void drm_pci_free(struct drm_device *dev,
|
||||
struct drm_dma_handle *dmah)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _DRM_PCI_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user