Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2004 The Unichrome Project. All Rights Reserved.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sub license,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice (including the
0012  * next paragraph) shall be included in all copies or substantial portions
0013  * of the Software.
0014  *
0015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0016  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0017  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
0018  * THE UNICHROME PROJECT, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
0019  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0020  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0021  * DEALINGS IN THE SOFTWARE.
0022  *
0023  * Author: Thomas Hellström 2004.
0024  */
0025 
0026 #ifndef _VIA_VERIFIER_H_
0027 #define _VIA_VERIFIER_H_
0028 
0029 typedef enum {
0030     no_sequence = 0,
0031     z_address,
0032     dest_address,
0033     tex_address
0034 } drm_via_sequence_t;
0035 
0036 typedef struct {
0037     unsigned texture;
0038     uint32_t z_addr;
0039     uint32_t d_addr;
0040     uint32_t t_addr[2][10];
0041     uint32_t pitch[2][10];
0042     uint32_t height[2][10];
0043     uint32_t tex_level_lo[2];
0044     uint32_t tex_level_hi[2];
0045     uint32_t tex_palette_size[2];
0046     uint32_t tex_npot[2];
0047     drm_via_sequence_t unfinished;
0048     int agp_texture;
0049     int multitex;
0050     struct drm_device *dev;
0051     drm_local_map_t *map_cache;
0052     uint32_t vertex_count;
0053     int agp;
0054     const uint32_t *buf_start;
0055 } drm_via_state_t;
0056 
0057 extern int via_verify_command_stream(const uint32_t *buf, unsigned int size,
0058                      struct drm_device *dev, int agp);
0059 extern int via_parse_command_stream(struct drm_device *dev, const uint32_t *buf,
0060                     unsigned int size);
0061 
0062 #endif