diff mbox series

[09/12] drm/legacy: don't include any of ati_pcigart in legacy.

Message ID 20190423020041.32702-10-airlied@gmail.com (mailing list archive)
State New, archived
Headers show
Series [01/12] drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v2) | expand

Commit Message

Dave Airlie April 23, 2019, 2 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

This could probably be done with Kconfig somehow, but I failed in my
first 2 minute attempt.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/ati_pcigart.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Daniel Vetter April 23, 2019, 6:50 p.m. UTC | #1
On Tue, Apr 23, 2019 at 12:00:38PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> This could probably be done with Kconfig somehow, but I failed in my
> first 2 minute attempt.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>

config DRM_ATI_PCIGART
	bool
	default y
	depens on PCI && DRM_LEGACY

Should give you a nice hidden Kconfig symbol that dtrt and can be used in
the Makefile. With that

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Other option (no idea it's preferred):

config DRM_ATI_PCIGART
	bool

and then in

config DRM_LEGACY
	select DRM_ATI_PCIGART if PCI

Either should work I think, the latter more closely follows what we do
already.
-Daniel

> ---
>  drivers/gpu/drm/ati_pcigart.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
> index 2362f07fe1fc..0420a28f770a 100644
> --- a/drivers/gpu/drm/ati_pcigart.c
> +++ b/drivers/gpu/drm/ati_pcigart.c
> @@ -5,6 +5,7 @@
>   * \author Gareth Hughes <gareth@valinux.com>
>   */
>  
> +#if IS_ENABLED(CONFIG_DRM_LEGACY)
>  /*
>   * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com
>   *
> @@ -203,3 +204,4 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
>  	return ret;
>  }
>  EXPORT_SYMBOL(drm_ati_pcigart_init);
> +#endif
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sam Ravnborg April 23, 2019, 7:58 p.m. UTC | #2
On Tue, Apr 23, 2019 at 08:50:35PM +0200, Daniel Vetter wrote:
> On Tue, Apr 23, 2019 at 12:00:38PM +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> > 
> > This could probably be done with Kconfig somehow, but I failed in my
> > first 2 minute attempt.
> > 
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> 
> config DRM_ATI_PCIGART
> 	bool
> 	default y
> 	depens on PCI && DRM_LEGACY
> 
> Should give you a nice hidden Kconfig symbol that dtrt and can be used in
> the Makefile. With that
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Other option (no idea it's preferred):
> 
> config DRM_ATI_PCIGART
> 	bool
> 
> and then in
> 
> config DRM_LEGACY
> 	select DRM_ATI_PCIGART if PCI
> 
> Either should work I think, the latter more closely follows what we do
> already.

Personal preference is the latter, because we keep the DRM_LEGACY
logic located in one place.
But as long as we do it in Kconfig then all is good.

	Sam
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
index 2362f07fe1fc..0420a28f770a 100644
--- a/drivers/gpu/drm/ati_pcigart.c
+++ b/drivers/gpu/drm/ati_pcigart.c
@@ -5,6 +5,7 @@ 
  * \author Gareth Hughes <gareth@valinux.com>
  */
 
+#if IS_ENABLED(CONFIG_DRM_LEGACY)
 /*
  * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com
  *
@@ -203,3 +204,4 @@  int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
 	return ret;
 }
 EXPORT_SYMBOL(drm_ati_pcigart_init);
+#endif