From patchwork Tue Mar 28 18:00:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 9650315 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 2F813601D7 for ; Tue, 28 Mar 2017 18:01:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 380682844E for ; Tue, 28 Mar 2017 18:01:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CCB028464; Tue, 28 Mar 2017 18:01:20 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 D8C352844E for ; Tue, 28 Mar 2017 18:01:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6205E893EC; Tue, 28 Mar 2017 18:01:18 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A5EC893EC for ; Tue, 28 Mar 2017 18:01:16 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 28 Mar 2017 11:01:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.36,237,1486454400"; d="scan'208"; a="1148045086" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2017 11:01:15 -0700 Received: from mwiniars-main.igk.intel.com (172.28.171.152) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server id 14.3.319.2; Tue, 28 Mar 2017 19:01:14 +0100 From: =?UTF-8?q?Micha=C5=82=20Winiarski?= To: Date: Tue, 28 Mar 2017 20:00:26 +0200 Message-ID: <20170328180029.1073-1-michal.winiarski@intel.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Originating-IP: [172.28.171.152] Subject: [Intel-gfx] [RFC 1/4] drm/i915/scheduler: Remember request priority throughout its lifetime 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Since request can be unsubmitted, we need to avoid overriding its priority during submission. Otherwise we won't be able to resubmit it with correct priority. Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Signed-off-by: MichaƂ Winiarski --- drivers/gpu/drm/i915/i915_guc_submission.c | 1 - drivers/gpu/drm/i915/intel_lrc.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 6193ad7..082f8ae 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -692,7 +692,6 @@ static bool i915_guc_dequeue(struct intel_engine_cs *engine) rb = rb_next(rb); rb_erase(&rq->priotree.node, &engine->execlist_queue); RB_CLEAR_NODE(&rq->priotree.node); - rq->priotree.priority = INT_MAX; i915_guc_submit(rq); trace_i915_gem_request_in(rq, port - engine->execlist_port); diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index b0c3a02..301ae7c 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -488,7 +488,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) rb = rb_next(rb); rb_erase(&cursor->priotree.node, &engine->execlist_queue); RB_CLEAR_NODE(&cursor->priotree.node); - cursor->priotree.priority = INT_MAX; __i915_gem_request_submit(cursor); trace_i915_gem_request_in(cursor, port - engine->execlist_port);