@@ -1012,48 +1012,79 @@ static void gen9_whitelist_build(struct i915_wa_list *w)
10121012 whitelist_reg (w , GEN8_HDC_CHICKEN1 );
10131013}
10141014
1015- static void skl_whitelist_build (struct i915_wa_list * w )
1015+ static void skl_whitelist_build (struct intel_engine_cs * engine )
10161016{
1017+ struct i915_wa_list * w = & engine -> whitelist ;
1018+
1019+ if (engine -> class != RENDER_CLASS )
1020+ return ;
1021+
10171022 gen9_whitelist_build (w );
10181023
10191024 /* WaDisableLSQCROPERFforOCL:skl */
10201025 whitelist_reg (w , GEN8_L3SQCREG4 );
10211026}
10221027
1023- static void bxt_whitelist_build (struct i915_wa_list * w )
1028+ static void bxt_whitelist_build (struct intel_engine_cs * engine )
10241029{
1025- gen9_whitelist_build (w );
1030+ if (engine -> class != RENDER_CLASS )
1031+ return ;
1032+
1033+ gen9_whitelist_build (& engine -> whitelist );
10261034}
10271035
1028- static void kbl_whitelist_build (struct i915_wa_list * w )
1036+ static void kbl_whitelist_build (struct intel_engine_cs * engine )
10291037{
1038+ struct i915_wa_list * w = & engine -> whitelist ;
1039+
1040+ if (engine -> class != RENDER_CLASS )
1041+ return ;
1042+
10301043 gen9_whitelist_build (w );
10311044
10321045 /* WaDisableLSQCROPERFforOCL:kbl */
10331046 whitelist_reg (w , GEN8_L3SQCREG4 );
10341047}
10351048
1036- static void glk_whitelist_build (struct i915_wa_list * w )
1049+ static void glk_whitelist_build (struct intel_engine_cs * engine )
10371050{
1051+ struct i915_wa_list * w = & engine -> whitelist ;
1052+
1053+ if (engine -> class != RENDER_CLASS )
1054+ return ;
1055+
10381056 gen9_whitelist_build (w );
10391057
10401058 /* WA #0862: Userspace has to set "Barrier Mode" to avoid hangs. */
10411059 whitelist_reg (w , GEN9_SLICE_COMMON_ECO_CHICKEN1 );
10421060}
10431061
1044- static void cfl_whitelist_build (struct i915_wa_list * w )
1062+ static void cfl_whitelist_build (struct intel_engine_cs * engine )
10451063{
1046- gen9_whitelist_build (w );
1064+ if (engine -> class != RENDER_CLASS )
1065+ return ;
1066+
1067+ gen9_whitelist_build (& engine -> whitelist );
10471068}
10481069
1049- static void cnl_whitelist_build (struct i915_wa_list * w )
1070+ static void cnl_whitelist_build (struct intel_engine_cs * engine )
10501071{
1072+ struct i915_wa_list * w = & engine -> whitelist ;
1073+
1074+ if (engine -> class != RENDER_CLASS )
1075+ return ;
1076+
10511077 /* WaEnablePreemptionGranularityControlByUMD:cnl */
10521078 whitelist_reg (w , GEN8_CS_CHICKEN1 );
10531079}
10541080
1055- static void icl_whitelist_build (struct i915_wa_list * w )
1081+ static void icl_whitelist_build (struct intel_engine_cs * engine )
10561082{
1083+ struct i915_wa_list * w = & engine -> whitelist ;
1084+
1085+ if (engine -> class != RENDER_CLASS )
1086+ return ;
1087+
10571088 /* WaAllowUMDToModifyHalfSliceChicken7:icl */
10581089 whitelist_reg (w , GEN9_HALF_SLICE_CHICKEN7 );
10591090
@@ -1069,24 +1100,22 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine)
10691100 struct drm_i915_private * i915 = engine -> i915 ;
10701101 struct i915_wa_list * w = & engine -> whitelist ;
10711102
1072- GEM_BUG_ON (engine -> id != RCS0 );
1073-
10741103 wa_init_start (w , "whitelist" );
10751104
10761105 if (IS_GEN (i915 , 11 ))
1077- icl_whitelist_build (w );
1106+ icl_whitelist_build (engine );
10781107 else if (IS_CANNONLAKE (i915 ))
1079- cnl_whitelist_build (w );
1108+ cnl_whitelist_build (engine );
10801109 else if (IS_COFFEELAKE (i915 ))
1081- cfl_whitelist_build (w );
1110+ cfl_whitelist_build (engine );
10821111 else if (IS_GEMINILAKE (i915 ))
1083- glk_whitelist_build (w );
1112+ glk_whitelist_build (engine );
10841113 else if (IS_KABYLAKE (i915 ))
1085- kbl_whitelist_build (w );
1114+ kbl_whitelist_build (engine );
10861115 else if (IS_BROXTON (i915 ))
1087- bxt_whitelist_build (w );
1116+ bxt_whitelist_build (engine );
10881117 else if (IS_SKYLAKE (i915 ))
1089- skl_whitelist_build (w );
1118+ skl_whitelist_build (engine );
10901119 else if (INTEL_GEN (i915 ) <= 8 )
10911120 return ;
10921121 else
0 commit comments