• Chris Wilson's avatar
    drm/i915: Allocate a status page for each timeline · 52954edd
    Chris Wilson authored
    Allocate a page for use as a status page by a group of timelines, as we
    only need a dword of storage for each (rounded up to the cacheline for
    safety) we can pack multiple timelines into the same page. Each timeline
    will then be able to track its own HW seqno.
    
    v2: Reuse the common per-engine HWSP for the solitary ringbuffer
    timeline, so that we do not have to emit (using per-gen specialised
    vfuncs) the breadcrumb into the distinct timeline HWSP and instead can
    keep on using the common MI_STORE_DWORD_INDEX. However, to maintain the
    sleight-of-hand for the global/per-context seqno switchover, we will
    store both temporarily (and so use a custom offset for the shared timeline
    HWSP until the switch over).
    
    v3: Keep things simple and allocate a page for each timeline, page
    sharing comes next.
    
    v4: I was caught repeating the same MI_STORE_DWORD_IMM over and over
    again in selftests.
    
    v5: And caught red handed copying create timeline + check.
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190128181812.22804-3-chris@chris-wilson.co.uk
    52954edd
intel_engine_cs.c 44.4 KB