Commit 090e7fc4 authored by Matt Roper's avatar Matt Roper
Browse files

drm/xe/query: Report hwconfig size as 0 if primary GT is disabled



The hwconfig table is part of the primary GT's GuC firmware.  If the
primary GT is disabled, the hwconfig is unavailable and should be
reported to userspace as having size 0.

Reviewed-by: default avatarTejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://lore.kernel.org/r/20251013200944.2499947-35-matthew.d.roper@intel.com


Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
parent 082547d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ static int query_hwconfig(struct xe_device *xe,
			  struct drm_xe_device_query *query)
{
	struct xe_gt *gt = xe_root_mmio_gt(xe);
	size_t size = xe_guc_hwconfig_size(&gt->uc.guc);
	size_t size = gt ? xe_guc_hwconfig_size(&gt->uc.guc) : 0;
	void __user *query_ptr = u64_to_user_ptr(query->data);
	void *hwconfig;