* [PATCH] drm/i915/selftests: prefer the create_user helper
@ 2021-07-28 15:57 ` Matthew Auld
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Auld @ 2021-07-28 15:57 UTC (permalink / raw)
To: intel-gfx; +Cc: Jason Ekstrand, dri-devel
No need to hand roll the set_placements stuff, now that that we have a
helper for this. Also no need to handle the -ENODEV case here, since
NULL mr implies missing device support, where the for_each_memory_region
helper will always skip over such regions.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
---
.../drm/i915/gem/selftests/i915_gem_mman.c | 46 ++-----------------
1 file changed, 4 insertions(+), 42 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index 0b2b73d8a364..eed1c2c64e75 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -860,24 +860,6 @@ static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
return !no_map;
}
-static void object_set_placements(struct drm_i915_gem_object *obj,
- struct intel_memory_region **placements,
- unsigned int n_placements)
-{
- GEM_BUG_ON(!n_placements);
-
- if (n_placements == 1) {
- struct drm_i915_private *i915 = to_i915(obj->base.dev);
- struct intel_memory_region *mr = placements[0];
-
- obj->mm.placements = &i915->mm.regions[mr->id];
- obj->mm.n_placements = 1;
- } else {
- obj->mm.placements = placements;
- obj->mm.n_placements = n_placements;
- }
-}
-
#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24))
static int __igt_mmap(struct drm_i915_private *i915,
struct drm_i915_gem_object *obj,
@@ -972,15 +954,10 @@ static int igt_mmap(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, sizes[i], 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, sizes[i], &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
@@ -1101,15 +1078,10 @@ static int igt_mmap_access(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WB);
@@ -1248,15 +1220,10 @@ static int igt_mmap_gpu(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
@@ -1405,15 +1372,10 @@ static int igt_mmap_revoke(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
--
2.26.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/selftests: prefer the create_user helper
@ 2021-07-28 15:57 ` Matthew Auld
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Auld @ 2021-07-28 15:57 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel
No need to hand roll the set_placements stuff, now that that we have a
helper for this. Also no need to handle the -ENODEV case here, since
NULL mr implies missing device support, where the for_each_memory_region
helper will always skip over such regions.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
---
.../drm/i915/gem/selftests/i915_gem_mman.c | 46 ++-----------------
1 file changed, 4 insertions(+), 42 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index 0b2b73d8a364..eed1c2c64e75 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -860,24 +860,6 @@ static bool can_mmap(struct drm_i915_gem_object *obj, enum i915_mmap_type type)
return !no_map;
}
-static void object_set_placements(struct drm_i915_gem_object *obj,
- struct intel_memory_region **placements,
- unsigned int n_placements)
-{
- GEM_BUG_ON(!n_placements);
-
- if (n_placements == 1) {
- struct drm_i915_private *i915 = to_i915(obj->base.dev);
- struct intel_memory_region *mr = placements[0];
-
- obj->mm.placements = &i915->mm.regions[mr->id];
- obj->mm.n_placements = 1;
- } else {
- obj->mm.placements = placements;
- obj->mm.n_placements = n_placements;
- }
-}
-
#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24))
static int __igt_mmap(struct drm_i915_private *i915,
struct drm_i915_gem_object *obj,
@@ -972,15 +954,10 @@ static int igt_mmap(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, sizes[i], 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, sizes[i], &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
@@ -1101,15 +1078,10 @@ static int igt_mmap_access(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WB);
@@ -1248,15 +1220,10 @@ static int igt_mmap_gpu(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
@@ -1405,15 +1372,10 @@ static int igt_mmap_revoke(void *arg)
struct drm_i915_gem_object *obj;
int err;
- obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
- if (obj == ERR_PTR(-ENODEV))
- continue;
-
+ obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
if (IS_ERR(obj))
return PTR_ERR(obj);
- object_set_placements(obj, &mr, 1);
-
err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
if (err == 0)
err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
--
2.26.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: prefer the create_user helper
2021-07-28 15:57 ` [Intel-gfx] " Matthew Auld
(?)
@ 2021-07-28 20:38 ` Patchwork
-1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-07-28 20:38 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: prefer the create_user helper
URL : https://patchwork.freedesktop.org/series/93131/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
28a3c3987659 drm/i915/selftests: prefer the create_user helper
-:6: WARNING:REPEATED_WORD: Possible repeated word: 'that'
#6:
No need to hand roll the set_placements stuff, now that that we have a
total: 0 errors, 1 warnings, 0 checks, 88 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: prefer the create_user helper
2021-07-28 15:57 ` [Intel-gfx] " Matthew Auld
(?)
(?)
@ 2021-07-28 21:06 ` Patchwork
-1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-07-28 21:06 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 3511 bytes --]
== Series Details ==
Series: drm/i915/selftests: prefer the create_user helper
URL : https://patchwork.freedesktop.org/series/93131/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10413 -> Patchwork_20726
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_20726 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_20726, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_20726:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@mman:
- fi-kbl-8809g: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10413/fi-kbl-8809g/igt@i915_selftest@live@mman.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/fi-kbl-8809g/igt@i915_selftest@live@mman.html
- fi-ivb-3770: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10413/fi-ivb-3770/igt@i915_selftest@live@mman.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/fi-ivb-3770/igt@i915_selftest@live@mman.html
Known issues
------------
Here are the changes found in Patchwork_20726 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-tgl-1115g4: [PASS][5] -> [FAIL][6] ([i915#1888])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10413/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s3.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s3.html
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
- fi-tgl-1115g4: [PASS][7] -> [DMESG-WARN][8] ([i915#1887])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10413/fi-tgl-1115g4/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/fi-tgl-1115g4/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html
* igt@runner@aborted:
- fi-tgl-1115g4: NOTRUN -> [FAIL][9] ([i915#1602])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/fi-tgl-1115g4/igt@runner@aborted.html
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1887]: https://gitlab.freedesktop.org/drm/intel/issues/1887
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
Participating hosts (42 -> 36)
------------------------------
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus bat-jsl-1
Build changes
-------------
* Linux: CI_DRM_10413 -> Patchwork_20726
CI-20190529: 20190529
CI_DRM_10413: 33ace46253ab0ea580c1ff117e8ec2c6096d3297 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6155: 4b51398dcd7559012b85776e7353d516ff1e6ce6 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20726: 28a3c39876598c0ea3a09e8fe98c100614c9b759 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
28a3c3987659 drm/i915/selftests: prefer the create_user helper
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20726/index.html
[-- Attachment #1.2: Type: text/html, Size: 4245 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915/selftests: prefer the create_user helper
2021-07-28 15:57 ` [Intel-gfx] " Matthew Auld
@ 2021-07-29 2:14 ` Jason Ekstrand
-1 siblings, 0 replies; 6+ messages in thread
From: Jason Ekstrand @ 2021-07-29 2:14 UTC (permalink / raw)
To: Matthew Auld, intel-gfx; +Cc: dri-devel
[-- Attachment #1: Type: text/plain, Size: 3846 bytes --]
On July 28, 2021 10:57:23 Matthew Auld <matthew.auld@intel.com> wrote:
> No need to hand roll the set_placements stuff, now that that we have a
> helper for this. Also no need to handle the -ENODEV case here, since
> NULL mr implies missing device support, where the for_each_memory_region
> helper will always skip over such regions.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
> ---
> .../drm/i915/gem/selftests/i915_gem_mman.c | 46 ++-----------------
> 1 file changed, 4 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> index 0b2b73d8a364..eed1c2c64e75 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> @@ -860,24 +860,6 @@ static bool can_mmap(struct drm_i915_gem_object *obj,
> enum i915_mmap_type type)
> return !no_map;
> }
>
> -static void object_set_placements(struct drm_i915_gem_object *obj,
> - struct intel_memory_region **placements,
> - unsigned int n_placements)
> -{
> - GEM_BUG_ON(!n_placements);
> -
> - if (n_placements == 1) {
> - struct drm_i915_private *i915 = to_i915(obj->base.dev);
> - struct intel_memory_region *mr = placements[0];
> -
> - obj->mm.placements = &i915->mm.regions[mr->id];
> - obj->mm.n_placements = 1;
> - } else {
> - obj->mm.placements = placements;
> - obj->mm.n_placements = n_placements;
> - }
> -}
> -
> #define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24))
> static int __igt_mmap(struct drm_i915_private *i915,
> struct drm_i915_gem_object *obj,
> @@ -972,15 +954,10 @@ static int igt_mmap(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, sizes[i], 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, sizes[i], &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
> @@ -1101,15 +1078,10 @@ static int igt_mmap_access(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WB);
> @@ -1248,15 +1220,10 @@ static int igt_mmap_gpu(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
> @@ -1405,15 +1372,10 @@ static int igt_mmap_revoke(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
> --
> 2.26.3
[-- Attachment #2: Type: text/html, Size: 7450 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: prefer the create_user helper
@ 2021-07-29 2:14 ` Jason Ekstrand
0 siblings, 0 replies; 6+ messages in thread
From: Jason Ekstrand @ 2021-07-29 2:14 UTC (permalink / raw)
To: Matthew Auld, intel-gfx; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 3846 bytes --]
On July 28, 2021 10:57:23 Matthew Auld <matthew.auld@intel.com> wrote:
> No need to hand roll the set_placements stuff, now that that we have a
> helper for this. Also no need to handle the -ENODEV case here, since
> NULL mr implies missing device support, where the for_each_memory_region
> helper will always skip over such regions.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
> ---
> .../drm/i915/gem/selftests/i915_gem_mman.c | 46 ++-----------------
> 1 file changed, 4 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> index 0b2b73d8a364..eed1c2c64e75 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> @@ -860,24 +860,6 @@ static bool can_mmap(struct drm_i915_gem_object *obj,
> enum i915_mmap_type type)
> return !no_map;
> }
>
> -static void object_set_placements(struct drm_i915_gem_object *obj,
> - struct intel_memory_region **placements,
> - unsigned int n_placements)
> -{
> - GEM_BUG_ON(!n_placements);
> -
> - if (n_placements == 1) {
> - struct drm_i915_private *i915 = to_i915(obj->base.dev);
> - struct intel_memory_region *mr = placements[0];
> -
> - obj->mm.placements = &i915->mm.regions[mr->id];
> - obj->mm.n_placements = 1;
> - } else {
> - obj->mm.placements = placements;
> - obj->mm.n_placements = n_placements;
> - }
> -}
> -
> #define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24))
> static int __igt_mmap(struct drm_i915_private *i915,
> struct drm_i915_gem_object *obj,
> @@ -972,15 +954,10 @@ static int igt_mmap(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, sizes[i], 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, sizes[i], &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap(i915, obj, I915_MMAP_TYPE_WC);
> @@ -1101,15 +1078,10 @@ static int igt_mmap_access(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_access(i915, obj, I915_MMAP_TYPE_WB);
> @@ -1248,15 +1220,10 @@ static int igt_mmap_gpu(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_gpu(i915, obj, I915_MMAP_TYPE_WC);
> @@ -1405,15 +1372,10 @@ static int igt_mmap_revoke(void *arg)
> struct drm_i915_gem_object *obj;
> int err;
>
> - obj = i915_gem_object_create_region(mr, PAGE_SIZE, 0, I915_BO_ALLOC_USER);
> - if (obj == ERR_PTR(-ENODEV))
> - continue;
> -
> + obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &mr, 1);
> if (IS_ERR(obj))
> return PTR_ERR(obj);
>
> - object_set_placements(obj, &mr, 1);
> -
> err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_GTT);
> if (err == 0)
> err = __igt_mmap_revoke(i915, obj, I915_MMAP_TYPE_WC);
> --
> 2.26.3
[-- Attachment #1.2: Type: text/html, Size: 7450 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-29 2:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 15:57 [PATCH] drm/i915/selftests: prefer the create_user helper Matthew Auld
2021-07-28 15:57 ` [Intel-gfx] " Matthew Auld
2021-07-28 20:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-07-28 21:06 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-07-29 2:14 ` [PATCH] " Jason Ekstrand
2021-07-29 2:14 ` [Intel-gfx] " Jason Ekstrand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.