From: Sam Ravnborg <sam@ravnborg.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/pci: Move drm_pci_alloc/free under CONFIG_DRM_LEGACY
Date: Fri, 3 Apr 2020 15:56:45 +0200 [thread overview]
Message-ID: <20200403135645.GA1549@ravnborg.org> (raw)
In-Reply-To: <20200403110610.2344842-1-daniel.vetter@ffwll.ch>
Hi Daniel
On Fri, Apr 03, 2020 at 01:06:09PM +0200, Daniel Vetter wrote:
> All other users have been removed, yay!
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_pci.c | 3 +++
> include/drm/drm_legacy.h | 15 +++++++++++++++
> include/drm/drm_pci.h | 26 --------------------------
> 3 files changed, 18 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
> index 81aa21561982..131b7a139fda 100644
> --- a/drivers/gpu/drm/drm_pci.c
> +++ b/drivers/gpu/drm/drm_pci.c
> @@ -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)
> {
> diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
> index dcef3598f49e..b53c3686c5fc 100644
> --- a/include/drm/drm_legacy.h
> +++ b/include/drm/drm_legacy.h
> @@ -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);
^
checkpatch rightfully complains about this.
With this detail fixed:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> +
> 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)
> {
> diff --git a/include/drm/drm_pci.h b/include/drm/drm_pci.h
> index 3941b0255ecf..1bf31131960e 100644
> --- a/include/drm/drm_pci.h
> +++ b/include/drm/drm_pci.h
> @@ -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_ */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-04-03 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 11:06 [PATCH 1/2] drm/pci: Move drm_pci_alloc/free under CONFIG_DRM_LEGACY Daniel Vetter
2020-04-03 11:06 ` [PATCH 2/2] drm: delete drm_pci.h Daniel Vetter
2020-04-03 14:31 ` Sam Ravnborg
2020-04-03 13:56 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200403135645.GA1549@ravnborg.org \
--to=sam@ravnborg.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.