18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2004 The Unichrome Project. All Rights Reserved. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sub license, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice (including the 128c2ecf20Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 138c2ecf20Sopenharmony_ci * of the Software. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 168c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 178c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 188c2ecf20Sopenharmony_ci * THE UNICHROME PROJECT, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 198c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 208c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 218c2ecf20Sopenharmony_ci * DEALINGS IN THE SOFTWARE. 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * Author: Thomas Hellström 2004. 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#ifndef _VIA_VERIFIER_H_ 278c2ecf20Sopenharmony_ci#define _VIA_VERIFIER_H_ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_citypedef enum { 308c2ecf20Sopenharmony_ci no_sequence = 0, 318c2ecf20Sopenharmony_ci z_address, 328c2ecf20Sopenharmony_ci dest_address, 338c2ecf20Sopenharmony_ci tex_address 348c2ecf20Sopenharmony_ci} drm_via_sequence_t; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_citypedef struct { 378c2ecf20Sopenharmony_ci unsigned texture; 388c2ecf20Sopenharmony_ci uint32_t z_addr; 398c2ecf20Sopenharmony_ci uint32_t d_addr; 408c2ecf20Sopenharmony_ci uint32_t t_addr[2][10]; 418c2ecf20Sopenharmony_ci uint32_t pitch[2][10]; 428c2ecf20Sopenharmony_ci uint32_t height[2][10]; 438c2ecf20Sopenharmony_ci uint32_t tex_level_lo[2]; 448c2ecf20Sopenharmony_ci uint32_t tex_level_hi[2]; 458c2ecf20Sopenharmony_ci uint32_t tex_palette_size[2]; 468c2ecf20Sopenharmony_ci uint32_t tex_npot[2]; 478c2ecf20Sopenharmony_ci drm_via_sequence_t unfinished; 488c2ecf20Sopenharmony_ci int agp_texture; 498c2ecf20Sopenharmony_ci int multitex; 508c2ecf20Sopenharmony_ci struct drm_device *dev; 518c2ecf20Sopenharmony_ci drm_local_map_t *map_cache; 528c2ecf20Sopenharmony_ci uint32_t vertex_count; 538c2ecf20Sopenharmony_ci int agp; 548c2ecf20Sopenharmony_ci const uint32_t *buf_start; 558c2ecf20Sopenharmony_ci} drm_via_state_t; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ciextern int via_verify_command_stream(const uint32_t *buf, unsigned int size, 588c2ecf20Sopenharmony_ci struct drm_device *dev, int agp); 598c2ecf20Sopenharmony_ciextern int via_parse_command_stream(struct drm_device *dev, const uint32_t *buf, 608c2ecf20Sopenharmony_ci unsigned int size); 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#endif 63