Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755579AbbGUJql (ORCPT ); Tue, 21 Jul 2015 05:46:41 -0400 Received: from terminus.zytor.com ([198.137.202.10]:40697 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754968AbbGUJqh (ORCPT ); Tue, 21 Jul 2015 05:46:37 -0400 Date: Tue, 21 Jul 2015 02:43:12 -0700 From: "tip-bot for Luis R. Rodriguez" Message-ID: Cc: plagnioj@jcrosoft.com, toshi.kani@hp.com, luto@amacapital.net, bp@suse.de, torvalds@linux-foundation.org, mingo@kernel.org, tglx@linutronix.de, tomi.valkeinen@ti.com, peterz@infradead.org, minipli@googlemail.com, robdclark@gmail.com, akpm@linux-foundation.org, a.hajda@samsung.com, adaplas@gmail.com, vbabka@suse.cz, airlied@redhat.com, mcgrof@suse.com, syrjala@sci.fi, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, dbueso@suse.de, jgross@suse.com, mgorman@suse.de, hpa@zytor.com, sbsiddha@gmail.com Reply-To: tglx@linutronix.de, tomi.valkeinen@ti.com, peterz@infradead.org, minipli@googlemail.com, robdclark@gmail.com, akpm@linux-foundation.org, a.hajda@samsung.com, plagnioj@jcrosoft.com, luto@amacapital.net, bp@suse.de, toshi.kani@hp.com, torvalds@linux-foundation.org, mingo@kernel.org, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, dbueso@suse.de, jgross@suse.com, hpa@zytor.com, mgorman@suse.de, sbsiddha@gmail.com, adaplas@gmail.com, airlied@redhat.com, vbabka@suse.cz, syrjala@sci.fi, mcgrof@suse.com In-Reply-To: <1436491499-3289-3-git-send-email-mcgrof@do-not-panic.com> References: <1436491499-3289-3-git-send-email-mcgrof@do-not-panic.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] drivers/video/fbdev/atyfb: Clarify ioremap() base and length used Git-Commit-ID: f55de6ec375da89f89f1a76e1b998e5f14878c06 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3644 Lines: 96 Commit-ID: f55de6ec375da89f89f1a76e1b998e5f14878c06 Gitweb: http://git.kernel.org/tip/f55de6ec375da89f89f1a76e1b998e5f14878c06 Author: Luis R. Rodriguez AuthorDate: Thu, 9 Jul 2015 18:24:57 -0700 Committer: Ingo Molnar CommitDate: Tue, 21 Jul 2015 10:47:04 +0200 drivers/video/fbdev/atyfb: Clarify ioremap() base and length used Adjust the ioremap() call for the framebuffer to use the same values we later use for the framebuffer. This will make it easier to review the next change. The size of the framebuffer varies but since this is for PCI we *know* this defaults to 0x800000. atyfb_setup_generic() is *only* used on PCI probe. No functional change. Signed-off-by: Luis R. Rodriguez Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andrzej Hajda Cc: Andy Lutomirski Cc: Antonino Daplas Cc: Daniel Vetter Cc: Dave Airlie Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Jean-Christophe Plagniol-Villard Cc: Juergen Gross Cc: Linus Torvalds Cc: Mathias Krause Cc: Mel Gorman Cc: Peter Zijlstra Cc: Rob Clark Cc: Suresh Siddha Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: Toshi Kani Cc: Ville Syrjälä Cc: Vlastimil Babka Cc: arnd@arndb.de Cc: benh@kernel.crashing.org Cc: dan.j.williams@intel.com Cc: geert@linux-m68k.org Cc: hch@lst.de Cc: hmh@hmh.eng.br Cc: linux-fbdev@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-pci@vger.kernel.org Cc: mpe@ellerman.id.au Cc: mst@redhat.com Cc: ralf@linux-mips.org Cc: ross.zwisler@linux.intel.com Cc: stefan.bader@canonical.com Cc: tj@kernel.org Cc: ville.syrjala@linux.intel.com Link: http://lkml.kernel.org/r/1436491499-3289-3-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar --- drivers/video/fbdev/aty/atyfb_base.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index 16936bb..de8f7e0 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -3489,7 +3489,21 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, /* Map in frame buffer */ info->fix.smem_start = addr; - info->screen_base = ioremap(addr, 0x800000); + + /* + * The framebuffer is not always 8 MiB, that's just the size of the + * PCI BAR. We temporarily abuse smem_len here to store the size + * of the BAR. aty_init() will later correct it to match the actual + * framebuffer size. + * + * On devices that don't have the auxiliary register aperture, the + * registers are housed at the top end of the framebuffer PCI BAR. + * aty_fudge_framebuffer_len() is used to reduce smem_len to not + * overlap with the registers. + */ + info->fix.smem_len = 0x800000; + + info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); if (info->screen_base == NULL) { ret = -ENOMEM; goto atyfb_setup_generic_fail; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/