[Intel-gfx] [PATCH 7/7] drm/i915: Mark elsps submitted when they are pushed to hw

Chris Wilson chris at chris-wilson.co.uk
Fri Jul 3 08:36:50 PDT 2015


On Fri, Jul 03, 2015 at 05:09:38PM +0300, Mika Kuoppala wrote:
> Now when we have requests this deep on call chain, we
> can mark the elsp being submitted when it actually is.
> While we are it, remove unnecessary temp assignment as
> it is already initialized as zero.

Bah, which I think is bad practice (because when looking at patch contexts
like this, you have no idea if that is true or not as you can't see the
value). You could reduce the number of writes if you wanted to. Personally
I went with

        uint32_t desc[4];

        if (ring->execlist_port[1]) {
                desc[0] = execlists_request_write_tail(ring,
                                                       ring->execlist_port[1]);
                desc[1] = ring->execlist_port[1]->seqno;
        } else
                desc[1] = desc[0] = 0;

        desc[2] = execlists_request_write_tail(ring, ring->execlist_port[0]);
        desc[3] = ring->execlist_port[0]->seqno;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list