Skip to contentSkip to conversation

drm: move read_domains and write_domain into i915

PATCH In review Christian König 4 participants 8 messages Feb 16, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: move read_domains and write_domain into i915

i915 is the only driver using those fields in the drm_gem_object structure, so they only waste memory for all other drivers.

Move the fields into drm_i915_gem_object instead and patch the i915 code with the following sed commands:

sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c sed -i "s/obj->base.write_domain/obj->write_domain/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

Change is only compile tested.

---
 drivers/gpu/drm/i915/gvt/dmabuf.c                 |  4 +-
 drivers/gpu/drm/i915/i915_debugfs.c               |  4 +-
 drivers/gpu/drm/i915/i915_gem.c                   | 60 +++++++++++------------
 drivers/gpu/drm/i915/i915_gem_clflush.c           |  2 +-
 drivers/gpu/drm/i915/i915_gem_dmabuf.c            |  4 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c        | 10 ++--
 drivers/gpu/drm/i915/i915_gem_internal.c          |  4 +-
 drivers/gpu/drm/i915/i915_gem_object.h            | 15 ++++++
 drivers/gpu/drm/i915/i915_gem_stolen.c            |  2 +-
 drivers/gpu/drm/i915/i915_gem_userptr.c           |  4 +-
 drivers/gpu/drm/i915/i915_gpu_error.c             |  4 +-
 drivers/gpu/drm/i915/selftests/huge_gem_object.c  |  4 +-
 drivers/gpu/drm/i915/selftests/huge_pages.c       |  8 +--
 drivers/gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c     |  4 +-
 include/drm/drm_gem.h                             | 15 ------
 16 files changed, 74 insertions(+), 74 deletions(-)
drivers/gpu/drm/i915/gvt/dmabuf.c +2 -2
index 2ab584f97dfb..de3e076dcb31 100644
@@ -162,8 +162,8 @@ static struct drm_i915_gem_object *vgpu_create_gem(struct drm_device *dev,
 		info->size << PAGE_SHIFT);
 	i915_gem_object_init(obj, &intel_vgpu_gem_ops);
 
-	obj->base.read_domains = I915_GEM_DOMAIN_GTT;
-	obj->base.write_domain = 0;
+	obj->read_domains = I915_GEM_DOMAIN_GTT;
+	obj->write_domain = 0;
 	if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
 		unsigned int tiling_mode = 0;
 		unsigned int stride = 0;
drivers/gpu/drm/i915/i915_debugfs.c +2 -2
index e968aeae1d84..dd43ab952e96 100644
@@ -149,8 +149,8 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		   get_global_flag(obj),
 		   get_pin_mapped_flag(obj),
 		   obj->base.size / 1024,
-		   obj->base.read_domains,
-		   obj->base.write_domain,
+		   obj->read_domains,
+		   obj->write_domain,
 		   i915_cache_level_str(dev_priv, obj->cache_level),
 		   obj->mm.dirty ? " dirty" : "",
 		   obj->mm.madv == I915_MADV_DONTNEED ? " purgeable" : "");
drivers/gpu/drm/i915/i915_gem.c +30 -30

176 lines not on this page · raw message

drivers/gpu/drm/i915/i915_gem_clflush.c +1 -1
index b9b53ac14176..f5c570d35b2a 100644
@@ -177,7 +177,7 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj,
 	} else if (obj->mm.pages) {
 		__i915_do_clflush(obj);
 	} else {
-		GEM_BUG_ON(obj->base.write_domain != I915_GEM_DOMAIN_CPU);
+		GEM_BUG_ON(obj->write_domain != I915_GEM_DOMAIN_CPU);
 	}
 
 	obj->cache_dirty = false;
drivers/gpu/drm/i915/i915_gem_dmabuf.c +2 -2
index 864439a214c8..69a7aec49e84 100644
@@ -330,8 +330,8 @@ struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev,
 	 * write-combined buffer or a delay through the chipset for GTT
 	 * writes that do require us to treat GTT as a separate cache domain.)
 	 */
-	obj->base.read_domains = I915_GEM_DOMAIN_GTT;
-	obj->base.write_domain = 0;
+	obj->read_domains = I915_GEM_DOMAIN_GTT;
+	obj->write_domain = 0;
 
 	return &obj->base;
 
drivers/gpu/drm/i915/i915_gem_execbuffer.c +5 -5
index 4401068ff468..96faf6e9af80 100644
@@ -1073,7 +1073,7 @@ static int __reloc_gpu_alloc(struct i915_execbuffer *eb,
 	u32 *cmd;
 	int err;
 
-	GEM_BUG_ON(vma->obj->base.write_domain & I915_GEM_DOMAIN_CPU);
+	GEM_BUG_ON(vma->obj->write_domain & I915_GEM_DOMAIN_CPU);
 
 	obj = i915_gem_batch_pool_get(&eb->engine->batch_pool, PAGE_SIZE);
 	if (IS_ERR(obj))
@@ -1861,16 +1861,16 @@ void i915_vma_move_to_active(struct i915_vma *vma,
 	i915_gem_active_set(&vma->last_read[idx], req);
 	list_move_tail(&vma->vm_link, &vma->vm->active_list);
 
-	obj->base.write_domain = 0;
+	obj->write_domain = 0;
 	if (flags & EXEC_OBJECT_WRITE) {
-		obj->base.write_domain = I915_GEM_DOMAIN_RENDER;
+		obj->write_domain = I915_GEM_DOMAIN_RENDER;
 
 		if (intel_fb_obj_invalidate(obj, ORIGIN_CS))
 			i915_gem_active_set(&obj->frontbuffer_write, req);
 
-		obj->base.read_domains = 0;
+		obj->read_domains = 0;
 	}
-	obj->base.read_domains |= I915_GEM_GPU_DOMAINS;
+	obj->read_domains |= I915_GEM_GPU_DOMAINS;
 
 	if (flags & EXEC_OBJECT_NEEDS_FENCE)
 		i915_gem_active_set(&vma->last_fence, req);
drivers/gpu/drm/i915/i915_gem_internal.c +2 -2
index a1d6956734f7..03b3e1463cd9 100644
@@ -197,8 +197,8 @@ i915_gem_object_create_internal(struct drm_i915_private *i915,
 	drm_gem_private_object_init(&i915->drm, &obj->base, size);
 	i915_gem_object_init(obj, &i915_gem_object_internal_ops);
 
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
 
 	cache_level = HAS_LLC(i915) ? I915_CACHE_LLC : I915_CACHE_NONE;
 	i915_gem_object_set_cache_coherency(obj, cache_level);
drivers/gpu/drm/i915/i915_gem_object.h +15 -0
index 05e89e1c0a08..a8870e7b6761 100644
@@ -269,6 +269,21 @@ struct drm_i915_gem_object {
 	struct drm_dma_handle *phys_handle;
 
 	struct reservation_object __builtin_resv;
+
+	/**
+	 * @read_domains:
+	 *
+	 * Read memory domains. These monitor which caches contain read/write data
+	 * related to the object. When transitioning from one set of domains
+	 * to another, the driver is called to ensure that caches are suitably
+	 * flushed and invalidated.
+	 */
+	uint32_t read_domains;
+
+	/**
+	 * @write_domain: Corresponding unique write memory domain.
+	 */
+	uint32_t write_domain;
 };
 
 static inline struct drm_i915_gem_object *
drivers/gpu/drm/i915/i915_gem_stolen.c +1 -1
index d3f222fa6356..686b06bed06a 100644
@@ -516,7 +516,7 @@ _i915_gem_object_create_stolen(struct drm_i915_private *dev_priv,
 	i915_gem_object_init(obj, &i915_gem_object_stolen_ops);
 
 	obj->stolen = stolen;
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT;
+	obj->read_domains = I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT;
 	cache_level = HAS_LLC(dev_priv) ? I915_CACHE_LLC : I915_CACHE_NONE;
 	i915_gem_object_set_cache_coherency(obj, cache_level);
 
drivers/gpu/drm/i915/i915_gem_userptr.c +2 -2
index 382a77a1097e..f5380b1c0300 100644
@@ -796,8 +796,8 @@ i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file
 
 	drm_gem_private_object_init(dev, &obj->base, args->user_size);
 	i915_gem_object_init(obj, &i915_gem_userptr_ops);
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
 	i915_gem_object_set_cache_coherency(obj, I915_CACHE_LLC);
 
 	obj->userptr.ptr = args->user_ptr;
drivers/gpu/drm/i915/i915_gpu_error.c +2 -2
index 944059322daa..8bd242fa1958 100644
@@ -997,8 +997,8 @@ static void capture_bo(struct drm_i915_error_buffer *err,
 	err->engine = __active_get_engine_id(&obj->frontbuffer_write);
 
 	err->gtt_offset = vma->node.start;
-	err->read_domains = obj->base.read_domains;
-	err->write_domain = obj->base.write_domain;
+	err->read_domains = obj->read_domains;
+	err->write_domain = obj->write_domain;
 	err->fence_reg = vma->fence ? vma->fence->id : -1;
 	err->tiling = i915_gem_object_get_tiling(obj);
 	err->dirty = obj->mm.dirty;
drivers/gpu/drm/i915/selftests/huge_gem_object.c +2 -2
index a2632df39173..391f3d9ffdf1 100644
@@ -129,8 +129,8 @@ huge_gem_object(struct drm_i915_private *i915,
 	drm_gem_private_object_init(&i915->drm, &obj->base, dma_size);
 	i915_gem_object_init(obj, &huge_ops);
 
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
 	cache_level = HAS_LLC(i915) ? I915_CACHE_LLC : I915_CACHE_NONE;
 	i915_gem_object_set_cache_coherency(obj, cache_level);
 	obj->scratch = phys_size;
drivers/gpu/drm/i915/selftests/huge_pages.c +4 -4
index 2ea69394f428..52b1bd17bf46 100644
@@ -178,8 +178,8 @@ huge_pages_object(struct drm_i915_private *i915,
 	drm_gem_private_object_init(&i915->drm, &obj->base, size);
 	i915_gem_object_init(obj, &huge_page_ops);
 
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
 	obj->cache_level = I915_CACHE_NONE;
 
 	obj->mm.page_mask = page_mask;
@@ -329,8 +329,8 @@ fake_huge_pages_object(struct drm_i915_private *i915, u64 size, bool single)
 	else
 		i915_gem_object_init(obj, &fake_ops);
 
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
 	obj->cache_level = I915_CACHE_NONE;
 
 	return obj;
drivers/gpu/drm/i915/selftests/i915_gem_context.c +2 -2
index 56a803d11916..6da2a2f29c54 100644
@@ -215,8 +215,8 @@ static int cpu_fill(struct drm_i915_gem_object *obj, u32 value)
 	}
 
 	i915_gem_obj_finish_shmem_access(obj);
-	obj->base.read_domains = I915_GEM_DOMAIN_GTT | I915_GEM_DOMAIN_CPU;
-	obj->base.write_domain = 0;
+	obj->read_domains = I915_GEM_DOMAIN_GTT | I915_GEM_DOMAIN_CPU;
+	obj->write_domain = 0;
 	return 0;
 }
 
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +2 -2
index 4a28d713a7d8..8ede54bbdb76 100644
@@ -113,8 +113,8 @@ fake_dma_object(struct drm_i915_private *i915, u64 size)
 	drm_gem_private_object_init(&i915->drm, &obj->base, size);
 	i915_gem_object_init(obj, &fake_ops);
 
-	obj->base.write_domain = I915_GEM_DOMAIN_CPU;
-	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
+	obj->write_domain = I915_GEM_DOMAIN_CPU;
+	obj->read_domains = I915_GEM_DOMAIN_CPU;
 	obj->cache_level = I915_CACHE_NONE;
 
 	/* Preallocate the "backing storage" */
include/drm/drm_gem.h +0 -15
index 9c55c2acaa2b..3583b98a1718 100644
@@ -115,21 +115,6 @@ struct drm_gem_object {
 	 */
 	int name;
 
-	/**
-	 * @read_domains:
-	 *
-	 * Read memory domains. These monitor which caches contain read/write data
-	 * related to the object. When transitioning from one set of domains
-	 * to another, the driver is called to ensure that caches are suitably
-	 * flushed and invalidated.
-	 */
-	uint32_t read_domains;
-
-	/**
-	 * @write_domain: Corresponding unique write memory domain.
-	 */
-	uint32_t write_domain;
-
 	/**
 	 * @dma_buf:
 	 *
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm: move read_domains and write_domain into i915

== Series Details ==

== Series Details ==

Series: drm: move read_domains and write_domain into i915
URL : https://patchwork.freedesktop.org/series/38418/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
3cfcc2e86289 drm: move read_domains and write_domain into i915
-:15: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15: 
sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

-:337: WARNING: line over 80 characters
#337: FILE: drivers/gpu/drm/i915/i915_gem_object.h:276:
+ * Read memory domains. These monitor which caches contain read/write data

-:342: CHECK: Prefer kernel type 'u32' over 'uint32_t' #342: FILE: drivers/gpu/drm/i915/i915_gem_object.h:281:
+ uint32_t read_domains;

-:347: CHECK: Prefer kernel type 'u32' over 'uint32_t' #347: FILE: drivers/gpu/drm/i915/i915_gem_object.h:286:
+ uint32_t write_domain;

total: 0 errors, 2 warnings, 2 checks, 372 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.BAT: success for drm: move read_domains and write_domain into i915

In reply to Christian König
== Series Details ==

== Series Details ==

Series: drm: move read_domains and write_domain into i915
URL : https://patchwork.freedesktop.org/series/38418/
State : success

== Summary ==

Series 38418v1 drm: move read_domains and write_domain into i915
https://patchwork.freedesktop.org/api/1.0/series/38418/revisions/1/mbox/

Test prime_vgem:

        Subgroup basic-fence-flip:
                pass       -> FAIL       (fi-ivb-3770) fdo#104008

fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:425s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:492s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:290s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:489s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:475s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:458s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:569s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:579s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:422s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:284s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:516s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:415s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:454s
fi-ivb-3770      total:288  pass:254  dwarn:0   dfail:0   fail:1   skip:33  time:420s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:460s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:502s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:450s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:501s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:589s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:431s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:529s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:494s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:487s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:414s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:434s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:529s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:400s

Blacklisted hosts:
fi-glk-dsi total:117 pass:104 dwarn:0 dfail:0 fail:0 skip:12

8a1ed2480c14a7f958b54156a48ffe3d462eef7b drm-tip: 2018y-02m-16d-08h-56m-34s UTC integration manifest 3cfcc2e86289 drm: move read_domains and write_domain into i915

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8055/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Christian König

Quoting Christian König (2018-02-16 09:31:23)

Quoted 8 lines

i915 is the only driver using those fields in the drm_gem_object structure, so they only waste memory for all other drivers.

Move the fields into drm_i915_gem_object instead and patch the i915 code with the following sed commands:

sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c sed -i "s/obj->base.write_domain/obj->write_domain/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

s/uint32_t/u16/ and plonk them next to

	unsigned int cache_dirty:1;

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Am 16.02.2018 um 11:18 schrieb Chris Wilson:

Quoted 11 lines

Quoting Christian König (2018-02-16 09:31:23)

Quoted 8 lines

i915 is the only driver using those fields in the drm_gem_object structure, so they only waste memory for all other drivers.

Move the fields into drm_i915_gem_object instead and patch the i915 code with the following sed commands:

sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c sed -i "s/obj->base.write_domain/obj->write_domain/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

s/uint32_t/u16/ and plonk them next to

	unsigned int cache_dirty:1;

Sure, no problem. Should I push this to drm-misc or should it go in using some Intel tree?

Quoted 1 line

Thanks,
Christian.

Quoted 1 line

-Chris

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Quoting Christian König (2018-02-16 12:27:28)

Quoted 8 lines

Am 16.02.2018 um 11:18 schrieb Chris Wilson:

Quoted 7 lines

Quoting Christian König (2018-02-16 09:31:23)

Quoted 6 lines

i915 is the only driver using those fields in the drm_gem_object structure, so they only waste memory for all other drivers.

Move the fields into drm_i915_gem_object instead and patch the i915 code with the following sed commands:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c sed -i "s/obj->base.write_domain/obj->write_domain/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

s/uint32_t/u16/ and plonk them next to

      unsigned int cache_dirty:1;

Sure, no problem. Should I push this to drm-misc or should it go in using some Intel tree?

How desperate are you? Can you wait until rc5 for the fields to disappear?

I think this should be via drm-intel-next-queued, since nobody else has a dependency. Otoh, you want it in early to ensure nobody else picks up a dependency ;)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

Am 16.02.2018 um 13:30 schrieb Chris Wilson:

Quoted 13 lines

Quoting Christian König (2018-02-16 12:27:28)

Quoted 12 lines

Am 16.02.2018 um 11:18 schrieb Chris Wilson:

Quoted 11 lines

Quoting Christian König (2018-02-16 09:31:23)

Quoted 8 lines

i915 is the only driver using those fields in the drm_gem_object structure, so they only waste memory for all other drivers.

Move the fields into drm_i915_gem_object instead and patch the i915 code with the following sed commands:

sed -i "s/obj->base.read_domains/obj->read_domains/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c sed -i "s/obj->base.write_domain/obj->write_domain/g" drivers/gpu/drm/i915/*.c drivers/gpu/drm/i915/*/*.c

s/uint32_t/u16/ and plonk them next to

       unsigned int cache_dirty:1;
Quoted 8 lines
Quoted 2 lines

Sure, no problem. Should I push this to drm-misc or should it go in using some Intel tree?

How desperate are you? Can you wait until rc5 for the fields to disappear?

I think this should be via drm-intel-next-queued, since nobody else has a dependency. Otoh, you want it in early to ensure nobody else picks up a dependency ;)

Well it's probably in there for years and nobody noticed, so I think we can wait a bit longer as well :)

Going to send a V2 with your comments addressed soon.

Christian.

Quoted 1 line

-Chris

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

✓ Fi.CI.IGT: success for drm: move read_domains and write_domain into i915

In reply to Christian König
== Series Details ==

== Series Details ==

Series: drm: move read_domains and write_domain into i915
URL : https://patchwork.freedesktop.org/series/38418/
State : success

== Summary ==

Test perf:

        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254
        Subgroup buffer-fill:
                fail       -> PASS       (shard-apl) fdo#103755
Test kms_frontbuffer_tracking:
        Subgroup fbc-rgb565-draw-mmap-cpu:
                fail       -> PASS       (shard-apl) fdo#101623
        Subgroup fbc-rgb101010-draw-mmap-wc:
                skip       -> PASS       (shard-snb) fdo#103167
        Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
                dmesg-warn -> PASS       (shard-apl) fdo#105128
Test kms_flip:
        Subgroup plain-flip-fb-recreate-interruptible:
                pass       -> FAIL       (shard-snb) fdo#100368 +2
        Subgroup dpms-vs-vblank-race-interruptible:
                fail       -> PASS       (shard-snb) fdo#103060 +2
Test kms_plane_multiple:
        Subgroup legacy-pipe-a-tiling-none:
                fail       -> PASS       (shard-apl) fdo#103166

fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166

shard-apl        total:3397 pass:1766 dwarn:1   dfail:0   fail:21  skip:1608 time:12477s
shard-hsw        total:3427 pass:1759 dwarn:1   dfail:0   fail:10  skip:1656 time:11906s
shard-snb        total:3427 pass:1346 dwarn:1   dfail:0   fail:13  skip:2067 time:6609s

Blacklisted hosts:
shard-kbl total:3404 pass:1872 dwarn:28 dfail:1 fail:21 skip:1481 time:9424s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8055/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx