From patchwork Tue Apr 2 17:28:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 2379651 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 40088DF2A1 for ; Tue, 2 Apr 2013 17:28:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28DC8E5DDD for ; Tue, 2 Apr 2013 10:28:54 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from oproxy9.bluehost.com (oproxy9.bluehost.com [69.89.24.6]) by gabe.freedesktop.org (Postfix) with SMTP id 1DE97E601D for ; Tue, 2 Apr 2013 10:28:18 -0700 (PDT) Received: (qmail 24445 invoked by uid 0); 2 Apr 2013 17:28:17 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy9.bluehost.com with SMTP; 2 Apr 2013 17:28:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Message-Id:Date:Subject:To:From; bh=RK4xXMuDznmsfGSo3kKgW8w96IAZpxSJTkaAs9g2Blo=; b=Q3Pg9VxXwLeEvB9WegIlRc0dlrnhuRIhqLDNtYLz3lvRTjLAzTlAc65WITTRE7b/tS8yq8rX/ifLuKxA67PLp3b1H+cDGe2puh1P0igHVD4inmQhURFy0fcIcl0uxptR; Received: from [67.161.37.189] (port=54905 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1UN50L-0007v7-Ll for intel-gfx@lists.freedesktop.org; Tue, 02 Apr 2013 11:28:17 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Tue, 2 Apr 2013 10:28:11 -0700 Message-Id: <1364923691-3692-1-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.7.9.5 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH] drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org As Imre pointed out, this will do the wrong thing. Reported-by: Imre Deak Signed-off-by: Jesse Barnes --- 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); }