From patchwork Thu Apr 20 05:39:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chuanxiao.Dong" X-Patchwork-Id: 9689407 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 09B8D601D4 for ; Thu, 20 Apr 2017 05:40:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F07582839C for ; Thu, 20 Apr 2017 05:40:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E544B2845C; Thu, 20 Apr 2017 05:40:57 +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=-4.2 required=2.0 tests=BAYES_00, 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 ACF4C2839C for ; Thu, 20 Apr 2017 05:40:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 456236E0DA; Thu, 20 Apr 2017 05:40:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id EDB476E0D9; Thu, 20 Apr 2017 05:40:55 +0000 (UTC) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 19 Apr 2017 22:40:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,224,1488873600"; d="scan'208";a="79075572" Received: from cxdong-dell-dev.bj.intel.com ([10.238.135.52]) by orsmga004.jf.intel.com with ESMTP; 19 Apr 2017 22:40:54 -0700 From: Chuanxiao Dong To: intel-gfx@lists.freedesktop.org Date: Thu, 20 Apr 2017 13:39:13 +0800 Message-Id: <1492666754-8135-2-git-send-email-chuanxiao.dong@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492666754-8135-1-git-send-email-chuanxiao.dong@intel.com> References: <1492666754-8135-1-git-send-email-chuanxiao.dong@intel.com> In-Reply-To: <1490665792-5544-1-git-send-email-chuanxiao.dong@intel.com> References: <1490665792-5544-1-git-send-email-chuanxiao.dong@intel.com> Cc: intel-gvt-dev@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 3/4] drm/i915/scheduler: add gvt force-single-submission for guc 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-Virus-Scanned: ClamAV using ClamSMTP GVT needs single submission and cannot allow merge. So when GuC submitting a GVT request, the next one should be submitted to guc later until the previous one is completed. This is following the usage when using execlist mode submission. Cc: chris@chris-wilson.co.uk Signed-off-by: Chuanxiao Dong --- drivers/gpu/drm/i915/i915_guc_submission.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 1642fff..862f4fd 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -668,10 +668,14 @@ static bool i915_guc_dequeue(struct intel_engine_cs *engine) struct drm_i915_gem_request *rq = rb_entry(rb, typeof(*rq), priotree.node); - if (last && rq->ctx != last->ctx) { + if (last && !i915_gem_context_can_merge(last->ctx, rq->ctx)) { if (port != engine->execlist_port) break; + if (intel_gvt_context_single_port_submit(last->ctx) || + intel_gvt_context_single_port_submit(rq->ctx)) + break; + i915_gem_request_assign(&port->request, last); nested_enable_signaling(last); port++;