From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RFC 10/21] drm/i915: Convert 'last_flip_req' to be a request not a seqno Date: Sun, 19 Oct 2014 14:57:35 +0200 Message-ID: <20141019125735.GX26941@phenom.ffwll.local> References: <1412604925-11290-2-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-3-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-4-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-5-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-6-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-7-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-8-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-9-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-10-git-send-email-John.C.Harrison@Intel.com> <1412604925-11290-11-git-send-email-John.C.Harrison@Intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 7641189FEC for ; Sun, 19 Oct 2014 05:57:28 -0700 (PDT) Received: by mail-wi0-f182.google.com with SMTP id n3so4299625wiv.15 for ; Sun, 19 Oct 2014 05:57:27 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1412604925-11290-11-git-send-email-John.C.Harrison@Intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: John.C.Harrison@Intel.com Cc: Intel-GFX@Lists.FreeDesktop.Org List-Id: intel-gfx@lists.freedesktop.org On Mon, Oct 06, 2014 at 03:15:14PM +0100, John.C.Harrison@Intel.com wrote: > From: John Harrison I know there's often not a lot to talk about for if you have a refactoring step that needs to be applied n times. But even then a small commit message to reiterate what is going on and why and a small note if there's anything funky goes a long way. Since in a few months someone will digg out your patch here using git blame and git lock --pickaxe and will be totally lost without the context of the entire series. So each patch really needs to be able to be understood on its own. -Daniel > > For: VIZ-4377 > Signed-off-by: John.C.Harrison@Intel.com > --- > drivers/gpu/drm/i915/intel_overlay.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c > index dc2f4f2..ccd5732 100644 > --- a/drivers/gpu/drm/i915/intel_overlay.c > +++ b/drivers/gpu/drm/i915/intel_overlay.c > @@ -182,7 +182,7 @@ struct intel_overlay { > u32 flip_addr; > struct drm_i915_gem_object *reg_bo; > /* flip handling */ > - uint32_t last_flip_req; > + struct drm_i915_gem_request *last_flip_req; > void (*flip_tail)(struct intel_overlay *); > }; > > @@ -217,17 +217,17 @@ static int intel_overlay_do_wait_request(struct intel_overlay *overlay, > int ret; > > BUG_ON(overlay->last_flip_req); > - ret = i915_add_request(ring, &overlay->last_flip_req); > + ret = i915_add_request(ring, &overlay->last_flip_req->seqno); > if (ret) > return ret; > > overlay->flip_tail = tail; > - ret = i915_wait_seqno(ring, overlay->last_flip_req); > + ret = i915_wait_seqno(ring, i915_gem_request_get_seqno(overlay->last_flip_req)); > if (ret) > return ret; > i915_gem_retire_requests(dev); > > - overlay->last_flip_req = 0; > + overlay->last_flip_req = NULL; > return 0; > } > > @@ -286,7 +286,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay, > intel_ring_emit(ring, flip_addr); > intel_ring_advance(ring); > > - return i915_add_request(ring, &overlay->last_flip_req); > + return i915_add_request(ring, &overlay->last_flip_req->seqno); > } > > static void intel_overlay_release_old_vid_tail(struct intel_overlay *overlay) > @@ -366,10 +366,10 @@ static int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay) > struct intel_engine_cs *ring = &dev_priv->ring[RCS]; > int ret; > > - if (overlay->last_flip_req == 0) > + if (overlay->last_flip_req == NULL) > return 0; > > - ret = i915_wait_seqno(ring, overlay->last_flip_req); > + ret = i915_wait_seqno(ring, i915_gem_request_get_seqno(overlay->last_flip_req)); > if (ret) > return ret; > i915_gem_retire_requests(dev); > @@ -377,7 +377,7 @@ static int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay) > if (overlay->flip_tail) > overlay->flip_tail(overlay); > > - overlay->last_flip_req = 0; > + overlay->last_flip_req = NULL; > return 0; > } > > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch