]> Gentwo Git Trees - linux/.git/commit
drm/xe/pf: Use migration-friendly context IDs auto-provisioning
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 5 Nov 2025 18:32:50 +0000 (19:32 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 7 Nov 2025 18:47:42 +0000 (19:47 +0100)
commit8fb1d7d3cf643d62fd84eca225562467c1e9b770
treef76cbaa341b67bf4ae9c62fad5a6dfb79878267a
parent715974499a2199bd199fb4630501f55545342ea4
drm/xe/pf: Use migration-friendly context IDs auto-provisioning

Instead of trying very hard to find the largest fair number of GuC
context IDs that could be allocated for VFs on the current GT, pick
some smaller rounded down to power-of-two value that is more likely
to be provisioned in the same manner by the other PF instance:

 num VFs | num contexts
 --------+-------------
  63..32 | 1024
  31..16 | 2048
  15..8  | 4096
   7..4  | 8192
   3..2  | 16384
      1  | 32768 (regular PF)
      1  | 64512 (admin only PF)

Add also helper function to determine if the PF is admin-only,
and for now use .probe_display flag for that.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20251105183253.863-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
drivers/gpu/drm/xe/xe_sriov_pf_helpers.h