[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-f55de6ec375da89f89f1a76e1b998e5f14878c06@git.kernel.org>
Date: Tue, 21 Jul 2015 02:43:12 -0700
From: "tip-bot for Luis R. Rodriguez" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: plagnioj@...osoft.com, toshi.kani@...com, luto@...capital.net,
bp@...e.de, torvalds@...ux-foundation.org, mingo@...nel.org,
tglx@...utronix.de, tomi.valkeinen@...com, peterz@...radead.org,
minipli@...glemail.com, robdclark@...il.com,
akpm@...ux-foundation.org, a.hajda@...sung.com, adaplas@...il.com,
vbabka@...e.cz, airlied@...hat.com, mcgrof@...e.com,
syrjala@....fi, daniel.vetter@...ll.ch,
linux-kernel@...r.kernel.org, dbueso@...e.de, jgross@...e.com,
mgorman@...e.de, hpa@...or.com, sbsiddha@...il.com
Subject: [tip:x86/mm] drivers/video/fbdev/atyfb: Clarify ioremap()
base and length used
Commit-ID: f55de6ec375da89f89f1a76e1b998e5f14878c06
Gitweb: http://git.kernel.org/tip/f55de6ec375da89f89f1a76e1b998e5f14878c06
Author: Luis R. Rodriguez <mcgrof@...e.com>
AuthorDate: Thu, 9 Jul 2015 18:24:57 -0700
Committer: Ingo Molnar <mingo@...nel.org>
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 <mcgrof@...e.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andrzej Hajda <a.hajda@...sung.com>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Antonino Daplas <adaplas@...il.com>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: Dave Airlie <airlied@...hat.com>
Cc: Davidlohr Bueso <dbueso@...e.de>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mathias Krause <minipli@...glemail.com>
Cc: Mel Gorman <mgorman@...e.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rob Clark <robdclark@...il.com>
Cc: Suresh Siddha <sbsiddha@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@...com>
Cc: Toshi Kani <toshi.kani@...com>
Cc: Ville Syrjälä <syrjala@....fi>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: arnd@...db.de
Cc: benh@...nel.crashing.org
Cc: dan.j.williams@...el.com
Cc: geert@...ux-m68k.org
Cc: hch@....de
Cc: hmh@....eng.br
Cc: linux-fbdev@...r.kernel.org
Cc: linux-mm@...ck.org
Cc: linux-pci@...r.kernel.org
Cc: mpe@...erman.id.au
Cc: mst@...hat.com
Cc: ralf@...ux-mips.org
Cc: ross.zwisler@...ux.intel.com
Cc: stefan.bader@...onical.com
Cc: tj@...nel.org
Cc: ville.syrjala@...ux.intel.com
Link: http://lkml.kernel.org/r/1436491499-3289-3-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists