From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Date: Wed, 08 Jul 2015 08:38:49 +0000 Subject: Re: [PATCH v5 1/3] video: fbdev: atyfb: clarify ioremap() base and length used Message-Id: <20150708083849.GB13710@sci.fi> List-Id: References: <1435196060-27350-1-git-send-email-mcgrof@do-not-panic.com> <1435196060-27350-2-git-send-email-mcgrof@do-not-panic.com> <20150625230437.GA4362@sci.fi> <20150625231103.GB4362@sci.fi> <20150626010927.GI3005@wotan.suse.de> <20150626073028.GA14776@pd.tnic> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "Luis R. Rodriguez" Cc: Borislav Petkov , Andrew Morton , Ingo Molnar , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Andy Lutomirski , Tomi Valkeinen , "Michael S. Tsirkin" , Benjamin Herrenschmidt , "linux-kernel@vger.kernel.org" , linux-fbdev , "linux-pci@vger.kernel.org" , Dave Airlie , Toshi Kani , Suresh Siddha , Linus Torvalds , Thomas Gleixner , Juergen Gross , Daniel Vetter , Antonino Daplas , Jean-Christophe Plagniol-Villard , Rob Clark , Mathias Krause , Andrzej Hajda , Mel Gorman , Vlastimil Babka , Davidlohr Bueso On Tue, Jul 07, 2015 at 05:24:57PM -0700, Luis R. Rodriguez wrote: > On Thu, Jul 2, 2015 at 4:23 PM, Luis R. Rodriguez wrote: > > On Fri, Jun 26, 2015 at 12:30 AM, Borislav Petkov wrote: > >> On Fri, Jun 26, 2015 at 03:09:27AM +0200, Luis R. Rodriguez wrote: > >>> Sure, mind this as a follow up patch if its too late? > >> > >> No need, you can send me an updated one - I'll replace it. > > > > Will do! >=20 > OK the commend I'm adding: >=20 > @@ -3489,6 +3489,15 @@ static int atyfb_setup_generic(struct pci_dev > *pdev, struct fb_info *info, >=20 > /* Map in frame buffer */ > info->fix.smem_start =3D addr; > + > + /* > + * The framebuffer is not always 8 MiB that's just the size of the > + * PCI BAR, this is later corrected for use with write-combining > + * helpers with aty_fudge_framebuffer_len() which will adjust the > + * framebuffer accordingly depending on the device. That somehow gives me the impression that aty_fudge_framebuffer_len() changes smem_len to match the framebuffer size, which it does not. Dunno, maybe something like this? /* * 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. */ > We do this > + * to match semantics over ioremap calls on framebuffer devices > + * with with other drivers with the info->fix.smem_len. > + */ > info->fix.smem_len =3D 0x800000; >=20 > info->screen_base =3D ioremap(info->fix.smem_start, info->fix.sme= m_len); >=20 > Will respin. >=20 > Luis --=20 Ville Syrj=E4l=E4 syrjala@sci.fi http://www.sci.fi/~syrjala/