drm/i915: Check for get_pages instead of shmem (filp)
Subsystems (2)
PATCH 1/1 drm/i915: Check for get_pages instead of shmem (filp)
This behavior of checking for a shmem backed GEM object was introduced here:
commit 4c914c0c7c787b8f730128a8cdcca9c50b0784ab
Author: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800
drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through copy_batch() in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr calls drm_gem_private_object_init() which explicitly sets the filp to none.
It is equally feasible to simply remove the check altogether. You'll probably oops with get_pages somewhere, but that's okay IMO because this condition should be a driver bug, and not trigger-able by userspace. On this note, the function name could probably benefit from a change, but whatever.
NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, *needs_clflush =0 ; -if (!obj->base.filp) +if (!obj->ops->get_pages)return -EINVAL ;if (!(obj->base.read_domains &I915_GEM_DOMAIN_CPU )) {
Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Check for get_pages instead of shmem (filp)
== Summary ==
== Summary ==
Series 3145v1 drm/i915: Check for get_pages instead of shmem (filp)
http://patchwork.freedesktop.org/api/1.0/series/3145/revisions/1/mbox/
bdw-nuci7 total:161 pass:152 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:164 pass:152 dwarn:0 dfail:0 fail:0 skip:12 bsw-nuc-2 total:164 pass:136 dwarn:0 dfail:0 fail:0 skip:28 byt-nuc total:164 pass:141 dwarn:0 dfail:0 fail:0 skip:23 hsw-brixbox total:164 pass:151 dwarn:0 dfail:0 fail:0 skip:13 hsw-gt2 total:164 pass:154 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:164 pass:116 dwarn:0 dfail:0 fail:0 skip:48 ivb-t430s total:164 pass:150 dwarn:0 dfail:0 fail:0 skip:14 skl-i5k-2 total:164 pass:149 dwarn:1 dfail:0 fail:0 skip:14 snb-dellxps total:164 pass:142 dwarn:0 dfail:0 fail:0 skip:22
Results at /archive/results/CI_IGT_test/Patchwork_1377/
9ae71c139227311e70dcc91d16d5acba34ce9a71 drm-intel-nightly: 2016y-02m-08d-09h-39m-29s UTC integration manifest 48a3f49aa2256f9e1a071ff4a52c5c226cf01ee2 drm/i915: Check for get_pages instead of shmem (filp)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Applied to a 4.4.1 tree:
And, FWIW:
Quoted 45 lines · Ben Widawsky
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.It is equally feasible to simply remove the check altogether. You'll probably oops with
get_pagessomewhere, but that's okay IMO because this condition should be a driver bug, and not trigger-able by userspace. On this note, the function name could probably benefit from a change, but whatever.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Jordan Justen <[email protected]>Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +1
-1@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, *needs_clflush =0 ; -if (!obj->base.filp) +if (!obj->ops->get_pages)return -EINVAL ;if (!(obj->base.read_domains &I915_GEM_DOMAIN_CPU )) {Signature · 1 line
2.7.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 34 lines · Ben Widawsky
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.It is equally feasible to simply remove the check altogether. You'll probably oops with
get_pagessomewhere, but that's okay IMO because this condition should be a driver bug, and not trigger-able by userspace. On this note, the function name could probably benefit from a change, but whatever.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Jordan Justen <[email protected]>Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 5 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, *needs_clflush =0 ; -if (!obj->base.filp) +if (!obj->ops->get_pages)
Do we want to do what Chris did in a2a4f916c2f344d4e596c875dd1e66764afec8b8 (on drm-intel-fixes):
+ if (WARN_ON((obj->ops->flags & I915_GEM_OBJECT_HAS_STRUCT_PAGE) == 0))
?
Quoted 6 lines
drivers/gpu/drm/i915/i915_gem.c +0
-1return -EINVAL ;if (!(obj->base.read_domains &I915_GEM_DOMAIN_CPU )) { --2.7.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 37 lines · Kristian Høgsberg
Quoted 35 lines · Ben Widawsky
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.It is equally feasible to simply remove the check altogether. You'll probably oops with
get_pagessomewhere, but that's okay IMO because this condition should be a driver bug, and not trigger-able by userspace. On this note, the function name could probably benefit from a change, but whatever.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Jordan Justen <[email protected]>Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (!obj->ops->get_pages)
Don't all subclasses have a get_pages() function?
Quoted 6 lines
Do we want to do what Chris did in
a2a4f916c2f344d4e596c875dd1e66764afec8b8(on drm-intel-fixes):+ if (
WARN_ON((obj->ops->flags & I915_GEM_OBJECT_HAS_STRUCT_PAGE) == 0))?
Yes, I think so; i915_gem_shmem_pread() is going to walk the sglist, so the object had better have a page array for it to iterate over.
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 38 lines · Dave Gordon
Quoted 37 lines · Kristian Høgsberg
Quoted 35 lines · Ben Widawsky
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.It is equally feasible to simply remove the check altogether. You'll probably oops with
get_pagessomewhere, but that's okay IMO because this condition should be a driver bug, and not trigger-able by userspace. On this note, the function name could probably benefit from a change, but whatever.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Jordan Justen <[email protected]>Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
Quoted 6 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (!obj->ops->get_pages)Don't all subclasses have a
get_pages()function?
Yeah, as I said in the commit message, I didn't think this was particularly appealing, but I figured people would say something if I removed everything. I wasn't aware of Chris' patch.
Quoted 4 lines
Quoted 4 lines
Do we want to do what Chris did in
a2a4f916c2f344d4e596c875dd1e66764afec8b8(on drm-intel-fixes):
Quoted 9 lines
Quoted 3 lines
+ if (
WARN_ON((obj->ops->flags & I915_GEM_OBJECT_HAS_STRUCT_PAGE) == 0))?
Yes, I think so;
i915_gem_shmem_pread()is going to walk the sglist, so the object had better have a page array for it to iterate over..Dave.
Okay. I'll send v2. Thanks.
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915: Check for get_pages instead of shmem (filp)
In reply to Ben WidawskyThis behavior of checking for a shmem backed GEM object was introduced here:
commit 4c914c0c7c787b8f730128a8cdcca9c50b0784ab
Author: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800
drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through copy_batch() in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr calls drm_gem_private_object_init() which explicitly sets the filp to none.
NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from a2a4f916c2f (Kristian, Dave Gordon)
--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, *needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))return -EINVAL ;if (!(obj->base.read_domains &I915_GEM_DOMAIN_CPU )) {
Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Do you guys get the CI mails? This version has regressions. v1 did not. I don't know what to trust.
Quoted 44 lines · Ben Widawsky
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from
a2a4f916c2f(Kristian, Dave Gordon)Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Dave Gordon <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Tested-by Jordan Justen <[email protected]> (v1)Reviewed-by Jordan Justen <[email protected]> (v1)--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +1
-1@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, *needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))return -EINVAL ;if (!(obj->base.read_domains &I915_GEM_DOMAIN_CPU )) {Signature · 1 line
2.7.0
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · Ben Widawsky
Do you guys get the CI mails? This version has regressions. v1 did not. I don't know what to trust.
I didn't even see v2 itself!
Quoted 36 lines · Ben Widawsky
Quoted 35 lines
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from
a2a4f916c2f(Kristian, Dave Gordon)Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Dave Gordon <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Tested-by Jordan Justen <[email protected]> (v1)Reviewed-by Jordan Justen <[email protected]> (v1)--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))
Don't use WARN_ON, there is code (or will be) where we use prepare_shmem_read/write to determine if we can use the shmem paths.
Also i915_gem_obj_prepare_shmem_write() requires the same treatment.
My apologies I had this patch but appear to have accidentally squashed it whilst rebasing. Thanks!
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 50 lines · Chris Wilson
Quoted 2 lines · Ben Widawsky
Do you guys get the CI mails? This version has regressions. v1 did not. I don't know what to trust.
I didn't even see v2 itself!
Quoted 36 lines · Ben Widawsky
Quoted 35 lines
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from
a2a4f916c2f(Kristian, Dave Gordon)Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Dave Gordon <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Tested-by Jordan Justen <[email protected]> (v1)Reviewed-by Jordan Justen <[email protected]> (v1)--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))Don't use
WARN_ON, there is code (or will be) where we use prepare_shmem_read/write to determine if we can use the shmem paths.
Quoted 6 lines
Also
i915_gem_obj_prepare_shmem_write()requires the same treatment.My apologies I had this patch but appear to have accidentally squashed it whilst rebasing. Thanks!
-Chris
So... is someone going to land this fix? We need it.
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 51 lines · Ben Widawsky
Quoted 50 lines · Chris Wilson
Quoted 2 lines · Ben Widawsky
Do you guys get the CI mails? This version has regressions. v1 did not. I don't know what to trust.
I didn't even see v2 itself!
Quoted 36 lines · Ben Widawsky
Quoted 35 lines
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from
a2a4f916c2f(Kristian, Dave Gordon)Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Dave Gordon <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Tested-by Jordan Justen <[email protected]> (v1)Reviewed-by Jordan Justen <[email protected]> (v1)--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))Don't use
WARN_ON, there is code (or will be) where we use prepare_shmem_read/write to determine if we can use the shmem paths.
Quoted 8 lines
Quoted 6 lines
Also
i915_gem_obj_prepare_shmem_write()requires the same treatment.My apologies I had this patch but appear to have accidentally squashed it whilst rebasing. Thanks!
-ChrisSo... is someone going to land this fix? We need it.
Queued for -next, thanks for the patch. Aside: We have about 15 committers by now, Chris being one of them. No need to hang in there waiting for lazy me to undig myself from the latest CI fire.
-Daniel
Quoted 7 lines
Signature · 6 lines
-- Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Ben Widawsky
Quoted 42 lines · Chris Wilson
Quoted 2 lines · Ben Widawsky
Do you guys get the CI mails? This version has regressions. v1 did not. I don't know what to trust.
I didn't even see v2 itself!
Quoted 36 lines · Ben Widawsky
Quoted 35 lines
This behavior of checking for a shmem backed GEM object was introduced here:
commit4c914c0c7c787b8f730128a8cdcca9c50b0784abAuthor: Brad Volkin <[email protected]> Date: Tue Feb 18 10:15:45 2014 -0800drm/i915: Refactor shmem pread setup
It is possible for an object to not be a shmem backed GEM object (for example userptr objects). An example of how we hit this failure can be found through
copy_batch()in the command parser because we allocate a userptr object for the batch which contains privileged instructions. Userptr callsdrm_gem_private_object_init()which explicitly sets the filp to none.NOTE: I manually retyped this from a test machine. So I haven't even compiled this exact patch.
v2: Use same logic as from
a2a4f916c2f(Kristian, Dave Gordon)Cc Chris Wilson <[email protected]>Cc Kristian Høgsberg <[email protected]>Cc Dave Gordon <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Tested-by Jordan Justen <[email protected]> (v1)Reviewed-by Jordan Justen <[email protected]> (v1)--- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem.c +0
-0@@ -489,7 +489,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj, · line 492
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-1*needs_clflush =0 ; -if (!obj->base.filp) +if (WARN_ON ((obj->ops->flags &I915_GEM_OBJECT_HAS_STRUCT_PAGE ) ==0 ))
It looks like the above code can't be reached? 'filp' is tested in i915_gem_pread_ioctl(), before i915_gem_obj_prepare_shmem_read() is called!
Quoted 4 lines
Quoted 4 lines
Don't use
WARN_ON, there is code (or will be) where we use prepare_shmem_read/write to determine if we can use the shmem paths.Also
i915_gem_obj_prepare_shmem_write()requires the same treatment.
No such function, but there's a 'filp' test in i915_gem_pwrite_ioctl().
Also, what about i915_gem_mmap_ioctl() ? Is mmap() also going to be legitimate without a file pointer?
Quoted 5 lines
Quoted 3 lines
My apologies I had this patch but appear to have accidentally squashed it whilst rebasing. Thanks!
-ChrisSo... is someone going to land this fix? We need it.
Looks like Chris wants this to read
if (!(obj->ops->flags & I915_GEM_OBJECT_HAS_STRUCT_PAGE))
return -EINVAL;leaving it to the caller to decide whether to log a complaint. I'm happy with that.
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: Check for get_pages instead of shmem (filp) (rev2)
In reply to Ben Widawsky== Summary ==
== Summary ==
Series 3145v2 drm/i915: Check for get_pages instead of shmem (filp)
http://patchwork.freedesktop.org/api/1.0/series/3145/revisions/2/mbox/
Test pm_rpm:
Subgroup basic-pci-d3-state:
fail -> PASS (hsw-gt2)
pass -> DMESG-WARN (byt-nuc)
Subgroup basic-rte:
dmesg-warn -> PASS (bsw-nuc-2)
dmesg-warn -> PASS (byt-nuc) UNSTABLEbdw-nuci7 total:161 pass:152 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:164 pass:152 dwarn:0 dfail:0 fail:0 skip:12 bsw-nuc-2 total:164 pass:136 dwarn:0 dfail:0 fail:0 skip:28 byt-nuc total:164 pass:140 dwarn:1 dfail:0 fail:0 skip:23 hsw-brixbox total:164 pass:151 dwarn:0 dfail:0 fail:0 skip:13 hsw-gt2 total:164 pass:154 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:164 pass:116 dwarn:0 dfail:0 fail:0 skip:48 ivb-t430s total:164 pass:150 dwarn:0 dfail:0 fail:0 skip:14 snb-dellxps total:164 pass:142 dwarn:0 dfail:0 fail:0 skip:22 snb-x220t total:164 pass:142 dwarn:0 dfail:0 fail:1 skip:21
Results at /archive/results/CI_IGT_test/Patchwork_1385/
d9bd337b4b2d46f73005fcdf0e7049e7f8ed5c04 drm-intel-nightly: 2016y-02m-09d-15h-42m-46s UTC integration manifest cb1f5a551af8b6b2f3f75a322a70df5891eee393 drm/i915: Check for get_pages instead of shmem (filp)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for drm/i915: Check for get_pages instead of shmem (filp) (rev2)
Quoted 9 lines · Patchwork
== Summary ==
Series 3145v2 drm/i915: Check for
get_pagesinstead of shmem (filp)
http://patchwork.freedesktop.org/api/1.0/series/3145/revisions/2/mbox/Test
pm_rpm:Subgroup basic-pci-d3-state: fail -> PASS (hsw-gt2) pass -> DMESG-WARN (byt-nuc)
Known fail: https://bugs.freedesktop.org/show_bug.cgi?id=93121
I really should simply merge the patch to shut this all up. -Daniel
Quoted 24 lines
Subgroup basic-rte: dmesg-warn -> PASS (bsw-nuc-2) dmesg-warn -> PASS (byt-nuc) UNSTABLEbdw-nuci7 total:161 pass:152 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:164 pass:152 dwarn:0 dfail:0 fail:0 skip:12 bsw-nuc-2 total:164 pass:136 dwarn:0 dfail:0 fail:0 skip:28 byt-nuc total:164 pass:140 dwarn:1 dfail:0 fail:0 skip:23 hsw-brixbox total:164 pass:151 dwarn:0 dfail:0 fail:0 skip:13 hsw-gt2 total:164 pass:154 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:164 pass:116 dwarn:0 dfail:0 fail:0 skip:48 ivb-t430s total:164 pass:150 dwarn:0 dfail:0 fail:0 skip:14 snb-dellxps total:164 pass:142 dwarn:0 dfail:0 fail:0 skip:22 snb-x220t total:164 pass:142 dwarn:0 dfail:0 fail:1 skip:21Results at /archive/results/CI_IGT_test/Patchwork_1385/
d9bd337b4b2d46f73005fcdf0e7049e7f8ed5c04drm-intel-nightly: 2016y-02m-09d-15h-42m-46s UTC integration manifestcb1f5a551af8b6b2f3f75a322a70df5891eee393drm/i915: Check forget_pagesinstead of shmem (filp)_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx