All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling
@ 2017-05-17 12:41 Mika Kuoppala
  2017-05-17 12:54 ` Chris Wilson
  2017-05-17 13:54 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Mika Kuoppala @ 2017-05-17 12:41 UTC (permalink / raw)
  To: intel-gfx

The dma_buf_vmap in itself warns on error and then downgrades
the return value from error ptr to NULL. Don't try to decode error
value from the return in our test.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
index d15cc9d3a5cd..89dc25a5a53b 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c
@@ -246,9 +246,9 @@ static int igt_dmabuf_export_vmap(void *arg)
 	i915_gem_object_put(obj);
 
 	ptr = dma_buf_vmap(dmabuf);
-	if (IS_ERR(ptr)) {
-		err = PTR_ERR(ptr);
-		pr_err("dma_buf_vmap failed with err=%d\n", err);
+	if (!ptr) {
+		pr_err("dma_buf_vmap failed\n");
+		err = -ENOMEM;
 		goto out;
 	}
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling
  2017-05-17 12:41 [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling Mika Kuoppala
@ 2017-05-17 12:54 ` Chris Wilson
  2017-05-17 14:49   ` Mika Kuoppala
  2017-05-17 13:54 ` ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2017-05-17 12:54 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Wed, May 17, 2017 at 03:41:49PM +0300, Mika Kuoppala wrote:
> The dma_buf_vmap in itself warns on error and then downgrades
> the return value from error ptr to NULL. Don't try to decode error
> value from the return in our test.
> 

Actually dma_buf_vmap shouldn't be WARNing here, so go fix that instead.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/selftest: Fix dma_buf_vmap error handling
  2017-05-17 12:41 [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling Mika Kuoppala
  2017-05-17 12:54 ` Chris Wilson
@ 2017-05-17 13:54 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-05-17 13:54 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftest: Fix dma_buf_vmap error handling
URL   : https://patchwork.freedesktop.org/series/24561/
State : success

== Summary ==

Series 24561v1 drm/i915/selftest: Fix dma_buf_vmap error handling
https://patchwork.freedesktop.org/api/1.0/series/24561/revisions/1/mbox/

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:445s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:592s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:510s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:491s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:484s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:420s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:415s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:424s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:498s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:458s
fi-kbl-7500u     total:278  pass:255  dwarn:5   dfail:0   fail:0   skip:18  time:465s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:457s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:570s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:471s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:497s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:440s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:535s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time:404s
fi-bdw-gvtdvm failed to connect after reboot

2a803862b93e594c668bd2c48b9d84e5c9dd6607 drm-tip: 2017y-05m-17d-12h-46m-57s UTC integration manifest
fbc7a75 drm/i915/selftest: Fix dma_buf_vmap error handling

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4723/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling
  2017-05-17 12:54 ` Chris Wilson
@ 2017-05-17 14:49   ` Mika Kuoppala
  0 siblings, 0 replies; 4+ messages in thread
From: Mika Kuoppala @ 2017-05-17 14:49 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> On Wed, May 17, 2017 at 03:41:49PM +0300, Mika Kuoppala wrote:
>> The dma_buf_vmap in itself warns on error and then downgrades
>> the return value from error ptr to NULL. Don't try to decode error
>> value from the return in our test.
>> 
>
> Actually dma_buf_vmap shouldn't be WARNing here, so go fix that
> instead.

Regarless of warn, we have mixed use of null and errptr checks
in the test. So eventually it might be best to return errptr
from dma_buf_vmap along of fixing the WARN.

But as discussed in irc, this might not bring much value.
-Mika
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-17 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 12:41 [PATCH] drm/i915/selftest: Fix dma_buf_vmap error handling Mika Kuoppala
2017-05-17 12:54 ` Chris Wilson
2017-05-17 14:49   ` Mika Kuoppala
2017-05-17 13:54 ` ✓ Fi.CI.BAT: success for " Patchwork

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.