• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  /*
2   * Copyright © 2020 Valve Corporation
3   *
4   * Permission is hereby granted, free of charge, to any person obtaining a
5   * copy of this software and associated documentation files (the "Software"),
6   * to deal in the Software without restriction, including without limitation
7   * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8   * and/or sell copies of the Software, and to permit persons to whom the
9   * Software is furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice (including the next
12   * paragraph) shall be included in all copies or substantial portions of the
13   * Software.
14   *
15   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18   * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21   * IN THE SOFTWARE.
22   *
23   */
24 
25 #ifndef FREEDRENO_DEVICE_INFO_H
26 #define FREEDRENO_DEVICE_INFO_H
27 
28 #include <stdint.h>
29 #include <stdbool.h>
30 
31 /**
32  * Freedreno hardware description and quirks
33  */
34 
35 struct freedreno_dev_info {
36 	/* alignment for size of tiles */
37 	uint32_t tile_align_w, tile_align_h;
38 	/* gmem load/store granularity */
39 	uint32_t gmem_align_w, gmem_align_h;
40 	/* max tile size */
41 	uint32_t tile_max_w, tile_max_h;
42 
43 	uint32_t num_vsc_pipes;
44 
45 	union {
46 		struct {
47 			/* Whether the PC_MULTIVIEW_MASK register exists. */
48 			bool supports_multiview_mask;
49 
50 			/* info for setting RB_CCU_CNTL */
51 			uint32_t ccu_offset_gmem;
52 			uint32_t ccu_offset_bypass;
53 			bool ccu_cntl_gmem_unk2;
54 
55 			struct {
56 				uint32_t RB_UNKNOWN_8E04_blit;
57 				uint32_t PC_UNKNOWN_9805;
58 				uint32_t SP_UNKNOWN_A0F8;
59 			} magic;
60 		} a6xx;
61 	};
62 };
63 
64 void freedreno_dev_info_init(struct freedreno_dev_info *info, uint32_t gpu_id);
65 
66 #endif /* FREEDRENO_DEVICE_INFO_H */
67 
68