lkml.org 
[lkml]   [2015]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.19.y-ckt 111/155] drm/i915: Flush pipecontrol post-sync writes
    Date
    3.19.8-ckt10 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Chris Wilson <chris@chris-wilson.co.uk>

    commit 40a24488f5250d63341e74b9994159afc4589606 upstream.

    In order to flush the results from in-batch pipecontrol writes (used for
    example in glQuery) before declaring the batch complete (and so declaring
    the query results coherent), we need to set the FlushEnable bit in our
    flushing pipecontrol. The FlushEnable bit "waits until all previous
    writes of immediate data from post-sync circles are complete before
    executing the next command".

    I get GPU hangs on byt without flushing these writes (running ue4).
    piglit has examples where the flush is required for correct rendering.

    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Acked-by: Daniel Vetter <daniel@ffwll.ch>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/gpu/drm/i915/intel_lrc.c | 1 +
    drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++
    2 files changed, 3 insertions(+)

    diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
    index 2c5c00c..ae4e895 100644
    --- a/drivers/gpu/drm/i915/intel_lrc.c
    +++ b/drivers/gpu/drm/i915/intel_lrc.c
    @@ -1277,6 +1277,7 @@ static int gen8_emit_flush_render(struct intel_ringbuffer *ringbuf,
    if (flush_domains) {
    flags |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
    flags |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
    + flags |= PIPE_CONTROL_FLUSH_ENABLE;
    }

    if (invalidate_domains) {
    diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
    index a335b84..2355411 100644
    --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
    +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
    @@ -354,6 +354,7 @@ gen7_render_ring_flush(struct intel_engine_cs *ring,
    if (flush_domains) {
    flags |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
    flags |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
    + flags |= PIPE_CONTROL_FLUSH_ENABLE;
    }
    if (invalidate_domains) {
    flags |= PIPE_CONTROL_TLB_INVALIDATE;
    @@ -427,6 +428,7 @@ gen8_render_ring_flush(struct intel_engine_cs *ring,
    if (flush_domains) {
    flags |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
    flags |= PIPE_CONTROL_DEPTH_CACHE_FLUSH;
    + flags |= PIPE_CONTROL_FLUSH_ENABLE;
    }
    if (invalidate_domains) {
    flags |= PIPE_CONTROL_TLB_INVALIDATE;
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-11-13 00:41    [W:4.241 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site