• Oscar Mateo's avatar
    drm/i915/bdw: Deferred creation of user-created LRCs · ec3e9963
    Oscar Mateo authored
    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: default avatarOscar Mateo <oscar.mateo@intel.com>
    Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    ec3e9963
i915_gem_execbuffer.c 41.5 KB