From patchwork Fri Sep 4 16:59:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 7124881 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 14DEE9F1D5 for ; Fri, 4 Sep 2015 17:01:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 346DB206A0 for ; Fri, 4 Sep 2015 17:01:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5B1A820636 for ; Fri, 4 Sep 2015 17:01:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A74567A1BA; Fri, 4 Sep 2015 10:00:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy7-pub.mail.unifiedlayer.com (gproxy7-pub.mail.unifiedlayer.com [70.40.196.235]) by gabe.freedesktop.org (Postfix) with SMTP id 10A596EC25 for ; Fri, 4 Sep 2015 10:00:57 -0700 (PDT) Received: (qmail 8010 invoked by uid 0); 4 Sep 2015 17:00:55 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy7.mail.unifiedlayer.com with SMTP; 4 Sep 2015 17:00:55 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by cmgw4 with id D50f1r0172UhLwi0150iJa; Fri, 04 Sep 2015 11:00:55 -0600 X-Authority-Analysis: v=2.1 cv=QdD14Krv c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=noBwr2J6l1kA:10 a=ff-B7xzCdYMA:10 a=_oVt_Cx_qAcdzRVAAJUA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=airwUzgPdk5ipuXoXFcPT1anz9gs2FU+VKFEhhTQ2Sw=; b=YpqiqfV17wR34Ek3CaKoZa0yX9taX22cn+1R5y0YTgB2GLDfW/9kvwEqMU4cTlOlxtWWzyy3yXLCAp5ZO6D1FBJDjvC97Csyb1YNW4EDxAnpChvqNRhyubgtNAc5Dasz; Received: from [67.161.37.189] (port=52804 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.84) (envelope-from ) id 1ZXuLv-0003Ni-La; Fri, 04 Sep 2015 11:00:39 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Fri, 4 Sep 2015 09:59:01 -0700 Message-Id: <1441385943-11508-8-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441385943-11508-1-git-send-email-jbarnes@virtuousgeek.org> References: <1441385943-11508-1-git-send-email-jbarnes@virtuousgeek.org> X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: dwmw2@infradead.org Subject: [Intel-gfx] [PATCH 7/9] drm/i915: add fences to the request struct X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This simplifies the sync code quite a bit. I don't think we'll be able to get away with using the core fence code's seqno support, since we'll be moving away from simple seqno comparisions with the scheduler and preemption, but the additional code is pretty minimal anyway, and lets us add additional debugging as needed, so it's probably fine to keep either way. We still need to add support for other rings here; we ought to be able to do that with the timeline field of the ioctl (which will include other "rings" like the display flip queue for example). Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index ca38a7a..f4a363d 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -51,6 +51,7 @@ #include #include #include +#include #include "intel_guc.h" /* General customization: @@ -2286,6 +2287,10 @@ struct drm_i915_gem_request { /** Execlists no. of times this request has been sent to the ELSP */ int elsp_submitted; + /* core fence obj for this request, may be exported */ + struct fence fence; + + wait_queue_t wait; }; int i915_gem_request_alloc(struct intel_engine_cs *ring,