From owner-freebsd-x11@FreeBSD.ORG Mon Feb 23 01:14:27 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 ADF011065673 for ; Mon, 23 Feb 2009 01:14:27 +0000 (UTC) (envelope-from vehemens@verizon.net) Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by mx1.freebsd.org (Postfix) with ESMTP id 9193D8FC18 for ; Mon, 23 Feb 2009 01:14:27 +0000 (UTC) (envelope-from vehemens@verizon.net) Received: from sam ([71.107.24.149]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KFH00FEXVFSCC89@vms173007.mailsrvcs.net> for freebsd-x11@freebsd.org; Sun, 22 Feb 2009 19:14:16 -0600 (CST) From: vehemens To: freebsd-x11@freebsd.org Date: Sun, 22 Feb 2009 17:18:08 -0800 User-Agent: KMail/1.9.10 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline Message-id: <200902221718.08192.vehemens@verizon.net> Subject: 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 01:14:28 -0000 Have drm running with my R630, but there is some type of performance problem (i.e. slow windows). Given that I don't have the time to work the issue right now, here is my summary for those that want to give it a try. If you start with drm git master 1) incorporate the local freebsd updates, 2) incorporate the radeon updates from drm git r6xx-r7xx-support, and 3) add the attached patch, you will have what I have. For the video drivers, I have only tried the xf86-video-ati r6xx-r7xx-support branch and not the xf86-video-radeonhd r6xx-r7xx-support branch. There was a comment on radeonhd irc about backing out drm git r6xx-r7xx-support commit for "R6xx/R7xx: pad VB age submission to 8 dwords", for the performance problem but that didn't help me with xf86-video-ati. --- 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 @@ static void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info) { +#ifdef __linux__ struct drm_sg_mem *entry = dev->sg; int max_pages; int pages; int i; +#endif if (gart_info->bus_addr) { - +#ifdef __linux__ max_pages = (gart_info->table_size / sizeof(u32)); pages = (entry->pages <= 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 == DRM_ATI_GART_MAIN) gart_info->bus_addr = 0; } @@ -475,6 +477,7 @@ memset(pci_gart, 0, max_pages * sizeof(u64)); for (i = 0; i < pages; i++) { +#ifdef __linux__ entry->busaddr[i] = pci_map_single(dev->pdev, page_address(entry-> pagelist[i]), @@ -485,7 +488,7 @@ ret = -EINVAL; goto done; } - +#endif entry_addr = entry->busaddr[i]; for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { page_base = (u64) entry_addr & ATI_PCIGART_PAGE_MASK; @@ -495,13 +498,15 @@ *pci_gart = page_base; if ((i % 128) == 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 += ATI_PCIGART_PAGE_SIZE; } } +#ifdef __linux__ done: +#endif return ret; }