From patchwork Thu Mar 8 06:06:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10266587 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 BF14F60364 for ; Thu, 8 Mar 2018 06:07:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF22C2974C for ; Thu, 8 Mar 2018 06:07:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1EAC29750; Thu, 8 Mar 2018 06:07:26 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 3D75F2974C for ; Thu, 8 Mar 2018 06:07:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A01AD6E814; Thu, 8 Mar 2018 06:07:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F3FC6E809; Thu, 8 Mar 2018 06:07:12 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B504D60F8F; Thu, 8 Mar 2018 06:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520489231; bh=agmRTFp1xhEO/oba2xsYYT8r4bV67RLivJwrFv3bAvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z+hYwSeQciSDjVm8JTUzZ6smDD3NalPUgyVl5/XxOmz6pfMHBa7223hloi/54Z2M7 VrA8FCaGS8oAuechsqt8cluosMvtK1bV/Y9UYozKE7sGzTg2PbviTz4eVZ3zQrRrBW 95edDiI+pJ0I/HIYv0WycR6Jlwf5m3EYBXhdEcSY= Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0751360F6C; Thu, 8 Mar 2018 06:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520489230; bh=agmRTFp1xhEO/oba2xsYYT8r4bV67RLivJwrFv3bAvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRWPSw3GNstVbznHSP31fOAYZ+sUgF3pl8cbLFDpeaXSq4mywzp83HacZRhrpa9mU DyRkQjwLiMm0zCtBWYkjgYXauNhKXhYjd4WvV5Ync2B/tIODiwVXYu//aY3ihvN4aw 9q5zt99Y3kOs9moEKP2rmHiXKzpiqkj4IXwOYGqA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0751360F6C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smasetty@codeaurora.org From: Sharat Masetty To: freedreno@lists.freedesktop.org Subject: [PATCH 6/6] drm/msm/A6xx: Enable L1 preemption level Date: Thu, 8 Mar 2018 11:36:25 +0530 Message-Id: <1520489185-21828-7-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520489185-21828-1-git-send-email-smasetty@codeaurora.org> References: <1520489185-21828-1-git-send-email-smasetty@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Sharat Masetty , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch enables L1 level which is a finer grained preemption at either a draw call or a bin boundary. The worst case switching latency is higher in this case but that is a trade off we make for enabling faster preemption. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c index 0d2b612..4e83a4f 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c @@ -301,9 +301,17 @@ void a6xx_preempt_init(struct msm_gpu *gpu) } /* TODO: make this configurable? */ - a6xx_gpu->preempt_level = 0; + /* + * Use L1 preemption level which is preemption at either the draw call + * level or the bin boundary level + */ + a6xx_gpu->preempt_level = 1; a6xx_gpu->uses_gmem = 1; - a6xx_gpu->skip_save_restore = 0; + /* + * Skip CP save and restore when preempting between bins, use + * this only when the preemption level is 1 + */ + a6xx_gpu->skip_save_restore = 1; a6xx_gpu->scratch_ptr = msm_gem_kernel_new(gpu->dev, gpu->nr_rings * sizeof(uint64_t), MSM_BO_WC,