Fixed build on R5 (it doesn't know B_KERNEL_READ_AREA or B_USER_CLONEABLE_AREA).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19512 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2002, Thomas Kurschel
|
Copyright (c) 2002, Thomas Kurschel
|
||||||
|
|
||||||
|
|
||||||
Part of Radeon kernel driver
|
Part of Radeon kernel driver
|
||||||
|
|
||||||
PCI GART.
|
PCI GART.
|
||||||
@@ -15,18 +14,21 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "radeon_driver.h"
|
#include "radeon_driver.h"
|
||||||
#include <malloc.h>
|
|
||||||
#include <image.h>
|
|
||||||
#include "mmio.h"
|
#include "mmio.h"
|
||||||
#include "buscntrl_regs.h"
|
#include "buscntrl_regs.h"
|
||||||
#include "memcntrl_regs.h"
|
#include "memcntrl_regs.h"
|
||||||
#include "cp_regs.h"
|
#include "cp_regs.h"
|
||||||
|
|
||||||
|
#include <image.h>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
// create actual GART buffer
|
//! create actual GART buffer
|
||||||
static status_t createGARTBuffer( GART_info *gart, size_t size )
|
static status_t
|
||||||
|
createGARTBuffer(GART_info *gart, size_t size)
|
||||||
{
|
{
|
||||||
SHOW_FLOW0( 3, "" );
|
SHOW_FLOW0( 3, "" );
|
||||||
|
|
||||||
@@ -48,7 +50,14 @@ static status_t createGARTBuffer( GART_info *gart, size_t size )
|
|||||||
// the DMA buffer, we have to grant access for all apps
|
// the DMA buffer, we have to grant access for all apps
|
||||||
gart->buffer.area = create_area("Radeon PCI GART buffer",
|
gart->buffer.area = create_area("Radeon PCI GART buffer",
|
||||||
&gart->buffer.ptr, B_ANY_KERNEL_ADDRESS,
|
&gart->buffer.ptr, B_ANY_KERNEL_ADDRESS,
|
||||||
size, B_FULL_LOCK, B_READ_AREA | B_WRITE_AREA | B_USER_CLONEABLE_AREA );
|
size, B_FULL_LOCK,
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
// TODO: really user read/write?
|
||||||
|
B_READ_AREA | B_WRITE_AREA | B_USER_CLONEABLE_AREA
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (gart->buffer.area < 0) {
|
if (gart->buffer.area < 0) {
|
||||||
SHOW_ERROR(1, "cannot create PCI GART buffer (%s)",
|
SHOW_ERROR(1, "cannot create PCI GART buffer (%s)",
|
||||||
strerror(gart->buffer.area));
|
strerror(gart->buffer.area));
|
||||||
@@ -141,7 +150,14 @@ static status_t initGATT( GART_info *gart )
|
|||||||
gart->GATT.area = create_area("Radeon GATT", (void **)&gart->GATT.ptr,
|
gart->GATT.area = create_area("Radeon GATT", (void **)&gart->GATT.ptr,
|
||||||
B_ANY_KERNEL_ADDRESS,
|
B_ANY_KERNEL_ADDRESS,
|
||||||
(num_pages * sizeof( uint32 ) + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1),
|
(num_pages * sizeof( uint32 ) + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1),
|
||||||
B_CONTIGUOUS, B_READ_AREA | B_WRITE_AREA | B_USER_CLONEABLE_AREA );
|
B_CONTIGUOUS,
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
// TODO: really user read/write?
|
||||||
|
B_READ_AREA | B_WRITE_AREA | B_USER_CLONEABLE_AREA
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
if (gart->GATT.area < 0) {
|
if (gart->GATT.area < 0) {
|
||||||
SHOW_ERROR(1, "cannot create GATT table (%s)",
|
SHOW_ERROR(1, "cannot create GATT table (%s)",
|
||||||
|
|||||||
@@ -69,7 +69,12 @@ status_t Radeon_MapDevice( device_info *di, bool mmio_only )
|
|||||||
di->pcii.u.h0.base_register_sizes[regs],
|
di->pcii.u.h0.base_register_sizes[regs],
|
||||||
B_ANY_KERNEL_ADDRESS,
|
B_ANY_KERNEL_ADDRESS,
|
||||||
/*// for "poke" debugging
|
/*// for "poke" debugging
|
||||||
B_READ_AREA + B_WRITE_AREA*/ B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA,
|
B_READ_AREA + B_WRITE_AREA*/
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
#endif
|
||||||
(void **)&(di->regs));
|
(void **)&(di->regs));
|
||||||
if( si->regs_area < 0 )
|
if( si->regs_area < 0 )
|
||||||
return si->regs_area;
|
return si->regs_area;
|
||||||
@@ -206,7 +211,13 @@ status_t Radeon_FirstOpen( device_info *di )
|
|||||||
(void **)&(di->si),
|
(void **)&(di->si),
|
||||||
B_ANY_KERNEL_ADDRESS,
|
B_ANY_KERNEL_ADDRESS,
|
||||||
(sizeof(shared_info) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1),
|
(sizeof(shared_info) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1),
|
||||||
B_FULL_LOCK, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA);
|
B_FULL_LOCK,
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (di->shared_area < 0) {
|
if (di->shared_area < 0) {
|
||||||
result = di->shared_area;
|
result = di->shared_area;
|
||||||
goto err8;
|
goto err8;
|
||||||
@@ -260,7 +271,13 @@ status_t Radeon_FirstOpen( device_info *di )
|
|||||||
(void **)&(di->vc),
|
(void **)&(di->vc),
|
||||||
B_ANY_KERNEL_ADDRESS,
|
B_ANY_KERNEL_ADDRESS,
|
||||||
(sizeof(virtual_card) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1),
|
(sizeof(virtual_card) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1),
|
||||||
B_FULL_LOCK, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA);
|
B_FULL_LOCK,
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (di->virtual_card_area < 0) {
|
if (di->virtual_card_area < 0) {
|
||||||
result = di->virtual_card_area;
|
result = di->virtual_card_area;
|
||||||
goto err7;
|
goto err7;
|
||||||
|
|||||||
Reference in New Issue
Block a user