• Oscar Mateo's avatar
    drm/i915: Remove ctx->last_ring · 14d8ec54
    Oscar Mateo authored
    The original comment that introduced it said:
    
    commit 0009e46c
    Author: Ben Widawsky <ben@bwidawsk.net>
    Date:   Fri Dec 6 14:11:02 2013 -0800
    
        drm/i915: Track which ring a context ran on
    
        Previously we dropped the association of a context to a ring. It is
        however very important to know which ring a context ran on (we could
        have reused the other member, but I was nitpicky).
    
        This is very important when we switch address spaces, which unlike
        context objects, do change per ring.
    
        As an example, if we have:
    
                RCS   BCS
        ctx            A
        ctx      A
        ctx      B
        ctx            B
    
        Without tracking the last ring B ran on, we wouldn't know to switch the
        address space on BCS in the last row.
    
    But this is not really true, because we are already checking to != from (with
    "from" being = ring->last_context) and that should be enough to make sure we
    switch to the right address space.
    
    We would have a problem if we switched the context object for every ring (since
    then we would fail to do it in some situations) but we only switch it for the
    render ring, so we don't care.
    Signed-off-by: default avatarOscar Mateo <oscar.mateo@intel.com>
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    14d8ec54
i915_gem_context.c 23.3 KB