[PATCH 09/20] drm: merge drm_memory.h into drm_memory.c

Thierry Reding thierry.reding at gmail.com
Fri Aug 29 04:56:23 PDT 2014


On Fri, Aug 29, 2014 at 12:12:35PM +0200, David Herrmann wrote:
> The drm_memory.h header is only used to define PAGE_AGP, which is only
> used in drm_memory.c. Fold the header into drm_memory.c and drop it.
> 
> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
> ---
>  drivers/gpu/drm/drm_memory.c | 11 +++++++++
>  include/drm/drmP.h           |  6 ++---
>  include/drm/drm_memory.h     | 59 --------------------------------------------
>  3 files changed, 13 insertions(+), 63 deletions(-)
>  delete mode 100644 include/drm/drm_memory.h
> 
> diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
> index 7888dad..62fda6a 100644
> --- a/drivers/gpu/drm/drm_memory.c
> +++ b/drivers/gpu/drm/drm_memory.c
> @@ -39,6 +39,17 @@
>  #include "drm_legacy.h"
>  
>  #if __OS_HAS_AGP
> +
> +#ifdef HAVE_PAGE_AGP
> +# include <asm/agp.h>
> +#else

This check seems to be redundant. All architectures that support AGP
provide this header.

> +# ifdef __powerpc__
> +#  define PAGE_AGP	__pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)

Is this even necessary? It seems like PowerPC always defines
HAVE_PAGE_AGP.

> +# else
> +#  define PAGE_AGP	PAGE_KERNEL
> +# endif
> +#endif

Shouldn't this simply be moved into the asm/agp.h header for each of the
architectures that has AGP?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140829/e9eb97c8/attachment-0001.sig>


More information about the dri-devel mailing list