public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Fix up ERR_PTR handling for pinning the ringbuffer
@ 2016-04-12 13:32 Chris Wilson
  2016-04-12 13:32 ` [PATCH 2/2] drm/i915: Mark obj->mapping as dirtying the backing storage Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Chris Wilson @ 2016-04-12 13:32 UTC (permalink / raw)
  To: intel-gfx

In commit 0a798eb92e6dcc1cba45d13d7b75a523e5d0fc4c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Apr 8 12:11:11 2016 +0100

    drm/i915: Refactor duplicate object vmap functions

the vmap function that returned NULL on error was replaced by one that
returned an error pointer instead. Not all callsites were updated...

Reported-by: Dave Gordon <david.s.gordon@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Gordon <david.s.gordon@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 41b604e69db7..15064a8f706b 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2108,8 +2108,9 @@ int intel_pin_and_map_ringbuffer_obj(struct drm_device *dev,
 			goto err_unpin;
 
 		ringbuf->virtual_start = i915_gem_object_pin_map(obj);
-		if (ringbuf->virtual_start == NULL) {
-			ret = -ENOMEM;
+		if (IS_ERR(ringbuf->virtual_start)) {
+			ret = PTR_ERR(ringbuf->virtual_start);
+			ringbuf->virtual_start = NULL;
 			goto err_unpin;
 		}
 	} else {
-- 
2.8.0.rc3

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

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

end of thread, other threads:[~2016-04-21 10:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12 13:32 [PATCH 1/2] drm/i915: Fix up ERR_PTR handling for pinning the ringbuffer Chris Wilson
2016-04-12 13:32 ` [PATCH 2/2] drm/i915: Mark obj->mapping as dirtying the backing storage Chris Wilson
2016-04-12 15:18   ` Chris Wilson
2016-04-20 19:38     ` Dave Gordon
2016-04-21 10:02     ` Dave Gordon
2016-04-12 13:46 ` [PATCH] drm/i915: check for ERR_PTR from i915_gem_object_pin_map() Dave Gordon
2016-04-12 13:53   ` Chris Wilson
2016-04-12 16:03 ` ✗ Fi.CI.BAT: failure for series starting with drm/i915: check for ERR_PTR from i915_gem_object_pin_map() (rev2) Patchwork
2016-04-12 16:29   ` Dave Gordon
2016-04-20 16:01     ` Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox