From owner-freebsd-x11@FreeBSD.ORG Tue Jun 26 18:50:09 2012 Return-Path: Delivered-To: freebsd-x11@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D89BD106566B for ; Tue, 26 Jun 2012 18:50:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C372D8FC1B for ; Tue, 26 Jun 2012 18:50:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5QIo9pc068131 for ; Tue, 26 Jun 2012 18:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5QIo9Dg068130; Tue, 26 Jun 2012 18:50:09 GMT (envelope-from gnats) Date: Tue, 26 Jun 2012 18:50:09 GMT Message-Id: <201206261850.q5QIo9Dg068130@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org From: Matthieu Volat Cc: Subject: Re: powerpc/165585: x11-servers/xorg-server: Both Xorg and Xorg-server port installs break when dri is being built X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthieu Volat List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 18:50:09 -0000 The following reply was made to PR powerpc/165585; it has been noted by GNATS. From: Matthieu Volat To: bug-followup@FreeBSD.org, superbisquit@gmail.com Cc: Subject: Re: powerpc/165585: x11-servers/xorg-server: Both Xorg and Xorg-server port installs break when dri is being built Date: Tue, 26 Jun 2012 20:42:25 +0200 This is a multi-part message in MIME format. --Multipart=_Tue__26_Jun_2012_20_42_25_+0200_.5B5oeITgaHsbssf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I've been able to build (and run) both old and new X.org, dri enabled, on a powerpc host (powerbook 12"), but with a workaround in graphics/libdrm and patches in graphics/dri. The workaround in *new* graphics/libdrm is to manualy build and install the intel drm infrastructure (everything is correctly configured... the target are just not called by the top Makefile) : # cd /usr/ports/libdrm # make # make -C work/libdrm-2.4.31/intel # make install # make -C work/libdrm-2.4.31/intel install It even worked with KMS support enabled, but I had not the time to test a patched kernel for now. I've attached the patches for graphics/dri, the two patch-old-* are for the old X.org, the other is for the new one. That's as far as I went, next step would be to create a proper patch for those ports. -- Matthieu Volat --Multipart=_Tue__26_Jun_2012_20_42_25_+0200_.5B5oeITgaHsbssf Content-Type: text/x-chdr; name="patch-old-src_mesa_drivers_dri_mach64_mach64_context.h" Content-Disposition: attachment; filename="patch-old-src_mesa_drivers_dri_mach64_mach64_context.h" Content-Transfer-Encoding: 7bit --- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2012-06-21 21:04:44.000000000 +0200 +++ src/mesa/drivers/dri/mach64/mach64_context.h 2012-06-21 21:10:56.000000000 +0200 @@ -294,7 +294,7 @@ #define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0) #define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0) #else -#ifndef __OpenBSD__ +#if !defined __OpenBSD__ && !defined __FreeBSD__ #include #else #include --Multipart=_Tue__26_Jun_2012_20_42_25_+0200_.5B5oeITgaHsbssf Content-Type: text/x-chdr; name="patch-old-src_mesa_drivers_dri_sis_sis_context.h" Content-Disposition: attachment; filename="patch-old-src_mesa_drivers_dri_sis_sis_context.h" Content-Transfer-Encoding: 7bit --- src/mesa/drivers/dri/sis/sis_context.h.orig 2012-06-21 21:25:46.000000000 +0200 +++ src/mesa/drivers/dri/sis/sis_context.h 2012-06-21 21:25:07.000000000 +0200 @@ -404,6 +404,8 @@ #define MMIO_WMB() __asm __volatile("" : : : "memory") #elif defined(__ia64__) #define MMIO_WMB() __asm __volatile("mf" : : : "memory") +#elif defined(__powerpc__) +#define MMIO_WMB() __asm __volatile("eieio; sync;") #else #error platform needs WMB #endif --Multipart=_Tue__26_Jun_2012_20_42_25_+0200_.5B5oeITgaHsbssf Content-Type: text/x-csrc; name="patch-new-src_mesa_drivers_dri_r600_radeon_span.c" Content-Disposition: attachment; filename="patch-new-src_mesa_drivers_dri_r600_radeon_span.c" Content-Transfer-Encoding: 7bit --- work/Mesa-7.11.2/src/mesa/drivers/dri/r600/radeon_span.c.orig 2012-06-22 22:18:00.000000000 +0200 +++ work/Mesa-7.11.2/src/mesa/drivers/dri/r600/radeon_span.c 2012-06-22 22:23:02.000000000 +0200 @@ -51,7 +51,11 @@ #define DBG 0 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN -#if defined(__linux__) +#if defined(__FreeBSD__) +#include +#define CPU_TO_LE16( x ) bswap16( x ) +#define LE16_TO_CPU( x ) bswap16( x ) +#elif defined(__linux__) #include #define CPU_TO_LE16( x ) bswap_16( x ) #define LE16_TO_CPU( x ) bswap_16( x ) --Multipart=_Tue__26_Jun_2012_20_42_25_+0200_.5B5oeITgaHsbssf--