@@ -2063,40 +2063,115 @@ static void a6xx_recover(struct msm_gpu *gpu)
2063
2063
2064
2064
static const char * a6xx_uche_fault_block (struct msm_gpu * gpu , u32 mid )
2065
2065
{
2066
+ struct adreno_gpu * adreno_gpu = to_adreno_gpu (gpu );
2066
2067
static const char * uche_clients [7 ] = {
2067
2068
"VFD" , "SP" , "VSC" , "VPC" , "HLSQ" , "PC" , "LRZ" ,
2068
2069
};
2069
2070
u32 val ;
2070
2071
2071
- if (mid < 1 || mid > 3 )
2072
- return "UNKNOWN" ;
2072
+ if (adreno_is_a7xx (adreno_gpu )) {
2073
+ if (mid != 1 && mid != 2 && mid != 3 && mid != 8 )
2074
+ return "UNKNOWN" ;
2075
+ } else {
2076
+ if (mid < 1 || mid > 3 )
2077
+ return "UNKNOWN" ;
2078
+ }
2073
2079
2074
2080
/*
2075
2081
* The source of the data depends on the mid ID read from FSYNR1.
2076
2082
* and the client ID read from the UCHE block
2077
2083
*/
2078
2084
val = gpu_read (gpu , REG_A6XX_UCHE_CLIENT_PF );
2079
2085
2080
- /* mid = 3 is most precise and refers to only one block per client */
2081
- if (mid == 3 )
2082
- return uche_clients [val & 7 ];
2086
+ if (adreno_is_a7xx (adreno_gpu )) {
2087
+ /* Bit 3 for mid=3 indicates BR or BV */
2088
+ static const char * uche_clients_a7xx [16 ] = {
2089
+ "BR_VFD" , "BR_SP" , "BR_VSC" , "BR_VPC" ,
2090
+ "BR_HLSQ" , "BR_PC" , "BR_LRZ" , "BR_TP" ,
2091
+ "BV_VFD" , "BV_SP" , "BV_VSC" , "BV_VPC" ,
2092
+ "BV_HLSQ" , "BV_PC" , "BV_LRZ" , "BV_TP" ,
2093
+ };
2094
+
2095
+ /* LPAC has the same clients as BR and BV, but because it is
2096
+ * compute-only some of them do not exist and there are holes
2097
+ * in the array.
2098
+ */
2099
+ static const char * uche_clients_lpac_a7xx [8 ] = {
2100
+ "-" , "LPAC_SP" , "-" , "-" ,
2101
+ "LPAC_HLSQ" , "-" , "-" , "LPAC_TP" ,
2102
+ };
2103
+
2104
+ val &= GENMASK (6 , 0 );
2105
+
2106
+ /* mid=3 refers to BR or BV */
2107
+ if (mid == 3 ) {
2108
+ if (val < ARRAY_SIZE (uche_clients_a7xx ))
2109
+ return uche_clients_a7xx [val ];
2110
+ else
2111
+ return "UCHE" ;
2112
+ }
2113
+
2114
+ /* mid=8 refers to LPAC */
2115
+ if (mid == 8 ) {
2116
+ if (val < ARRAY_SIZE (uche_clients_lpac_a7xx ))
2117
+ return uche_clients_lpac_a7xx [val ];
2118
+ else
2119
+ return "UCHE_LPAC" ;
2120
+ }
2083
2121
2084
- /* For mid=2 the source is TP or VFD except when the client id is 0 */
2085
- if (mid == 2 )
2086
- return ((val & 7 ) == 0 ) ? "TP" : "TP|VFD" ;
2122
+ /* mid=2 is a catchall for everything else in LPAC */
2123
+ if (mid == 2 )
2124
+ return "UCHE_LPAC" ;
2125
+
2126
+ /* mid=1 is a catchall for everything else in BR/BV */
2127
+ return "UCHE" ;
2128
+ } else if (adreno_is_a660_family (adreno_gpu )) {
2129
+ static const char * uche_clients_a660 [8 ] = {
2130
+ "VFD" , "SP" , "VSC" , "VPC" , "HLSQ" , "PC" , "LRZ" , "TP" ,
2131
+ };
2087
2132
2088
- /* For mid=1 just return "UCHE" as a catchall for everything else */
2089
- return "UCHE" ;
2133
+ static const char * uche_clients_a660_not [8 ] = {
2134
+ "not VFD" , "not SP" , "not VSC" , "not VPC" ,
2135
+ "not HLSQ" , "not PC" , "not LRZ" , "not TP" ,
2136
+ };
2137
+
2138
+ val &= GENMASK (6 , 0 );
2139
+
2140
+ if (mid == 3 && val < ARRAY_SIZE (uche_clients_a660 ))
2141
+ return uche_clients_a660 [val ];
2142
+
2143
+ if (mid == 1 && val < ARRAY_SIZE (uche_clients_a660_not ))
2144
+ return uche_clients_a660_not [val ];
2145
+
2146
+ return "UCHE" ;
2147
+ } else {
2148
+ /* mid = 3 is most precise and refers to only one block per client */
2149
+ if (mid == 3 )
2150
+ return uche_clients [val & 7 ];
2151
+
2152
+ /* For mid=2 the source is TP or VFD except when the client id is 0 */
2153
+ if (mid == 2 )
2154
+ return ((val & 7 ) == 0 ) ? "TP" : "TP|VFD" ;
2155
+
2156
+ /* For mid=1 just return "UCHE" as a catchall for everything else */
2157
+ return "UCHE" ;
2158
+ }
2090
2159
}
2091
2160
2092
2161
static const char * a6xx_fault_block (struct msm_gpu * gpu , u32 id )
2093
2162
{
2163
+ struct adreno_gpu * adreno_gpu = to_adreno_gpu (gpu );
2164
+
2094
2165
if (id == 0 )
2095
2166
return "CP" ;
2096
2167
else if (id == 4 )
2097
2168
return "CCU" ;
2098
2169
else if (id == 6 )
2099
2170
return "CDP Prefetch" ;
2171
+ else if (id == 7 )
2172
+ return "GMU" ;
2173
+ else if (id == 5 && adreno_is_a7xx (adreno_gpu ))
2174
+ return "Flag cache" ;
2100
2175
2101
2176
return a6xx_uche_fault_block (gpu , id );
2102
2177
}
0 commit comments