• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2022 Imagination Technologies Ltd.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * 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 THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  */
23 
24 /* This file is based on rgx_fwif_shared.h and rgx_fwif_client.h. It contains
25  * information about the firmware that is needed by the driver.
26  */
27 
28 #ifndef PVR_ROGUE_FW_H
29 #define PVR_ROGUE_FW_H
30 
31 /**
32  * Maximum PB free list size supported by RGX and Services.
33  *
34  * Maximum PB free list size must ensure that no PM address space can be fully
35  * used, because if the full address space was used it would wrap and corrupt
36  * itself. Since there are two freelists (local is always minimum sized) this
37  * can be described as following three conditions being met:
38  *
39  *  Minimum PB + Maximum PB < ALIST PM address space size (16GB)
40  *  Minimum PB + Maximum PB < TE PM address space size (16GB) / NUM_TE_PIPES
41  *  Minimum PB + Maximum PB < VCE PM address space size (16GB) / NUM_VCE_PIPES
42  *
43  * Since the max of NUM_TE_PIPES and NUM_VCE_PIPES is 4, we have a hard limit
44  * of 4GB minus the Minimum PB. For convenience we take the smaller power-of-2
45  * value of 2GB. This is far more than any normal application would request
46  * or use.
47  */
48 #define ROGUE_FREE_LIST_MAX_SIZE (2ULL * 1024ULL * 1024ULL * 1024ULL)
49 
50 /* FIXME: This will change based on the firmware configuration, which will vary
51  * depending on the BVNC and firmware version. The powervr KM driver allows this
52  * information to be queried, but the pvrsrvkm KM driver doesn't. This
53  * information should really be queried from the winsys.
54  */
55 /* Indicates the number of Render Target Datas in a Render Target Dataset. */
56 #define ROGUE_NUM_RTDATAS 2U
57 
58 #endif /* PVR_ROGUE_FW_H */
59