drm/i915: Execlists cannot pin a context without the object
diff mbox

Message ID 1456485751-15213-1-git-send-email-tvrtko.ursulin@linux.intel.com
State New
Headers show

Commit Message

Tvrtko Ursulin Feb. 26, 2016, 11:22 a.m. UTC
From: Chris Wilson <chris@chris-wilson.co.uk>

Given that the intel_lr_context_pin cannot succeed without the object,
we cannot reach intel_lr_context_unpin() without first allocating that
object - so we can remove the redundant test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Tvrtko Ursulin Feb. 26, 2016, 1:13 p.m. UTC | #1
On 26/02/16 12:28, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Execlists cannot pin a context without the object
> URL   : https://patchwork.freedesktop.org/series/3845/
> State : failure
>
> == Summary ==
>
> Series 3845v1 drm/i915: Execlists cannot pin a context without the object
> http://patchwork.freedesktop.org/api/1.0/series/3845/revisions/1/mbox/
>
> Test drv_module_reload_basic:
>                  fail       -> PASS       (snb-dellxps)
> Test gem_sync:
>          Subgroup basic-bsd:
>                  pass       -> DMESG-FAIL (ilk-hp8440p)

New unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94307

> Test kms_force_connector_basic:
>          Subgroup force-load-detect:
>                  fail       -> DMESG-FAIL (ivb-t430s)

New unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94306

> Test kms_pipe_crc_basic:
>          Subgroup suspend-read-crc-pipe-b:
>                  pass       -> INCOMPLETE (hsw-gt2)

???

> Test pm_rpm:
>          Subgroup basic-rte:
>                  pass       -> FAIL       (bdw-nuci7)
>
> bdw-nuci7        total:165  pass:153  dwarn:0   dfail:0   fail:1   skip:11
> bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14
> bsw-nuc-2        total:168  pass:137  dwarn:0   dfail:0   fail:1   skip:30
> byt-nuc          total:168  pass:143  dwarn:0   dfail:0   fail:0   skip:25
> hsw-brixbox      total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14
> hsw-gt2          total:79   pass:75   dwarn:0   dfail:0   fail:0   skip:3
> ilk-hp8440p      total:168  pass:117  dwarn:0   dfail:1   fail:1   skip:49
> ivb-t430s        total:168  pass:153  dwarn:0   dfail:1   fail:0   skip:14
> skl-i7k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0   skip:16
> snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1   skip:22
> snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2   skip:21
>
> Results at /archive/results/CI_IGT_test/Patchwork_1482/
>
> 3401f93d4f525073bfea774c7d5bb927497effd9 drm-intel-nightly: 2016y-02m-26d-11h-30m-51s UTC integration manifest
> 0d643e82fdf6ddd553bf220d1319a560a00c5957 drm/i915: Execlists cannot pin a context without the object
>
>

Regards,

Tvrtko
Tvrtko Ursulin Feb. 26, 2016, 1:51 p.m. UTC | #2
On 26/02/16 13:13, Tvrtko Ursulin wrote:
>
>
> On 26/02/16 12:28, Patchwork wrote:
>> == Series Details ==
>>
>> Series: drm/i915: Execlists cannot pin a context without the object
>> URL   : https://patchwork.freedesktop.org/series/3845/
>> State : failure
>>
>> == Summary ==
>>
>> Series 3845v1 drm/i915: Execlists cannot pin a context without the object
>> http://patchwork.freedesktop.org/api/1.0/series/3845/revisions/1/mbox/
>>
>> Test drv_module_reload_basic:
>>                  fail       -> PASS       (snb-dellxps)
>> Test gem_sync:
>>          Subgroup basic-bsd:
>>                  pass       -> DMESG-FAIL (ilk-hp8440p)
>
> New unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94307
>
>> Test kms_force_connector_basic:
>>          Subgroup force-load-detect:
>>                  fail       -> DMESG-FAIL (ivb-t430s)
>
> New unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94306
>
>> Test kms_pipe_crc_basic:
>>          Subgroup suspend-read-crc-pipe-b:
>>                  pass       -> INCOMPLETE (hsw-gt2)
>
> ???
>
>> Test pm_rpm:
>>          Subgroup basic-rte:
>>                  pass       -> FAIL       (bdw-nuci7)
>>
>> bdw-nuci7        total:165  pass:153  dwarn:0   dfail:0   fail:1
>> skip:11
>> bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0
>> skip:14
>> bsw-nuc-2        total:168  pass:137  dwarn:0   dfail:0   fail:1
>> skip:30
>> byt-nuc          total:168  pass:143  dwarn:0   dfail:0   fail:0
>> skip:25
>> hsw-brixbox      total:168  pass:154  dwarn:0   dfail:0   fail:0
>> skip:14
>> hsw-gt2          total:79   pass:75   dwarn:0   dfail:0   fail:0   skip:3
>> ilk-hp8440p      total:168  pass:117  dwarn:0   dfail:1   fail:1
>> skip:49
>> ivb-t430s        total:168  pass:153  dwarn:0   dfail:1   fail:0
>> skip:14
>> skl-i7k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0
>> skip:16
>> snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1
>> skip:22
>> snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2
>> skip:21
>>
>> Results at /archive/results/CI_IGT_test/Patchwork_1482/
>>
>> 3401f93d4f525073bfea774c7d5bb927497effd9 drm-intel-nightly:
>> 2016y-02m-26d-11h-30m-51s UTC integration manifest
>> 0d643e82fdf6ddd553bf220d1319a560a00c5957 drm/i915: Execlists cannot
>> pin a context without the object

Merged, thanks for the patch!

Regards,

Tvrtko

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 3a03646e343d..f0a57afc8dff 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1144,10 +1144,6 @@  void intel_lr_context_unpin(struct intel_context *ctx,
 	struct drm_i915_gem_object *ctx_obj = ctx->engine[engine->id].state;
 
 	WARN_ON(!mutex_is_locked(&ctx->i915->dev->struct_mutex));
-
-	if (WARN_ON_ONCE(!ctx_obj))
-		return;
-
 	if (--ctx->engine[engine->id].pin_count == 0) {
 		kunmap(kmap_to_page(ctx->engine[engine->id].lrc_reg_state));
 		intel_unpin_ringbuffer_obj(ctx->engine[engine->id].ringbuf);