mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-24 20:40:12 +01:00
FreeBSD build fixes
This commit is contained in:
parent
dff2dd8494
commit
cc95ebfa5e
17 changed files with 42 additions and 11 deletions
|
|
@ -729,7 +729,7 @@ extern int DRM(sysctl_init)(drm_device_t *dev);
|
|||
extern int DRM(sysctl_cleanup)(drm_device_t *dev);
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && (LINUX_VERSION_CODE >= 0x020400)
|
||||
#if __REALLY_HAVE_SG
|
||||
/* ATI PCIGART support (ati_pcigart.h) */
|
||||
extern int DRM(ati_pcigart_init)(drm_device_t *dev,
|
||||
unsigned long *addr,
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ static drm_device_t *DRM(device);
|
|||
static int *DRM(minor);
|
||||
static int DRM(numdevs) = 0;
|
||||
|
||||
#ifdef __linux__
|
||||
DRIVER_FOPS;
|
||||
#endif
|
||||
|
||||
static drm_ioctl_desc_t DRM(ioctls)[] = {
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_VERSION)] = { DRM(version), 0, 0 },
|
||||
|
|
@ -759,7 +761,7 @@ static int DRM(init)( device_t nbdev )
|
|||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
/* FIXME??? - multihead !!! */
|
||||
*dev = device_get_softc(nbdev);
|
||||
dev = device_get_softc(nbdev);
|
||||
#endif
|
||||
memset( (void *)dev, 0, sizeof(*dev) );
|
||||
#ifdef __linux__
|
||||
|
|
@ -895,8 +897,8 @@ static void DRM(cleanup)(device_t nbdev)
|
|||
#endif
|
||||
}
|
||||
DRIVER_POSTCLEANUP();
|
||||
kfree(DRM(minor));
|
||||
kfree(DRM(device));
|
||||
DRM_OS_FREE(DRM(minor));
|
||||
DRM_OS_FREE(DRM(device));
|
||||
DRM(numdevs) = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -111,7 +112,7 @@ static int __init mga_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", mga_options );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -161,6 +162,7 @@ static int __init r128_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", r128_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -124,6 +125,7 @@ static int __init radeon_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", radeon_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ static drm_pci_list_t DRM(idlist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -123,6 +124,7 @@ static int __init tdfx_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", tdfx_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ extern int DRM(sysctl_init)(drm_device_t *dev);
|
|||
extern int DRM(sysctl_cleanup)(drm_device_t *dev);
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && (LINUX_VERSION_CODE >= 0x020400)
|
||||
#if __REALLY_HAVE_SG
|
||||
/* ATI PCIGART support (ati_pcigart.h) */
|
||||
extern int DRM(ati_pcigart_init)(drm_device_t *dev,
|
||||
unsigned long *addr,
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ static drm_device_t *DRM(device);
|
|||
static int *DRM(minor);
|
||||
static int DRM(numdevs) = 0;
|
||||
|
||||
#ifdef __linux__
|
||||
DRIVER_FOPS;
|
||||
#endif
|
||||
|
||||
static drm_ioctl_desc_t DRM(ioctls)[] = {
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_VERSION)] = { DRM(version), 0, 0 },
|
||||
|
|
@ -759,7 +761,7 @@ static int DRM(init)( device_t nbdev )
|
|||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
/* FIXME??? - multihead !!! */
|
||||
*dev = device_get_softc(nbdev);
|
||||
dev = device_get_softc(nbdev);
|
||||
#endif
|
||||
memset( (void *)dev, 0, sizeof(*dev) );
|
||||
#ifdef __linux__
|
||||
|
|
@ -895,8 +897,8 @@ static void DRM(cleanup)(device_t nbdev)
|
|||
#endif
|
||||
}
|
||||
DRIVER_POSTCLEANUP();
|
||||
kfree(DRM(minor));
|
||||
kfree(DRM(device));
|
||||
DRM_OS_FREE(DRM(minor));
|
||||
DRM_OS_FREE(DRM(device));
|
||||
DRM(numdevs) = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -99,7 +100,7 @@ static int __init gamma_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", gamma_options );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -111,7 +112,7 @@ static int __init mga_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", mga_options );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -659,16 +659,20 @@ int r128_do_cleanup_cce( drm_device_t *dev )
|
|||
if ( dev->dev_private ) {
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
#if __REALLY_HAVE_SG
|
||||
if ( !dev_priv->is_pci ) {
|
||||
#endif
|
||||
DRM_IOREMAPFREE( dev_priv->cce_ring );
|
||||
DRM_IOREMAPFREE( dev_priv->ring_rptr );
|
||||
DRM_IOREMAPFREE( dev_priv->buffers );
|
||||
#if __REALLY_HAVE_SG
|
||||
} else {
|
||||
if (!DRM(ati_pcigart_cleanup)( dev,
|
||||
dev_priv->phys_pci_gart,
|
||||
dev_priv->bus_pci_gart ))
|
||||
DRM_ERROR( "failed to cleanup PCI GART!\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
DRM(free)( dev->dev_private, sizeof(drm_r128_private_t),
|
||||
DRM_MEM_DRIVER );
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -161,6 +162,7 @@ static int __init r128_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", r128_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -83,7 +83,9 @@ typedef struct drm_r128_private {
|
|||
int usec_timeout;
|
||||
int is_pci;
|
||||
unsigned long phys_pci_gart;
|
||||
#if __REALLY_HAVE_SG
|
||||
dma_addr_t bus_pci_gart;
|
||||
#endif
|
||||
unsigned long cce_buffers_offset;
|
||||
|
||||
atomic_t idle_count;
|
||||
|
|
|
|||
|
|
@ -1023,16 +1023,20 @@ int radeon_do_cleanup_cp( drm_device_t *dev )
|
|||
if ( dev->dev_private ) {
|
||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
#if __REALLY_HAVE_SG
|
||||
if ( !dev_priv->is_pci ) {
|
||||
#endif
|
||||
DRM_IOREMAPFREE( dev_priv->cp_ring );
|
||||
DRM_IOREMAPFREE( dev_priv->ring_rptr );
|
||||
DRM_IOREMAPFREE( dev_priv->buffers );
|
||||
#if __REALLY_HAVE_SG
|
||||
} else {
|
||||
if (!DRM(ati_pcigart_cleanup)( dev,
|
||||
dev_priv->phys_pci_gart,
|
||||
dev_priv->bus_pci_gart ))
|
||||
DRM_ERROR( "failed to cleanup PCI GART!\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
DRM(free)( dev->dev_private, sizeof(drm_radeon_private_t),
|
||||
DRM_MEM_DRIVER );
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -124,6 +125,7 @@ static int __init radeon_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", radeon_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@ typedef struct drm_radeon_private {
|
|||
int usec_timeout;
|
||||
int is_pci;
|
||||
unsigned long phys_pci_gart;
|
||||
#if __REALLY_HAVE_SG
|
||||
dma_addr_t bus_pci_gart;
|
||||
#endif
|
||||
|
||||
atomic_t idle_count;
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ static drm_pci_list_t DRM(idlist)[] = {
|
|||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
|
|
@ -123,6 +124,7 @@ static int __init tdfx_options( char *str )
|
|||
|
||||
__setup( DRIVER_NAME "=", tdfx_options );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue