Commit 5a92da34 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi
Browse files

drm/xe: Rename info.supports_* to info.has_*



Rename supports_mmio_ext and supports_usm to use a has_ prefix so the
flags are grouped together. This settles on just one variant for
positive info matching ("has_") and one for negative ("skip_").

Also make sure the has_* flags are grouped together in xe_pci.c.

Reviewed-by: default avatarKoby Elbaz <kelbaz@habana.ai>
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20231205145235.2114761-1-lucas.demarchi@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent f1a5d808
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static int run_sanity_job(struct xe_migrate *m, struct xe_device *xe,
			  struct xe_bb *bb, u32 second_idx, const char *str,
			  struct kunit *test)
{
	u64 batch_base = xe_migrate_batch_base(m, xe->info.supports_usm);
	u64 batch_base = xe_migrate_batch_base(m, xe->info.has_usm);
	struct xe_sched_job *job = xe_bb_create_migration_job(m->q, bb,
							      batch_base,
							      second_idx);
@@ -308,7 +308,7 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test)
		goto free_pt;
	}

	bb = xe_bb_new(tile->primary_gt, 32, xe->info.supports_usm);
	bb = xe_bb_new(tile->primary_gt, 32, xe->info.has_usm);
	if (IS_ERR(bb)) {
		KUNIT_FAIL(test, "Failed to create batchbuffer: %li\n",
			   PTR_ERR(bb));
+1 −1
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ static int info(struct seq_file *m, void *data)
	drm_printf(&p, "tile_count %d\n", xe->info.tile_count);
	drm_printf(&p, "vm_max_level %d\n", xe->info.vm_max_level);
	drm_printf(&p, "force_execlist %s\n", str_yes_no(xe->info.force_execlist));
	drm_printf(&p, "supports_usm %s\n", str_yes_no(xe->info.supports_usm));
	drm_printf(&p, "has_flat_ccs %s\n", str_yes_no(xe->info.has_flat_ccs));
	drm_printf(&p, "has_usm %s\n", str_yes_no(xe->info.has_usm));
	for_each_gt(gt, xe, id) {
		drm_printf(&p, "gt%d force wake %d\n", id,
			   xe_force_wake_ref(gt_to_fw(gt), XE_FW_GT));
+4 −4
Original line number Diff line number Diff line
@@ -251,8 +251,6 @@ struct xe_device {

		/** @is_dgfx: is discrete device */
		u8 is_dgfx:1;
		/** @supports_usm: Supports unified shared memory */
		u8 supports_usm:1;
		/** @has_asid: Has address space ID */
		u8 has_asid:1;
		/** @force_execlist: Forced execlist submission */
@@ -261,18 +259,20 @@ struct xe_device {
		u8 has_flat_ccs:1;
		/** @has_llc: Device has a shared CPU+GPU last level cache */
		u8 has_llc:1;
		/** @has_mmio_ext: Device has extra MMIO address range */
		u8 has_mmio_ext:1;
		/** @has_range_tlb_invalidation: Has range based TLB invalidations */
		u8 has_range_tlb_invalidation:1;
		/** @has_sriov: Supports SR-IOV */
		u8 has_sriov:1;
		/** @has_usm: Device has unified shared memory support */
		u8 has_usm:1;
		/** @enable_display: display enabled */
		u8 enable_display:1;
		/** @skip_mtcfg: skip Multi-Tile configuration from MTCFG register */
		u8 skip_mtcfg:1;
		/** @skip_pcode: skip access to PCODE uC */
		u8 skip_pcode:1;
		/** @supports_mmio_ext: supports MMIO extension/s */
		u8 supports_mmio_ext:1;
		/** @has_heci_gscfi: device has heci gscfi */
		u8 has_heci_gscfi:1;
		/** @skip_guc_pc: Skip GuC based PM feature init */
+3 −3
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ static int exec_queue_set_acc_trigger(struct xe_device *xe, struct xe_exec_queue
	if (XE_IOCTL_DBG(xe, !create))
		return -EINVAL;

	if (XE_IOCTL_DBG(xe, !xe->info.supports_usm))
	if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
		return -EINVAL;

	q->usm.acc_trigger = value;
@@ -376,7 +376,7 @@ static int exec_queue_set_acc_notify(struct xe_device *xe, struct xe_exec_queue
	if (XE_IOCTL_DBG(xe, !create))
		return -EINVAL;

	if (XE_IOCTL_DBG(xe, !xe->info.supports_usm))
	if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
		return -EINVAL;

	q->usm.acc_notify = value;
@@ -390,7 +390,7 @@ static int exec_queue_set_acc_granularity(struct xe_device *xe, struct xe_exec_q
	if (XE_IOCTL_DBG(xe, !create))
		return -EINVAL;

	if (XE_IOCTL_DBG(xe, !xe->info.supports_usm))
	if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
		return -EINVAL;

	if (value > DRM_XE_ACC_GRANULARITY_64M)
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static int all_fw_domain_init(struct xe_gt *gt)
		/*
		 * USM has its only SA pool to non-block behind user operations
		 */
		if (gt_to_xe(gt)->info.supports_usm) {
		if (gt_to_xe(gt)->info.has_usm) {
			gt->usm.bb_pool = xe_sa_bo_manager_init(gt_to_tile(gt), SZ_1M, 16);
			if (IS_ERR(gt->usm.bb_pool)) {
				err = PTR_ERR(gt->usm.bb_pool);
Loading