/* * Copyright © 2009 Jerome Glisse * * This file is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef RADEON_H #define RADEON_H #include #include "xf86drm.h" #include "xf86drmMode.h" #include "radeon_bo.h" #include "radeon_cs.h" #include struct radeon_mode { drmModeModeInfo info; u32 pitch; u32 height; u32 bpp; u32 size; u32 encoder_id; u32 connector_id; u32 crtc_id; u32 fb_id; struct radeon_bo *bo; }; struct radeon { struct radeon_mode mode; struct radeon_bo_manager *bom; struct radeon_cs_manager *csm; int fd; }; extern int radeon_init(struct radeon *radeon); extern void radeon_fini(struct radeon *radeon); extern int radeon_mode_configure(struct radeon *radeon); extern void radeon_mode_cleanup(struct radeon *radeon); extern void memset_bo(struct radeon_bo *bo, u32 value); extern int memcmp_bo(struct radeon_bo *s1, struct radeon_bo *s2, u32 size); extern void memsetrandom_bo(struct radeon_bo *bo); extern void memcpy_bo(struct radeon_bo *bo, u32 *src, u32 size); #endif