]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/i915: Assert that we do create the deferred context
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 5 Jan 2017 15:30:20 +0000 (15:30 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 5 Jan 2017 15:34:41 +0000 (15:34 +0000)
In order to convince static analyzers that the allocation function
returns an error or sets ce->state, assert that it is set afterwards.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c

index 22797882032046aac43e8c661dfcdfd121453d98..51ecb395551b98a058d6981905aef85bafdc4fa6 100644 (file)
@@ -781,6 +781,7 @@ static int execlists_context_pin(struct intel_engine_cs *engine,
                if (ret)
                        goto err;
        }
+       GEM_BUG_ON(!ce->state);
 
        flags = PIN_GLOBAL;
        if (ctx->ggtt_offset_bias)