Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809988/?format=api
{ "id": 809988, "url": "http://patchwork.ozlabs.org/api/patches/809988/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170905081029.19769-3-mperttunen@nvidia.com/", "project": { "id": 21, "url": "http://patchwork.ozlabs.org/api/projects/21/?format=api", "name": "Linux Tegra Development", "link_name": "linux-tegra", "list_id": "linux-tegra.vger.kernel.org", "list_email": "linux-tegra@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170905081029.19769-3-mperttunen@nvidia.com>", "list_archive_url": null, "date": "2017-09-05T08:10:25", "name": "[v2,2/6] gpu: host1x: Enable gather filter", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "2674d90c5b6f99a1f9651dc13330dae52a1de75f", "submitter": { "id": 26499, "url": "http://patchwork.ozlabs.org/api/people/26499/?format=api", "name": "Mikko Perttunen", "email": "mperttunen@nvidia.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170905081029.19769-3-mperttunen@nvidia.com/mbox/", "series": [ { "id": 1506, "url": "http://patchwork.ozlabs.org/api/series/1506/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=1506", "date": "2017-09-05T08:10:29", "name": "Miscellaneous improvements to Host1x and TegraDRM", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1506/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809988/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809988/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-tegra-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tsecure) header.d=kapsi.fi header.i=@kapsi.fi header.b=\"A/6JESke\";\n\tdkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmfc23YPwz9s0g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 5 Sep 2017 18:13:22 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750993AbdIEIMb (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 5 Sep 2017 04:12:31 -0400", "from mail.kapsi.fi ([91.232.154.25]:44943 \"EHLO mail.kapsi.fi\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751046AbdIEIKk (ORCPT <rfc822;linux-tegra@vger.kernel.org>);\n\tTue, 5 Sep 2017 04:10:40 -0400", "from dsl-hkibng41-567306-181.dhcp.inet.fi ([86.115.6.181]\n\thelo=localhost.localdomain) by mail.kapsi.fi with esmtpsa\n\t(TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)\n\t(envelope-from <mperttunen@nvidia.com>)\n\tid 1dp8wN-0001nH-Fy; Tue, 05 Sep 2017 11:10:35 +0300" ], "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi;\n\ts=20161220; \n\th=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From;\n\tbh=qOldYFwBySQDKDVJhTo32wh+aB38dLGRrtLDlFI4W3k=; \n\tb=A/6JESke8l8Dvi+KrZlJSGCLqvSPpCubzb71Dvpa2UlHxD5rGRS6k3BYNqtPIAyLaBXJ44HMWNaft4BKPdQ4W9AB3aclp+5ZJtpuHbK+cW+tonOyd+pnfVJBYSOWrg/2/Ffa9nPnB+/rGHKYmxtpR1PaEhjD9eV9XBqv7NGSo1E9jtJoTYyUTx8LtHskdCiAe/E6RjOA2tC8FOfJu50YlBlrDlCGtgviAxyRnAKO0AanDLg0T9QQacmX8RKPNu9Zuyw2/fVIJc1xFaABv7reVDrFDT7s3rH7nIi2+IEodyLZCefD3sWPaOMAO+fJcNd2PGFRzW75tzOGeXR/uC4Byg==;", "From": "Mikko Perttunen <mperttunen@nvidia.com>", "To": "thierry.reding@gmail.com, jonathanh@nvidia.com", "Cc": "digetx@gmail.com, dri-devel@lists.freedesktop.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tMikko Perttunen <mperttunen@nvidia.com>", "Subject": "[PATCH v2 2/6] gpu: host1x: Enable gather filter", "Date": "Tue, 5 Sep 2017 11:10:25 +0300", "Message-Id": "<20170905081029.19769-3-mperttunen@nvidia.com>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20170905081029.19769-1-mperttunen@nvidia.com>", "References": "<20170905081029.19769-1-mperttunen@nvidia.com>", "X-SA-Exim-Connect-IP": "86.115.6.181", "X-SA-Exim-Mail-From": "mperttunen@nvidia.com", "X-SA-Exim-Scanned": "No (on mail.kapsi.fi); SAEximRunCond expanded to false", "Sender": "linux-tegra-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-tegra.vger.kernel.org>", "X-Mailing-List": "linux-tegra@vger.kernel.org" }, "content": "The gather filter is a feature present on Tegra124 and newer where the\nhardware prevents GATHERed command buffers from executing commands\nnormally reserved for the CDMA pushbuffer which is maintained by the\nkernel driver.\n\nThis commit enables the gather filter on all supporting hardware.\n\nSigned-off-by: Mikko Perttunen <mperttunen@nvidia.com>\nReviewed-by: Dmitry Osipenko <digetx@gmail.com>\n---\n drivers/gpu/host1x/hw/channel_hw.c | 22 ++++++++++++++++++++++\n drivers/gpu/host1x/hw/hw_host1x04_channel.h | 12 ++++++++++++\n drivers/gpu/host1x/hw/hw_host1x05_channel.h | 12 ++++++++++++\n 3 files changed, 46 insertions(+)", "diff": "diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c\nindex 0161da331702..5c0dc6bb51d1 100644\n--- a/drivers/gpu/host1x/hw/channel_hw.c\n+++ b/drivers/gpu/host1x/hw/channel_hw.c\n@@ -181,10 +181,32 @@ static int channel_submit(struct host1x_job *job)\n \treturn err;\n }\n \n+static void enable_gather_filter(struct host1x *host,\n+\t\t\t\t struct host1x_channel *ch)\n+{\n+#if HOST1X_HW >= 6\n+\tu32 val;\n+\n+\tif (!host->hv_regs)\n+\t\treturn;\n+\n+\tval = host1x_hypervisor_readl(\n+\t\thost, HOST1X_HV_CH_KERNEL_FILTER_GBUFFER(ch->id / 32));\n+\tval |= BIT(ch->id % 32);\n+\thost1x_hypervisor_writel(\n+\t\thost, val, HOST1X_HV_CH_KERNEL_FILTER_GBUFFER(ch->id / 32));\n+#elif HOST1X_HW >= 4\n+\thost1x_ch_writel(ch,\n+\t\t\t HOST1X_CHANNEL_CHANNELCTRL_KERNEL_FILTER_GBUFFER(1),\n+\t\t\t HOST1X_CHANNEL_CHANNELCTRL);\n+#endif\n+}\n+\n static int host1x_channel_init(struct host1x_channel *ch, struct host1x *dev,\n \t\t\t unsigned int index)\n {\n \tch->regs = dev->regs + index * HOST1X_CHANNEL_SIZE;\n+\tenable_gather_filter(dev, ch);\n \treturn 0;\n }\n \ndiff --git a/drivers/gpu/host1x/hw/hw_host1x04_channel.h b/drivers/gpu/host1x/hw/hw_host1x04_channel.h\nindex 95e6f96142b9..2e8b635aa660 100644\n--- a/drivers/gpu/host1x/hw/hw_host1x04_channel.h\n+++ b/drivers/gpu/host1x/hw/hw_host1x04_channel.h\n@@ -117,5 +117,17 @@ static inline u32 host1x_channel_dmactrl_dmainitget(void)\n }\n #define HOST1X_CHANNEL_DMACTRL_DMAINITGET \\\n \thost1x_channel_dmactrl_dmainitget()\n+static inline u32 host1x_channel_channelctrl_r(void)\n+{\n+\treturn 0x98;\n+}\n+#define HOST1X_CHANNEL_CHANNELCTRL \\\n+\thost1x_channel_channelctrl_r()\n+static inline u32 host1x_channel_channelctrl_kernel_filter_gbuffer_f(u32 v)\n+{\n+\treturn (v & 0x1) << 2;\n+}\n+#define HOST1X_CHANNEL_CHANNELCTRL_KERNEL_FILTER_GBUFFER(v) \\\n+\thost1x_channel_channelctrl_kernel_filter_gbuffer_f(v)\n \n #endif\ndiff --git a/drivers/gpu/host1x/hw/hw_host1x05_channel.h b/drivers/gpu/host1x/hw/hw_host1x05_channel.h\nindex fce6e2c1ff4c..abbbc2641ce6 100644\n--- a/drivers/gpu/host1x/hw/hw_host1x05_channel.h\n+++ b/drivers/gpu/host1x/hw/hw_host1x05_channel.h\n@@ -117,5 +117,17 @@ static inline u32 host1x_channel_dmactrl_dmainitget(void)\n }\n #define HOST1X_CHANNEL_DMACTRL_DMAINITGET \\\n \thost1x_channel_dmactrl_dmainitget()\n+static inline u32 host1x_channel_channelctrl_r(void)\n+{\n+\treturn 0x98;\n+}\n+#define HOST1X_CHANNEL_CHANNELCTRL \\\n+\thost1x_channel_channelctrl_r()\n+static inline u32 host1x_channel_channelctrl_kernel_filter_gbuffer_f(u32 v)\n+{\n+\treturn (v & 0x1) << 2;\n+}\n+#define HOST1X_CHANNEL_CHANNELCTRL_KERNEL_FILTER_GBUFFER(v) \\\n+\thost1x_channel_channelctrl_kernel_filter_gbuffer_f(v)\n \n #endif\n", "prefixes": [ "v2", "2/6" ] }