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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> > > ---
> > >  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

Attachment: pgp7tfNo5qdYM.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux