From patchwork Wed Dec 14 23:58:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 131503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B95F510086F for ; Thu, 15 Dec 2011 10:58:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758111Ab1LNX6e (ORCPT ); Wed, 14 Dec 2011 18:58:34 -0500 Received: from gate.crashing.org ([63.228.1.57]:58945 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755603Ab1LNX6d (ORCPT ); Wed, 14 Dec 2011 18:58:33 -0500 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id pBENwRMU027317; Wed, 14 Dec 2011 17:58:28 -0600 Message-ID: <1323907106.21839.27.camel@pasglop> Subject: [PATCH 1/2] offb: Fix bug in calculating requested vram size From: Benjamin Herrenschmidt To: linux-fbdev@vger.kernel.org Cc: linuxppc-dev , kvm-ppc@vger.kernel.org Date: Thu, 15 Dec 2011 10:58:26 +1100 X-Mailer: Evolution 3.2.1- Mime-Version: 1.0 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org From 448820776363da565f221c020f4ccb3c610faec3 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 14 Dec 2011 16:52:02 +1100 Subject: We used to try to request 8 times more vram than needed, which would fail if the card has a too small BAR (observed with qemu). Signed-off-by: Benjamin Herrenschmidt --- drivers/video/offb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) (I'm happy to carry that in the powerpc tree) -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/offb.c b/drivers/video/offb.c index cb163a5..915acae 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -381,7 +381,7 @@ static void __init offb_init_fb(const char *name, const char *full_name, int pitch, unsigned long address, int foreign_endian, struct device_node *dp) { - unsigned long res_size = pitch * height * (depth + 7) / 8; + unsigned long res_size = pitch * height; struct offb_par *par = &default_par; unsigned long res_start = address; struct fb_fix_screeninfo *fix;