[1/2] drm/i915: Fix up ERR_PTR handling for pinning the ringbuffer

Submitted by Chris Wilson on April 12, 2016, 1:32 p.m.

Details

Message ID 1460467951-9716-1-git-send-email-chris@chris-wilson.co.uk
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Chris Wilson April 12, 2016, 1:32 p.m.
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(-)

Patch hide | download patch | download mbox

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 {

Comments

On 12/04/16 17:03, Patchwork wrote:
> == Series Details ==
>
> Series: series starting with drm/i915: check for ERR_PTR from i915_gem_object_pin_map() (rev2)
> URL   : https://patchwork.freedesktop.org/series/5591/
> State : failure
>
> == Summary ==
>
> Series 5591v2 Series without cover letter
> http://patchwork.freedesktop.org/api/1.0/series/5591/revisions/2/mbox/
>
> Test kms_flip:
>          Subgroup basic-flip-vs-wf_vblank:
>                  pass       -> FAIL       (snb-x220t)

https://bugs.freedesktop.org/show_bug.cgi?id=94294

"basic-flip-vs-wf_vblank timestamp vs. seq counter difference"

> bdw-nuci7        total:203  pass:191  dwarn:0   dfail:0   fail:0   skip:12
> bdw-ultra        total:203  pass:180  dwarn:0   dfail:0   fail:0   skip:23
> bsw-nuc-2        total:202  pass:162  dwarn:1   dfail:0   fail:0   skip:39
> byt-nuc          total:202  pass:164  dwarn:0   dfail:0   fail:0   skip:38
> hsw-brixbox      total:203  pass:179  dwarn:0   dfail:0   fail:0   skip:24
> hsw-gt2          total:203  pass:184  dwarn:0   dfail:0   fail:0   skip:19
> ivb-t430s        total:203  pass:175  dwarn:0   dfail:0   fail:0   skip:28
> skl-i7k-2        total:203  pass:178  dwarn:0   dfail:0   fail:0   skip:25
> skl-nuci5        total:203  pass:192  dwarn:0   dfail:0   fail:0   skip:11
> snb-x220t        total:203  pass:164  dwarn:0   dfail:0   fail:2   skip:37
> BOOT FAILED for ilk-hp8440p
> BOOT FAILED for snb-dellxps
>
> Results at /archive/results/CI_IGT_test/Patchwork_1872/
>
> d89f227a17b175fce74e11b2d5fa2a41f86fc489 drm-intel-nightly: 2016y-04m-12d-13h-31m-26s UTC integration manifest
> 33d810a drm/i915: Mark obj->mapping as dirtying the backing storage
> 0d172b1 drm/i915: check for ERR_PTR from i915_gem_object_pin_map()
>
On 12/04/16 17:29, Dave Gordon wrote:
> On 12/04/16 17:03, Patchwork wrote:
>> == Series Details ==
>>
>> Series: series starting with drm/i915: check for ERR_PTR from
>> i915_gem_object_pin_map() (rev2)
>> URL   : https://patchwork.freedesktop.org/series/5591/
>> State : failure
>>
>> == Summary ==
>>
>> Series 5591v2 Series without cover letter
>> http://patchwork.freedesktop.org/api/1.0/series/5591/revisions/2/mbox/
>>
>> Test kms_flip:
>>          Subgroup basic-flip-vs-wf_vblank:
>>                  pass       -> FAIL       (snb-x220t)
>
> https://bugs.freedesktop.org/show_bug.cgi?id=94294
>
> "basic-flip-vs-wf_vblank timestamp vs. seq counter difference"
>
>> bdw-nuci7        total:203  pass:191  dwarn:0   dfail:0   fail:0
>> skip:12
>> bdw-ultra        total:203  pass:180  dwarn:0   dfail:0   fail:0
>> skip:23
>> bsw-nuc-2        total:202  pass:162  dwarn:1   dfail:0   fail:0
>> skip:39
>> byt-nuc          total:202  pass:164  dwarn:0   dfail:0   fail:0
>> skip:38
>> hsw-brixbox      total:203  pass:179  dwarn:0   dfail:0   fail:0
>> skip:24
>> hsw-gt2          total:203  pass:184  dwarn:0   dfail:0   fail:0
>> skip:19
>> ivb-t430s        total:203  pass:175  dwarn:0   dfail:0   fail:0
>> skip:28
>> skl-i7k-2        total:203  pass:178  dwarn:0   dfail:0   fail:0
>> skip:25
>> skl-nuci5        total:203  pass:192  dwarn:0   dfail:0   fail:0
>> skip:11
>> snb-x220t        total:203  pass:164  dwarn:0   dfail:0   fail:2
>> skip:37
>> BOOT FAILED for ilk-hp8440p
>> BOOT FAILED for snb-dellxps
>>
>> Results at /archive/results/CI_IGT_test/Patchwork_1872/
>>
>> d89f227a17b175fce74e11b2d5fa2a41f86fc489 drm-intel-nightly:
>> 2016y-04m-12d-13h-31m-26s UTC integration manifest
>> 33d810a drm/i915: Mark obj->mapping as dirtying the backing storage
>> 0d172b1 drm/i915: check for ERR_PTR from i915_gem_object_pin_map()

Merged the first one, thanks for the patch and review.

Regards,

Tvrtko