All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 01/11] drm: Remove __OS_HAS_AGP
Date: Wed, 9 Sep 2015 15:53:56 +0300	[thread overview]
Message-ID: <20150909125356.GO29811@intel.com> (raw)
In-Reply-To: <1441713391-24732-2-git-send-email-daniel.vetter@ffwll.ch>

On Tue, Sep 08, 2015 at 01:56:21PM +0200, Daniel Vetter wrote:
> We already express the drm/agp depencies correctly in Kconfig, so we
> can rip this remnant from the shared drm core days.
> 
> Aside: Pretty much all the #ifdefs in radeon/nouveau could be killed
> if ttm would provide dummy functions. I'm not going to volunteer for
> that though.
> 
> v2: Use IS_ENABLED(CONFIG_AGP) as suggested by Ville
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/Makefile             |  3 ++-
>  drivers/gpu/drm/drm_agpsupport.c     |  4 ++--
>  drivers/gpu/drm/drm_bufs.c           |  6 +++---
>  drivers/gpu/drm/drm_ioc32.c          |  6 +++---
>  drivers/gpu/drm/drm_ioctl.c          |  2 +-
>  drivers/gpu/drm/drm_memory.c         |  6 +++---
>  drivers/gpu/drm/drm_vm.c             |  8 ++++----
>  drivers/gpu/drm/mga/mga_dma.c        |  4 ++--
>  drivers/gpu/drm/nouveau/nouveau_bo.c |  8 ++++----
>  drivers/gpu/drm/r128/r128_cce.c      | 12 ++++++------
>  drivers/gpu/drm/radeon/r600_cp.c     | 14 +++++++-------
>  drivers/gpu/drm/radeon/radeon_agp.c  |  8 ++++----
>  drivers/gpu/drm/radeon/radeon_cp.c   | 16 ++++++++--------
>  drivers/gpu/drm/radeon/radeon_ttm.c  | 10 +++++-----
>  include/drm/drm_agpsupport.h         |  6 +++---
>  15 files changed, 57 insertions(+), 56 deletions(-)
> 
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 45e7719846b1..f458d6e33655 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -6,7 +6,7 @@ drm-y       :=	drm_auth.o drm_bufs.o drm_cache.o \
>  		drm_context.o drm_dma.o \
>  		drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
>  		drm_lock.o drm_memory.o drm_drv.o drm_vm.o \
> -		drm_agpsupport.o drm_scatter.o drm_pci.o \
> +		drm_scatter.o drm_pci.o \
>  		drm_platform.o drm_sysfs.o drm_hashtab.o drm_mm.o \
>  		drm_crtc.o drm_modes.o drm_edid.o \
>  		drm_info.o drm_debugfs.o drm_encoder_slave.o \
> @@ -19,6 +19,7 @@ drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
>  drm-$(CONFIG_PCI) += ati_pcigart.o
>  drm-$(CONFIG_DRM_PANEL) += drm_panel.o
>  drm-$(CONFIG_OF) += drm_of.o
> +drm-$(CONFIG_AGP) += drm_agpsupport.o
>  
>  drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \
>  		drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o
> diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
> index 4b2b4aa5033b..4dc85ec7aca1 100644
> --- a/drivers/gpu/drm/drm_agpsupport.c
> +++ b/drivers/gpu/drm/drm_agpsupport.c
> @@ -36,7 +36,7 @@
>  #include <linux/slab.h>
>  #include "drm_legacy.h"
>  
> -#if __OS_HAS_AGP
> +#if IS_ENABLED(CONFIG_AGP)

Since you make drm_agpsupport.o build depend on CONFIG_AGP, I suppose
you could drop the #if entirely from drm_agpsupport.c?

>  
>  #include <asm/agp.h>
>  
> @@ -503,4 +503,4 @@ drm_agp_bind_pages(struct drm_device *dev,
>  }
>  EXPORT_SYMBOL(drm_agp_bind_pages);
>  
> -#endif /* __OS_HAS_AGP */
> +#endif /* CONFIG_AGP */
<snip>
> diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h
> index 055dc058d147..3d0833c63af2 100644
> --- a/include/drm/drm_agpsupport.h
> +++ b/include/drm/drm_agpsupport.h

Not removing the __OS_HAS_AGP define itself?

> @@ -28,7 +28,7 @@ struct drm_agp_head {
>  	unsigned long page_mask;
>  };
>  
> -#if __OS_HAS_AGP
> +#ifdef CONFIG_AGP

Should use IS_ENABLED(CONFIG_AGP) as well.

Otherwise the patch looks good to me, so with that fixed
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
>  void drm_free_agp(struct agp_memory * handle, int pages);
>  int drm_bind_agp(struct agp_memory * handle, unsigned int start);
> @@ -66,7 +66,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
>  int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
>  		       struct drm_file *file_priv);
>  
> -#else /* __OS_HAS_AGP */
> +#else /* CONFIG_AGP */
>  
>  static inline void drm_free_agp(struct agp_memory * handle, int pages)
>  {
> @@ -194,6 +194,6 @@ static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
>  	return -ENODEV;
>  }
>  
> -#endif /* __OS_HAS_AGP */
> +#endif /* CONFIG_AGP */
>  
>  #endif /* _DRM_AGPSUPPORT_H_ */
> -- 
> 2.5.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-09 12:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 11:56 [PATCH 00/11] Mixed bag of ioctl and agp cleanups Daniel Vetter
2015-09-08 11:56 ` [PATCH 01/11] drm: Remove __OS_HAS_AGP Daniel Vetter
2015-09-09 12:53   ` Ville Syrjälä [this message]
2015-09-09 14:45   ` [PATCH] " Daniel Vetter
2015-09-28 15:05     ` David Herrmann
2015-09-08 11:56 ` [PATCH 02/11] drm/i915: Kill cross-module option depencies Daniel Vetter
2015-09-08 11:56 ` [PATCH 03/11] drm/i915: Mark debug mod options as _unsafe Daniel Vetter
2015-09-22  9:34   ` Jani Nikula
2015-09-22  9:54     ` Daniel Vetter
2015-09-08 11:56 ` [PATCH 04/11] drm/i915: Remove setparam ioctl Daniel Vetter
2015-09-09 13:02   ` Ville Syrjälä
2015-09-09 14:46   ` [PATCH] drm/i915: Mark getparam ioctl as DRM_UNLOCKED Daniel Vetter
2015-09-30  8:46   ` [PATCH] drm/i915: Remove setparam ioctl Daniel Vetter
2015-09-30  8:50     ` Chris Wilson
2015-09-30 13:40     ` Ville Syrjälä
2015-09-08 11:56 ` [PATCH 05/11] drm/i915: Mark getparam ioctl as DRM_UNLOCKED Daniel Vetter
2015-10-09 10:00   ` Chris Wilson
2015-09-08 11:56 ` [PATCH 06/11] drm: Define a drm_invalid_op ioctl implementation Daniel Vetter
2015-09-09 12:28   ` David Herrmann
2015-09-08 11:56 ` [PATCH 07/11] drm/drm_ioctl.c: kerneldoc Daniel Vetter
2015-09-28 15:07   ` David Herrmann
2015-09-08 11:56 ` [PATCH 08/11] drm: Enforce unlocked ioctl operation for kms driver ioctls Daniel Vetter
2015-09-08 18:45   ` Gustavo Padovan
2015-09-28 15:21   ` David Herrmann
2015-09-28 19:42   ` [PATCH] " Daniel Vetter
2015-09-08 11:56 ` [PATCH 09/11] drm/vmwgfx: Stop checking for DRM_UNLOCKED Daniel Vetter
2015-09-28 15:22   ` David Herrmann
2015-09-08 11:56 ` [PATCH 10/11] drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers Daniel Vetter
2015-09-08 18:46   ` [Intel-gfx] " Gustavo Padovan
2015-09-28 15:24   ` David Herrmann
2015-09-08 11:56 ` [PATCH 11/11] drm: Remove dummy agp ioctl wrappers Daniel Vetter
2015-09-28 15:25   ` David Herrmann
2015-09-08 12:58 ` [PATCH 00/11] Mixed bag of ioctl and agp cleanups Christian König
2015-10-08 17:01   ` Daniel Vetter

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=20150909125356.GO29811@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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.