1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright 2004 The Unichrome Project. All Rights Reserved. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person obtaining a 5*4882a593Smuzhiyun * copy of this software and associated documentation files (the "Software"), 6*4882a593Smuzhiyun * to deal in the Software without restriction, including without limitation 7*4882a593Smuzhiyun * the rights to use, copy, modify, merge, publish, distribute, sub license, 8*4882a593Smuzhiyun * and/or sell copies of the Software, and to permit persons to whom the 9*4882a593Smuzhiyun * Software is furnished to do so, subject to the following conditions: 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * The above copyright notice and this permission notice (including the 12*4882a593Smuzhiyun * next paragraph) shall be included in all copies or substantial portions 13*4882a593Smuzhiyun * of the Software. 14*4882a593Smuzhiyun * 15*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16*4882a593Smuzhiyun * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18*4882a593Smuzhiyun * THE UNICHROME PROJECT, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19*4882a593Smuzhiyun * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20*4882a593Smuzhiyun * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21*4882a593Smuzhiyun * DEALINGS IN THE SOFTWARE. 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * Author: Thomas Hellström 2004. 24*4882a593Smuzhiyun */ 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #ifndef _VIA_VERIFIER_H_ 27*4882a593Smuzhiyun #define _VIA_VERIFIER_H_ 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun typedef enum { 30*4882a593Smuzhiyun no_sequence = 0, 31*4882a593Smuzhiyun z_address, 32*4882a593Smuzhiyun dest_address, 33*4882a593Smuzhiyun tex_address 34*4882a593Smuzhiyun } drm_via_sequence_t; 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun typedef struct { 37*4882a593Smuzhiyun unsigned texture; 38*4882a593Smuzhiyun uint32_t z_addr; 39*4882a593Smuzhiyun uint32_t d_addr; 40*4882a593Smuzhiyun uint32_t t_addr[2][10]; 41*4882a593Smuzhiyun uint32_t pitch[2][10]; 42*4882a593Smuzhiyun uint32_t height[2][10]; 43*4882a593Smuzhiyun uint32_t tex_level_lo[2]; 44*4882a593Smuzhiyun uint32_t tex_level_hi[2]; 45*4882a593Smuzhiyun uint32_t tex_palette_size[2]; 46*4882a593Smuzhiyun uint32_t tex_npot[2]; 47*4882a593Smuzhiyun drm_via_sequence_t unfinished; 48*4882a593Smuzhiyun int agp_texture; 49*4882a593Smuzhiyun int multitex; 50*4882a593Smuzhiyun struct drm_device *dev; 51*4882a593Smuzhiyun drm_local_map_t *map_cache; 52*4882a593Smuzhiyun uint32_t vertex_count; 53*4882a593Smuzhiyun int agp; 54*4882a593Smuzhiyun const uint32_t *buf_start; 55*4882a593Smuzhiyun } drm_via_state_t; 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun extern int via_verify_command_stream(const uint32_t *buf, unsigned int size, 58*4882a593Smuzhiyun struct drm_device *dev, int agp); 59*4882a593Smuzhiyun extern int via_parse_command_stream(struct drm_device *dev, const uint32_t *buf, 60*4882a593Smuzhiyun unsigned int size); 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun #endif 63