⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 driver_wrapper.c

📁 ati driver
💻 C
字号:
/*	Copyright (c) 2003, Thomas Kurschel		Part of Radeon accelerant			Kernel driver wrapper*/#include "radeon_accelerant.h"#include <sys/ioctl.h>status_t Radeon_WaitForIdle( accelerator_info *ai, bool keep_lock ){	radeon_wait_for_idle wfi;		wfi.magic = RADEON_PRIVATE_DATA_MAGIC;	wfi.keep_lock = keep_lock;		return ioctl( ai->fd, RADEON_WAITFORIDLE, &wfi, sizeof( wfi ));}void Radeon_ResetEngine( accelerator_info *ai ){	radeon_no_arg na;		na.magic = RADEON_PRIVATE_DATA_MAGIC;		ioctl( ai->fd, RADEON_RESETENGINE, &na, sizeof( na ));}status_t Radeon_VIPRead( accelerator_info *ai, uint channel, uint address, uint32 *data ){	radeon_vip_read vr;	status_t res;		vr.magic = RADEON_PRIVATE_DATA_MAGIC;	vr.channel = channel;	vr.address = address;	vr.lock = false;		res = ioctl( ai->fd, RADEON_VIPREAD, &vr, sizeof( vr ));		if( res == B_OK )		*data = vr.data;			return res;}status_t Radeon_VIPWrite( accelerator_info *ai, uint8 channel, uint address, uint32 data ){	radeon_vip_write vw;		vw.magic = RADEON_PRIVATE_DATA_MAGIC;	vw.channel = channel;	vw.address = address;	vw.data = data;	vw.lock = false;		return ioctl( ai->fd, RADEON_VIPWRITE, &vw, sizeof( vw ));}int Radeon_FindVIPDevice( accelerator_info *ai, uint32 device_id ){	radeon_find_vip_device fvd;	status_t res;		fvd.magic = RADEON_PRIVATE_DATA_MAGIC;	fvd.device_id = device_id;		res = ioctl( ai->fd, RADEON_FINDVIPDEVICE, &fvd, sizeof( fvd ));		if( res == B_OK )		return fvd.channel;	else		return -1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -