mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: Tejas Upadhyay <tejas.upadhyay@intel.com> Link: https://lore.kernel.org/r/20251013200944.2499947-35-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This commit is contained in:
@@ -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(>->uc.guc);
|
||||
size_t size = gt ? xe_guc_hwconfig_size(>->uc.guc) : 0;
|
||||
void __user *query_ptr = u64_to_user_ptr(query->data);
|
||||
void *hwconfig;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user