public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg
Date: Wed, 13 Nov 2013 14:06:40 -0800	[thread overview]
Message-ID: <20131113140640.230f4cf6@jbarnes-desktop> (raw)
In-Reply-To: <20131113215904.GC13207@nuc-i3427.alporthouse.com>

On Wed, 13 Nov 2013 21:59:04 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Wed, Nov 13, 2013 at 10:20:44AM -0800, Jesse Barnes wrote:
> > And move it up in the file for earlier usage.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++----------
> >  1 file changed, 16 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 2df2366..d4cc00c 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -5452,6 +5452,17 @@ static void vlv_crtc_clock_get(struct intel_crtc *crtc,
> >  	pipe_config->port_clock = clock.dot / 5;
> >  }
> >  
> > +static u32
> > +intel_framebuffer_pitch_for_width(int width, int bpp, bool tiled)
> > +{
> > +	u32 pitch = DIV_ROUND_UP(width * bpp, 8);
> > +
> > +	if (tiled)
> > +		return ALIGN(pitch, 512);
> 
> Should this not go the whole hog and do pot alignment on gen2/3?

Probably a good idea.  And this smells like common code, surely we must
be doing this somewhere else too?  Anyway could definitely be extended.

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2013-11-13 22:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 18:20 BIOS fb wrapping Jesse Barnes
2013-11-13 18:20 ` [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg Jesse Barnes
2013-11-13 21:59   ` Chris Wilson
2013-11-13 22:06     ` Jesse Barnes [this message]
2013-11-13 18:20 ` [PATCH 2/5] drm/i915: retrieve current fb config into new plane_config structure at init Jesse Barnes
2013-11-13 22:10   ` Chris Wilson
2013-11-14 15:06   ` Chris Wilson
2013-11-14 16:09     ` Jesse Barnes
2013-11-20 13:10   ` Ville Syrjälä
2013-11-22 21:55     ` Jesse Barnes
2013-11-22 23:08       ` Ville Syrjälä
2013-11-22 23:21         ` Jesse Barnes
2013-11-22 23:26           ` Ville Syrjälä
2013-11-22 23:29             ` Jesse Barnes
2013-11-13 18:20 ` [PATCH 3/5] drm/i915: split fb allocation and initialization Jesse Barnes
2013-11-13 21:58   ` Chris Wilson
2013-11-13 18:20 ` [PATCH 4/5] drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon Jesse Barnes
2013-11-13 22:05   ` Bob Paauwe
2013-11-13 22:08     ` Jesse Barnes
2013-11-13 22:07   ` Chris Wilson
2013-11-13 22:11     ` Jesse Barnes
2013-11-13 18:20 ` [PATCH 5/5] drm/i915: don't memset the fb buffer Jesse Barnes
2013-11-13 21:56   ` Chris Wilson
2013-11-13 22:05     ` Jesse Barnes

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=20131113140640.230f4cf6@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=chris@chris-wilson.co.uk \
    --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