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