From 36b92808e4ff1311f91543388c18cbe8e9eb4aab Mon Sep 17 00:00:00 2001 From: Vladimir Dergachev Date: Sun, 12 Dec 2004 16:05:35 +0000 Subject: Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c programs/Xserver/hw/xfree86/drivers/ati/radeon_common.h programs/Xserver/hw/xfree86/drivers/ati/radeon_version.h Add R300 (and later) DRM support, protected by X_R300_DRM option. Note: at the moment this is for 2d support only, if enabled running glxgears locks up my machine, but DMAForXv=yes works fine. --- src/radeon_dri.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/radeon_dri.c') diff --git a/src/radeon_dri.c b/src/radeon_dri.c index c32ab18c..e99a6fe4 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -1024,7 +1024,11 @@ static int RADEONDRIKernelInit(RADEONInfoPtr info, ScreenPtr pScreen) drmRadeonInit drmInfo; memset(&drmInfo, 0, sizeof(drmRadeonInit)); - + if ( (info->ChipFamily == CHIP_FAMILY_R300) || + (info->ChipFamily == CHIP_FAMILY_R350) || + (info->ChipFamily == CHIP_FAMILY_RV350) ) + drmInfo.func = DRM_RADEON_INIT_R300_CP; + else if ( info->ChipFamily >= CHIP_FAMILY_R200 ) drmInfo.func = DRM_RADEON_INIT_R200_CP; else @@ -1238,7 +1242,12 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) if ( info->ChipFamily >= CHIP_FAMILY_R200 ) pDRIInfo->clientDriverName = R200_DRIVER_NAME; - else + else + if ( (info->ChipFamily == CHIP_FAMILY_R300) || + (info->ChipFamily == CHIP_FAMILY_R350) || + (info->ChipFamily == CHIP_FAMILY_RV350) ) { + pDRIInfo->clientDriverName = R300_DRIVER_NAME; + } else pDRIInfo->clientDriverName = RADEON_DRIVER_NAME; if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { @@ -1371,6 +1380,9 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) } else if (info->ChipFamily >= CHIP_FAMILY_R200) { req_minor = 5; req_patch = 0; + } else if (info->ChipFamily >= CHIP_FAMILY_R300) { + req_minor = 12; + req_patch = 0; } else { #if X_BYTE_ORDER == X_LITTLE_ENDIAN req_minor = 1; -- cgit v1.2.3