]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/bdw: Deferred creation of user-created LRCs
authorOscar Mateo <oscar.mateo@intel.com>
Thu, 24 Jul 2014 16:04:18 +0000 (17:04 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 11 Aug 2014 14:25:58 +0000 (16:25 +0200)
commitd27550d9da8ff212ba010a55d06b24db046550ae
treec73cbed0cc14a4f51bf0ebdf4447b2e207f9b370
parent7a76b493e68d55cd80853cbb9b8cf6bf0d6859cb
drm/i915/bdw: Deferred creation of user-created LRCs

The backing objects and ringbuffers for contexts created via open
fd are actually empty until the user starts sending execbuffers to
them. At that point, we allocate & populate them. We do this because,
at create time, we really don't know which engine is going to be used
with the context later on (and we don't want to waste memory on
objects that we might never use).

v2: As contexts created via ioctl can only be used with the render
ring, we have enough information to allocate & populate them right
away.

v3: Defer the creation always, even with ioctl-created contexts, as
requested by Daniel Vetter.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c