[PATCH 09/20] drm: merge drm_memory.h into drm_memory.c
Thierry Reding
thierry.reding at gmail.com
Fri Aug 29 06:26:05 PDT 2014
On Fri, Aug 29, 2014 at 02:43:10PM +0200, Daniel Vetter wrote:
> On Fri, Aug 29, 2014 at 01:56:23PM +0200, Thierry Reding wrote:
> > 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.
>
> Iirc I've tried to untangle this before and I'm not 100% this is actually
> the case on all ppc platforms. It looked like there's some crazy include
> header depency stuff going on.
Interestingly, I don't even see _PAGE_KERNEL defined on PowerPC...
> But given how popular drm on ppc and that the few platforms where people
> actually use gpus are the saner ones (hopefully) I think we can just move
> ahead with this change and fixup any compile breakage once it's reported.
> If there is any.
I'm not objecting to this change since it's merely reorganizing code.
This is just more possible future cleanup.
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/a8010f2d/attachment-0001.sig>
More information about the dri-devel
mailing list