From patchwork Wed May 9 17:48:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 10390503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E856760318 for ; Wed, 9 May 2018 17:49:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D830A285D4 for ; Wed, 9 May 2018 17:49:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCF8B285D9; Wed, 9 May 2018 17:49:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D1C2285D4 for ; Wed, 9 May 2018 17:49:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 035406ED7A; Wed, 9 May 2018 17:49:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB3CD6ED68 for ; Wed, 9 May 2018 17:49:03 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 10:49:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,382,1520924400"; d="scan'208";a="39960330" Received: from delly.ld.intel.com ([10.103.238.201]) by orsmga008.jf.intel.com with ESMTP; 09 May 2018 10:49:02 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Wed, 9 May 2018 18:48:48 +0100 Message-Id: <20180509174851.13847-6-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509174851.13847-1-lionel.g.landwerlin@intel.com> References: <20180509174851.13847-1-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH v4 5/8] drm/i915: give engine to execlists cancel helper X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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-Virus-Scanned: ClamAV using ClamSMTP We would like to set a value on the associated engine in this helper in a following commit. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 10 +++++----- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c index 2feb65096966..ef914fc926bb 100644 --- a/drivers/gpu/drm/i915/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/intel_guc_submission.c @@ -794,7 +794,7 @@ static void guc_submission_tasklet(unsigned long data) if (execlists_is_active(execlists, EXECLISTS_ACTIVE_PREEMPT) && intel_read_status_page(engine, I915_GEM_HWS_PREEMPT_INDEX) == GUC_PREEMPT_FINISHED) { - execlists_cancel_port_requests(&engine->execlists); + execlists_cancel_port_requests(engine); execlists_unwind_incomplete_requests(execlists); wait_for_guc_preempt_report(engine); diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 6fe0d668c023..a608ff0f9e7a 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -772,8 +772,9 @@ static void execlists_dequeue(struct intel_engine_cs *engine) } void -execlists_cancel_port_requests(struct intel_engine_execlists * const execlists) +execlists_cancel_port_requests(struct intel_engine_cs *engine) { + struct intel_engine_execlists * const execlists = &engine->execlists; struct execlist_port *port = execlists->port; unsigned int num_ports = execlists_num_ports(execlists); @@ -904,7 +905,7 @@ static void execlists_cancel_requests(struct intel_engine_cs *engine) local_irq_save(flags); /* Cancel the requests on the HW and clear the ELSP tracker. */ - execlists_cancel_port_requests(execlists); + execlists_cancel_port_requests(engine); reset_irq(engine); spin_lock(&engine->timeline.lock); @@ -1063,7 +1064,7 @@ static void execlists_submission_tasklet(unsigned long data) buf[2*head + 1] == execlists->preempt_complete_status) { GEM_TRACE("%s preempt-idle\n", engine->name); - execlists_cancel_port_requests(execlists); + execlists_cancel_port_requests(engine); execlists_unwind_incomplete_requests(execlists); GEM_BUG_ON(!execlists_is_active(execlists, @@ -1823,7 +1824,6 @@ static int gen9_init_render_ring(struct intel_engine_cs *engine) static void reset_common_ring(struct intel_engine_cs *engine, struct i915_request *request) { - struct intel_engine_execlists * const execlists = &engine->execlists; unsigned long flags; u32 *regs; @@ -1843,7 +1843,7 @@ static void reset_common_ring(struct intel_engine_cs *engine, * guessing the missed context-switch events by looking at what * requests were completed. */ - execlists_cancel_port_requests(execlists); + execlists_cancel_port_requests(engine); reset_irq(engine); /* Push back any incomplete requests for replay after the reset. */ diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index aa643a1d69db..1d00cc3cc1a4 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -684,7 +684,7 @@ void execlists_user_begin(struct intel_engine_execlists *execlists, void execlists_user_end(struct intel_engine_execlists *execlists); void -execlists_cancel_port_requests(struct intel_engine_execlists * const execlists); +execlists_cancel_port_requests(struct intel_engine_cs *engine); void execlists_unwind_incomplete_requests(struct intel_engine_execlists *execlists);