public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: Re: [PATCH] drm/i915: Split out GTT specific header file
Date: Sun, 23 Mar 2014 10:44:19 -0700	[thread overview]
Message-ID: <20140323174419.GB999@bwidawsk.net> (raw)
In-Reply-To: <20140323152235.GJ26519@phenom.ffwll.local>

On Sun, Mar 23, 2014 at 04:22:35PM +0100, Daniel Vetter wrote:
> On Sat, Mar 22, 2014 at 10:47:21PM -0700, Ben Widawsky wrote:
> > This file contains all necessary defines, prototypes and typesdefs for
> > manipulating GEN graphics address translation (this does not include the
> > legacy AGP driver)
> > 
> > Reiterating the comment in the header,
> > "Please try to maintain the following order within this file unless it
> > makes sense to do otherwise. From top to bottom:
> > 1. typedefs
> > 2. #defines, and macros
> > 3. structure definitions
> > 4. function prototypes
> > 
> > Within each section, please try to order by generation in ascending
> > order, from top to bottom (ie. GEN6 on the top, GEN8 on the bottom)."
> > 
> > I've made some minor cleanups, and fixed a couple of typos while here -
> > but there should be no functional changes.
> > 
> > The purpose of the patch is to reduce clutter in our main header file,
> > making room for new growth, and make documentation of our interfaces
> > easier by splitting things out.
> > 
> > With a little more work, like making i915_gtt a pointer, we could
> > potentially completely isolate this header from i915_drv.h. At the
> > moment however, I don't think it's worth the effort.
> > 
> > Personally, I would have liked to put the PTE encoding functions in this
> > file too, but I didn't want to rock the boat too much.
> 
> Why would we split those out? They shouldn't be used outside of
> i915_gem_gtt.c, so a forward decl (if needed at all) should be all we
> need.

iirc it was in the x86 header file, which I was trying to emulate as
much as possible. In there case though, they have less platform
specificity.

> 
> Note that i915_gem_gtt.c is a pretty big mess with hw spcific stuff and
> generic code confusingly interleaved. I've had patches around to fix this
> up and remove all the forward decls and stuff back in Oct last year, but
> nuked them again.

Yeah. It's actually not *that* bad. It's mostly hw specific stuff. We
could potentially move a few things over to gem.c, and feel okay about
it I think.

> 
> > A similar patch has been in use on my machine for some time. This exact
> > patch though has only been compile tested.
> > 
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> 
> Queued for -next, thanks for the patch.
> -Daniel

Awesome, thanks. I'll rebase my stuff now.

[snip]


-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2014-03-23 17:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-23  5:47 [PATCH] drm/i915: Split out GTT specific header file Ben Widawsky
2014-03-23 15:22 ` Daniel Vetter
2014-03-23 17:44   ` Ben Widawsky [this message]
2014-03-23 17:49     ` Ben Widawsky

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=20140323174419.GB999@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=benjamin.widawsky@intel.com \
    --cc=daniel@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox