[Intel-gfx] [PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL
Yang, Fei
fei.yang at intel.com
Wed Apr 19 16:03:50 UTC 2023
>> void setup_private_pat(struct intel_gt *gt)
>>
>> GEM_BUG_ON(GRAPHICS_VER(i915) < 8);
>>
>> - if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50))
>> - xehp_setup_private_ppat(gt);
>> - else if (GRAPHICS_VER(i915) >= 12)
>> - tgl_setup_private_ppat(uncore);
>> - else if (GRAPHICS_VER(i915) >= 11)
>> - icl_setup_private_ppat(uncore);
>> - else if (IS_CHERRYVIEW(i915) || IS_GEN9_LP(i915))
>> - chv_setup_private_ppat(uncore);
>> - else
>> - bdw_setup_private_ppat(uncore);
>> + if (gt->type == GT_MEDIA) {
>> + xelpmp_setup_private_ppat(gt->uncore);
>> + } else {
>> + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70))
>
> You could just use "else if" here to avoid indendation, for now it would work, up to you.
Will update.
>> + xelpg_setup_private_ppat(gt);
>> + else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50))
>> + xehp_setup_private_ppat(gt);
>> + else if (GRAPHICS_VER(i915) >= 12)
>> + tgl_setup_private_ppat(uncore);
>> + else if (GRAPHICS_VER(i915) >= 11)
>> + icl_setup_private_ppat(uncore);
>> + else if (IS_CHERRYVIEW(i915) || IS_GEN9_LP(i915))
>> + chv_setup_private_ppat(uncore);
>> + else
>> + bdw_setup_private_ppat(uncore);
>> + }
>> }
......
More information about the dri-devel
mailing list