From owner-freebsd-x11@FreeBSD.ORG Mon Feb 23 04:32:49 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F371065679 for ; Mon, 23 Feb 2009 04:32:49 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 58B2E8FC19 for ; Mon, 23 Feb 2009 04:32:49 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.2] (adsl-157-36-144.bna.bellsouth.net [70.157.36.144]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n1N4VQ1c091686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Feb 2009 23:31:27 -0500 (EST) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: vehemens In-Reply-To: <200902221718.08192.vehemens@verizon.net> References: <200902221718.08192.vehemens@verizon.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-zngJgu1AjdQ6FL/lMwsZ" Organization: FreeBSD Date: Sun, 22 Feb 2009 22:32:41 -0600 Message-Id: <1235363561.1309.8.camel@widget.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 FreeBSD GNOME Team Port X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00, MIME_QP_LONG_LINE,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-x11@freebsd.org Subject: Re: r6xx-r7xx drm patch and stuff X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 04:32:50 -0000 --=-zngJgu1AjdQ6FL/lMwsZ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2009-02-22 at 17:18 -0800, vehemens wrote: > Have drm running with my R630, but there is some type of performance prob= lem=20 > (i.e. slow windows). >=20 > Given that I don't have the time to work the issue right now, here is my=20 > summary for those that want to give it a try. >=20 > If you start with drm git master 1) incorporate the local freebsd updates= , 2)=20 > incorporate the radeon updates from drm git r6xx-r7xx-support, and 3) add= the=20 > attached patch, you will have what I have. >=20 > For the video drivers, I have only tried the xf86-video-ati r6xx-r7xx-sup= port=20 > branch and not the xf86-video-radeonhd r6xx-r7xx-support branch. >=20 > There was a comment on radeonhd irc about backing out drm git=20 > r6xx-r7xx-support commit for "R6xx/R7xx: pad VB age submission to 8 dword= s",=20 > for the performance problem but that didn't help me with xf86-video-ati. I'll have to look at this more closely, but this is similar to the local changes that I have in my tree. I think that you aren't actually mapping the gart with this patch. Until I get my hands on hardware it is a little hard for me to finish it fixing it up. What really needs to happen here is that the new gart mapping code needs to get merged into the linux ati_pcigart as we already have equivalent code in our ati_pcigart. That should really be the only outstanding issue with the current code base. I've been hoping the the amd/linux folks would go ahead and fix that up, which should make our code just work. robert. > --- r600_cp.c.orig 2009-02-19 23:07:23.000000000 -0800 > +++ r600_cp.c 2009-02-21 23:57:49.000000000 -0800 > @@ -429,13 +429,15 @@ > =20 > static void r600_page_table_cleanup(struct drm_device *dev, struct=20 > drm_ati_pcigart_info *gart_info) > { > +#ifdef __linux__ > struct drm_sg_mem *entry =3D dev->sg; > int max_pages; > int pages; > int i; > +#endif > =20 > if (gart_info->bus_addr) { > - > +#ifdef __linux__ > max_pages =3D (gart_info->table_size / sizeof(u32)); > pages =3D (entry->pages <=3D max_pages) > ? entry->pages : max_pages; > @@ -446,7 +448,7 @@ > pci_unmap_single(dev->pdev, entry->busaddr[i], > PAGE_SIZE, PCI_DMA_TODEVICE); > } > - > +#endif > if (gart_info->gart_table_location =3D=3D DRM_ATI_GART_MAIN) > gart_info->bus_addr =3D 0; > } > @@ -475,6 +477,7 @@ > memset(pci_gart, 0, max_pages * sizeof(u64)); > =20 > for (i =3D 0; i < pages; i++) { > +#ifdef __linux__ > entry->busaddr[i] =3D pci_map_single(dev->pdev, > page_address(entry-> > pagelist[i]), > @@ -485,7 +488,7 @@ > ret =3D -EINVAL; > goto done; > } > - > +#endif > entry_addr =3D entry->busaddr[i]; > for (j =3D 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { > page_base =3D (u64) entry_addr & ATI_PCIGART_PAGE_MASK; > @@ -495,13 +498,15 @@ > *pci_gart =3D page_base; > =20 > if ((i % 128) =3D=3D 0) > - DRM_DEBUG("page entry %d: 0x%016llx\n", i, page_base); > + DRM_DEBUG("page entry %d: 0x%016lx\n", i, page_base); > pci_gart++; > entry_addr +=3D ATI_PCIGART_PAGE_SIZE; > } > } > =20 > +#ifdef __linux__ > done: > +#endif > return ret; > } > =20 >=20 >=20 > _______________________________________________ > freebsd-x11@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-x11 > To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org" --=20 Robert Noland FreeBSD --=-zngJgu1AjdQ6FL/lMwsZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEABECAAYFAkmiJukACgkQM4TrQ4qfRONpKgCfai9dNwr2KuFJr5JnySL6wn+4 HfIAnR08lT70CCZGt+7cUAdKzKXjPvWa =LO+v -----END PGP SIGNATURE----- --=-zngJgu1AjdQ6FL/lMwsZ--