On 11/01/18 11:12, Tvrtko Ursulin
wrote:
*/
+ eu_en = ~I915_READ(GEN8_EU_DISABLE0);
+ for (ss = 0; ss < sseu->max_subslices; ss++)
+ sseu->eu_mask[ss] = (eu_en >> (8 * ss))
& eu_mask;
+ /* Slice1 */
+ sseu->eu_mask[sseu->max_subslices] = (eu_en
>> 24) & eu_mask;
+ eu_en = ~I915_READ(GEN8_EU_DISABLE1);
+ sseu->eu_mask[sseu->max_subslices + 1] = eu_en
& eu_mask;
I suggest a helper to index into sse->eu_mask, like
sseu->eu_mask[_eu_mask_idx(slice, subslice)] or something, so
it is more readable what is happening here. Or even:
_eu_mask(sseu, slice, subslice) = mask;
Doable? I am not 100% I picked up exactly on the layout of the
eu_mask array.. each element is one subslice? Consecutive for
slice0, subslice0..N, slice1... sliceN ?
Oops, I misread that part.
I thought you wanted a helper for accessing the registers.
I'll add a helper for what you would like.
|
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx