]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Track which ring a context ran on
authorBen Widawsky <ben@bwidawsk.net>
Fri, 6 Dec 2013 22:11:02 +0000 (14:11 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Dec 2013 14:27:54 +0000 (15:27 +0100)
commit2a185b09d585485d86af9ebebbbc3d85b9aae2c0
treef772771a86a606a310102325ecb86e41ea9f8866
parentf94b5b1a46c1c6041d1355e3b866e869f7ae403e
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.

As a result, we no longer need to track which ring a context "belongs"
to, as it never really made much sense anyway.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c