All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for Luis R. Rodriguez" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:x86/mm] drivers/video/fbdev/atyfb: Clarify ioremap() base and length used
Date: Tue, 21 Jul 2015 02:43:12 -0700	[thread overview]
Message-ID: <tip-f55de6ec375da89f89f1a76e1b998e5f14878c06@git.kernel.org> (raw)
In-Reply-To: <1436491499-3289-3-git-send-email-mcgrof@do-not-panic.com>

Commit-ID:  f55de6ec375da89f89f1a76e1b998e5f14878c06
Gitweb:     http://git.kernel.org/tip/f55de6ec375da89f89f1a76e1b998e5f14878c06
Author:     Luis R. Rodriguez <mcgrof@suse.com>
AuthorDate: Thu, 9 Jul 2015 18:24:57 -0700
Committer:  Ingo Molnar <mingo@kernel.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@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Ville Syrjälä <syrjala@sci.fi>
Cc: Vlastimil Babka <vbabka@suse.cz>
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 <mingo@kernel.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;

  reply	other threads:[~2015-07-21  9:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10  1:24 [PATCH v6 0/4] atyfb: atyfb: address MTRR corner case Luis R. Rodriguez
2015-07-10  1:24 ` Luis R. Rodriguez
2015-07-10  1:24 ` Luis R. Rodriguez
2015-07-10  1:24 ` [PATCH v6 1/4] drivers/video/fbdev/atyfb: Carve out framebuffer length fudging into a helper Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-21  9:42   ` [tip:x86/mm] " tip-bot for Luis R. Rodriguez
2015-07-10  1:24 ` [PATCH v6 2/4] drivers/video/fbdev/atyfb: Clarify ioremap() base and length used Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-21  9:43   ` tip-bot for Luis R. Rodriguez [this message]
2015-07-10  1:24 ` [PATCH v6 3/4] drivers/video/fbdev/atyfb: Replace MTRR UC hole with strong UC Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-21  9:43   ` [tip:x86/mm] " tip-bot for Luis R. Rodriguez
2015-07-10  1:24 ` [PATCH v6 4/4] drivers/video/fbdev/atyfb: Use arch_phys_wc_add() and ioremap_wc() Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-10  1:24   ` Luis R. Rodriguez
2015-07-21  9:43   ` [tip:x86/mm] " tip-bot for Luis R. Rodriguez
2015-07-17 20:37 ` [PATCH v6 0/4] atyfb: atyfb: address MTRR corner case Luis R. Rodriguez
2015-07-17 20:37   ` Luis R. Rodriguez
2015-07-17 20:37   ` Luis R. Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2015-06-25  1:34 [PATCH v5 0/3] " Luis R. Rodriguez
2015-06-25  1:34 ` Luis R. Rodriguez
2015-06-25  1:34 ` [PATCH v5 1/3] video: fbdev: atyfb: clarify ioremap() base and length used Luis R. Rodriguez
2015-06-25  1:34   ` Luis R. Rodriguez
2015-06-25 23:04   ` Ville Syrjälä
2015-06-25 23:04     ` Ville Syrjälä
2015-06-25 23:06     ` Luis R. Rodriguez
2015-06-25 23:06       ` Luis R. Rodriguez
2015-06-25 23:11       ` Ville Syrjälä
2015-06-25 23:11         ` Ville Syrjälä
2015-06-26  1:09         ` Luis R. Rodriguez
2015-06-26  1:09           ` Luis R. Rodriguez
2015-06-26  7:30           ` Borislav Petkov
2015-06-26  7:30             ` Borislav Petkov
2015-07-02 23:23             ` Luis R. Rodriguez
2015-07-02 23:23               ` Luis R. Rodriguez
2015-07-08  0:24               ` Luis R. Rodriguez
2015-07-08  0:24                 ` Luis R. Rodriguez
2015-07-08  8:38                 ` Ville Syrjälä
2015-07-08  8:38                   ` Ville Syrjälä
2015-07-09 17:25                   ` Luis R. Rodriguez
2015-07-09 17:25                     ` Luis R. Rodriguez
2015-06-25  1:34 ` [PATCH v5 2/3] video: fbdev: atyfb: replace MTRR UC hole with strong UC Luis R. Rodriguez
2015-06-25  1:34   ` Luis R. Rodriguez
2015-06-25  1:34 ` [PATCH v5 3/3] video: fbdev: atyfb: use arch_phys_wc_add() and ioremap_wc() Luis R. Rodriguez
2015-06-25  1:34   ` Luis R. Rodriguez
2015-06-25 16:43 ` [PATCH v5 0/3] atyfb: address MTRR corner case Luis R. Rodriguez
2015-06-25 16:43   ` Luis R. Rodriguez
2015-06-25 20:48 ` Borislav Petkov
2015-06-25 20:48   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-f55de6ec375da89f89f1a76e1b998e5f14878c06@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.hajda@samsung.com \
    --cc=adaplas@gmail.com \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dbueso@suse.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mcgrof@suse.com \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=minipli@googlemail.com \
    --cc=peterz@infradead.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=robdclark@gmail.com \
    --cc=sbsiddha@gmail.com \
    --cc=syrjala@sci.fi \
    --cc=tglx@linutronix.de \
    --cc=tomi.valkeinen@ti.com \
    --cc=torvalds@linux-foundation.org \
    --cc=toshi.kani@hp.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.