From patchwork Sun Nov 5 11:01:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Perttunen X-Patchwork-Id: 10042081 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 250C560244 for ; Sun, 5 Nov 2017 11:20:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A84C292D1 for ; Sun, 5 Nov 2017 11:20:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F33D429301; Sun, 5 Nov 2017 11:20:32 +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 8DD76292D1 for ; Sun, 5 Nov 2017 11:20:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A2226E093; Sun, 5 Nov 2017 11:20:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1105 seconds by postgrey-1.35 at gabe; Sun, 05 Nov 2017 11:20:29 UTC Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00E406E093 for ; Sun, 5 Nov 2017 11:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=gTDVUAptY/YlYGu7Kbdw9z1nmZnCd5aaGXXcUfrDtqQ=; b=RZCzIEtxr1qf4A36BZVYerIFBYwQtYCwq75Vc55TSywNYp+01wYaOnJFlm32yLUU0c+EZ6yC0xqDb1C/fZ5+36Q4Io+FJItqnGL1tH82ANRBkLZTCFx9Byblj9RLSD8UlXi4S2mFEYOg3SMflsLNO6JAKB9SxAx38aWYWG3sfRRt6oa9wJaa3OQEQvn2jyrMlYvh1o3pLot9BXKsjP0cvKh3c3KyapFP5DZJTbzvzJKLpOpPC5F+dbxBD74K45W+e/DqF5bQxcktE9BF71fhIvVh3oAGZ6XaaIe/keousxEFi+P70VEz8Jcl1uuUSjxMAhdYIqBgNakD2ALyU+paKw==; Received: from dsl-hkibng22-54f983-249.dhcp.inet.fi ([84.249.131.249] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eBIgk-0006dR-5J; Sun, 05 Nov 2017 13:02:02 +0200 From: Mikko Perttunen To: thierry.reding@gmail.com, jonathanh@nvidia.com Subject: [PATCH 02/10] gpu: host1x: Print MLOCK state in debug dumps on T186 Date: Sun, 5 Nov 2017 13:01:10 +0200 Message-Id: <20171105110118.15142-3-mperttunen@nvidia.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171105110118.15142-1-mperttunen@nvidia.com> References: <20171105110118.15142-1-mperttunen@nvidia.com> X-SA-Exim-Connect-IP: 84.249.131.249 X-SA-Exim-Mail-From: mperttunen@nvidia.com X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Cc: linux-tegra@vger.kernel.org, digetx@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add support for dumping current MLOCK state in debug dumps also on T186, now that MLOCKs are used by the driver. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/debug_hw_1x06.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/hw/debug_hw_1x06.c b/drivers/gpu/host1x/hw/debug_hw_1x06.c index b503c740c022..659dd6042ccc 100644 --- a/drivers/gpu/host1x/hw/debug_hw_1x06.c +++ b/drivers/gpu/host1x/hw/debug_hw_1x06.c @@ -131,5 +131,21 @@ static void host1x_debug_show_channel_fifo(struct host1x *host, static void host1x_debug_show_mlocks(struct host1x *host, struct output *o) { - /* TODO */ + unsigned int i; + + if (!host->hv_regs) + return; + + host1x_debug_output(o, "---- mlocks ----\n"); + + for (i = 0; i < host1x_syncpt_nb_mlocks(host); i++) { + u32 val = host1x_hypervisor_readl(host, HOST1X_HV_MLOCK(i)); + if (HOST1X_HV_MLOCK_LOCKED_V(val)) + host1x_debug_output(o, "%u: locked by channel %u\n", + i, HOST1X_HV_MLOCK_CH_V(val)); + else + host1x_debug_output(o, "%u: unlocked\n", i); + } + + host1x_debug_output(o, "\n"); }