From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 1/3] radeonfb: Fix 64 bits resources on 32 bits archs Date: Wed, 23 Apr 2008 19:40:33 +1000 Message-ID: <1208943633.9060.26.camel@pasglop> References: <20080422012723.BA9F2DE13F@ozlabs.org> <480E0A54.9010203@linux.vnet.ibm.com> <1208902903.9640.138.camel@pasglop> <1208943127.5632.324.camel@thor.sulgenrain.local> Reply-To: benh@kernel.crashing.org Mime-Version: 1.0 Content-Transfer-Encoding: base64 Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1JobUy-0003bR-Gi for linux-fbdev-devel@lists.sourceforge.net; Wed, 23 Apr 2008 02:42:44 -0700 Received: from gate.crashing.org ([63.228.1.57] ident=[U2FsdGVkX1+tHqhphvhehJ042PZIbr+suaNm+xJ34bE=]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1JobUw-0002iz-7Z for linux-fbdev-devel@lists.sourceforge.net; Wed, 23 Apr 2008 02:42:43 -0700 In-Reply-To: <1208943127.5632.324.camel@thor.sulgenrain.local> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" To: Michel =?ISO-8859-1?Q?D=E4nzer?= Cc: linux-fbdev-devel@lists.sourceforge.net, Hollis Blanchard , adaplas@gmail.com, Christian Ehrhardt , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, Andrew Morton , Detlev Zundel , Wolfgang Denk Ck9uIFdlZCwgMjAwOC0wNC0yMyBhdCAxMTozMiArMDIwMCwgTWljaGVsIETDpG56ZXIgd3JvdGU6 Cj4gPiBYIGlzIGRvaW5nIGEgbW1hcCBvZiAvZGV2L21lbSBpb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ZmIuIEkgaG9wZSB0aGV5J2xsIGNhdGNoIHVwIHdp dGggdGhlIG5ldyBpb2N0bHMuCgpCZW4uCgoKCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KVGhpcyBTRi5uZXQg ZW1haWwgaXMgc3BvbnNvcmVkIGJ5IHRoZSAyMDA4IEphdmFPbmUoU00pIENvbmZlcmVuY2UgCkRv bid0IG1pc3MgdGhpcyB5ZWFyJ3MgZXhjaXRpbmcgZXZlbnQuIFRoZXJlJ3Mgc3RpbGwgdGltZSB0 byBzYXZlICQxMDAuIApVc2UgcHJpb3JpdHkgY29kZSBKOFRMMkQyLiAKaHR0cDovL2FkLmRvdWJs ZWNsaWNrLm5ldC9jbGs7MTk4NzU3NjczOzEzNTAzMDM4O3A/aHR0cDovL2phdmEuc3VuLmNvbS9q YXZhb25lCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkxp bnV4LWZiZGV2LWRldmVsIG1haWxpbmcgbGlzdApMaW51eC1mYmRldi1kZXZlbEBsaXN0cy5zb3Vy Y2Vmb3JnZS5uZXQKaHR0cHM6Ly9saXN0cy5zb3VyY2Vmb3JnZS5uZXQvbGlzdHMvbGlzdGluZm8v bGludXgtZmJkZXYtZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AD0D0DE002 for ; Wed, 23 Apr 2008 19:42:49 +1000 (EST) Subject: Re: [Linux-fbdev-devel] [PATCH 1/3] radeonfb: Fix 64 bits resources on 32 bits archs From: Benjamin Herrenschmidt To: Michel =?ISO-8859-1?Q?D=E4nzer?= In-Reply-To: <1208943127.5632.324.camel@thor.sulgenrain.local> References: <20080422012723.BA9F2DE13F@ozlabs.org> <480E0A54.9010203@linux.vnet.ibm.com> <1208902903.9640.138.camel@pasglop> <1208943127.5632.324.camel@thor.sulgenrain.local> Content-Type: text/plain; charset=utf-8 Date: Wed, 23 Apr 2008 19:40:33 +1000 Message-Id: <1208943633.9060.26.camel@pasglop> Mime-Version: 1.0 Cc: linux-fbdev-devel@lists.sourceforge.net, Hollis Blanchard , adaplas@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, Andrew Morton , Detlev Zundel Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2008-04-23 at 11:32 +0200, Michel Dänzer wrote: > > X is doing a mmap of /dev/mem instead of /dev/fb ? > > > > You can normally map the fb mapping /dev/fb and then map the > registers > > using /dev/fb at an offset beyond the framebuffer (fix->smem_len). > > > > If X is using /dev/mem instead, then it's being stupid and needs to > be > > fixed... > > It's up to the driver, and again, the current radeon driver doesn't > use > radeonfb at all anymore... Right. And I'm happy to go fix what remains, don't get me wrong here :-) We all know how stupid legacy code can be ! I'll try to get some patches to expose a new version of the structure sometimes in the upcoming week or two (we'll see what time permits) and then see about fixing X drivers that need fixing, though hopefully with pci-rework being upstream now, that shouldn't be many. The main issue is directfb. I hope they'll catch up with the new ioctls. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726AbYDWJnT (ORCPT ); Wed, 23 Apr 2008 05:43:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754781AbYDWJm7 (ORCPT ); Wed, 23 Apr 2008 05:42:59 -0400 Received: from gate.crashing.org ([63.228.1.57]:42213 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbYDWJm6 (ORCPT ); Wed, 23 Apr 2008 05:42:58 -0400 Subject: Re: [Linux-fbdev-devel] [PATCH 1/3] radeonfb: Fix 64 bits resources on 32 bits archs From: Benjamin Herrenschmidt Reply-To: benh@kernel.crashing.org To: Michel =?ISO-8859-1?Q?D=E4nzer?= Cc: Christian Ehrhardt , linux-fbdev-devel@lists.sourceforge.net, Hollis Blanchard , adaplas@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, Andrew Morton , Detlev Zundel , Wolfgang Denk In-Reply-To: <1208943127.5632.324.camel@thor.sulgenrain.local> References: <20080422012723.BA9F2DE13F@ozlabs.org> <480E0A54.9010203@linux.vnet.ibm.com> <1208902903.9640.138.camel@pasglop> <1208943127.5632.324.camel@thor.sulgenrain.local> Content-Type: text/plain; charset=utf-8 Date: Wed, 23 Apr 2008 19:40:33 +1000 Message-Id: <1208943633.9060.26.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2008-04-23 at 11:32 +0200, Michel Dänzer wrote: > > X is doing a mmap of /dev/mem instead of /dev/fb ? > > > > You can normally map the fb mapping /dev/fb and then map the > registers > > using /dev/fb at an offset beyond the framebuffer (fix->smem_len). > > > > If X is using /dev/mem instead, then it's being stupid and needs to > be > > fixed... > > It's up to the driver, and again, the current radeon driver doesn't > use > radeonfb at all anymore... Right. And I'm happy to go fix what remains, don't get me wrong here :-) We all know how stupid legacy code can be ! I'll try to get some patches to expose a new version of the structure sometimes in the upcoming week or two (we'll see what time permits) and then see about fixing X drivers that need fixing, though hopefully with pci-rework being upstream now, that shouldn't be many. The main issue is directfb. I hope they'll catch up with the new ioctls. Ben.