mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
drm/xe/pf: Fix VF config validation on multi-GT platforms
When validating VF config on the media GT, we may wrongly report that VF is already partially configured on it, as we consider GGTT and LMEM provisioning done on the primary GT (since both GGTT and LMEM are tile-level resources, not a GT-level). This will cause skipping a VF auto-provisioning on the media-GT and in result will block a VF from successfully initialize that GT. Fix that by considering GGTT and LMEM configurations only when checking if a VF provisioning is complete, and omit GGTT and LMEM when reporting empty/partial provisioning. Fixes:234670cea9
("drm/xe/pf: Skip fair VFs provisioning if already provisioned") Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240806180516.618-1-michal.wajdeczko@intel.com (cherry picked from commit5bdacb0907
) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
55ea73aacf
commit
4f7652dcd3
@ -1927,6 +1927,7 @@ static int pf_validate_vf_config(struct xe_gt *gt, unsigned int vfid)
|
||||
{
|
||||
struct xe_gt *primary_gt = gt_to_tile(gt)->primary_gt;
|
||||
struct xe_device *xe = gt_to_xe(gt);
|
||||
bool is_primary = !xe_gt_is_media_type(gt);
|
||||
bool valid_ggtt, valid_ctxs, valid_dbs;
|
||||
bool valid_any, valid_all;
|
||||
|
||||
@ -1935,13 +1936,17 @@ static int pf_validate_vf_config(struct xe_gt *gt, unsigned int vfid)
|
||||
valid_dbs = pf_get_vf_config_dbs(gt, vfid);
|
||||
|
||||
/* note that GuC doorbells are optional */
|
||||
valid_any = valid_ggtt || valid_ctxs || valid_dbs;
|
||||
valid_all = valid_ggtt && valid_ctxs;
|
||||
valid_any = valid_ctxs || valid_dbs;
|
||||
valid_all = valid_ctxs;
|
||||
|
||||
/* and GGTT/LMEM is configured on primary GT only */
|
||||
valid_all = valid_all && valid_ggtt;
|
||||
valid_any = valid_any || (valid_ggtt && is_primary);
|
||||
|
||||
if (IS_DGFX(xe)) {
|
||||
bool valid_lmem = pf_get_vf_config_ggtt(primary_gt, vfid);
|
||||
|
||||
valid_any = valid_any || valid_lmem;
|
||||
valid_any = valid_any || (valid_lmem && is_primary);
|
||||
valid_all = valid_all && valid_lmem;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user