From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp
Date: Tue, 2 Apr 2013 21:08:10 +0300 [thread overview]
Message-ID: <20130402180810.GV4469@intel.com> (raw)
In-Reply-To: <1364923691-3692-1-git-send-email-jbarnes@virtuousgeek.org>
On Tue, Apr 02, 2013 at 10:28:11AM -0700, Jesse Barnes wrote:
> As Imre pointed out, this will do the wrong thing.
>
> Reported-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We don't actually support anything w/ bpp%8!=0, so either works.
Actually, for something like bpp=4, the original code might even be
more correct. But I don't really want to think about <8bpp stuff,
so I won't object to the patch.
> ---
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 37f4bb3..18f0547 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -137,7 +137,7 @@ struct intel_framebuffer {
> inline static u32
> intel_framebuffer_pitch_for_width(int width, int bpp)
> {
> - u32 pitch = DIV_ROUND_UP(width * bpp, 8);
> + u32 pitch = width * DIV_ROUND_UP(bpp, 8);
> return ALIGN(pitch, 64);
> }
>
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2013-04-02 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 17:28 [PATCH] drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp Jesse Barnes
2013-04-02 18:08 ` Ville Syrjälä [this message]
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=20130402180810.GV4469@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.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