From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp Date: Tue, 2 Apr 2013 21:08:10 +0300 Message-ID: <20130402180810.GV4469@intel.com> References: <1364923691-3692-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id A4DD5E5F5F for ; Tue, 2 Apr 2013 11:08:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1364923691-3692-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.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 > Signed-off-by: Jesse Barnes We don't actually support anything w/ bpp%8!=3D0, so either works. Actually, for something like bpp=3D4, 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/inte= l_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 =3D DIV_ROUND_UP(width * bpp, 8); > + u32 pitch =3D 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=E4l=E4 Intel OTC