From: Robin Murphy <robin.murphy@arm.com> To: robh@kernel.org, tomeu.vizoso@collabora.com, sudeep.holla@arm.com Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, liviu.dudau@arm.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] drm/panfrost: Use coherent pagetable walk on Juno Date: Mon, 30 Sep 2019 16:24:59 +0100 [thread overview] Message-ID: <1e499f85220b735849126171e64ebdd1da0302ce.1569856049.git.robin.murphy@arm.com> (raw) In-Reply-To: <88dc6386929b3dcd7a65ba8063628c62b66b330c.1569856049.git.robin.murphy@arm.com> Although going full "dma-coherent" ends badly due to GEM objects still being forcibly mapped non-cacheable, we can at least take advantage of Juno's ACE-lite integration to skip cache maintenance for pagetables. CC: Rob Herring <robh@kernel.org> CC: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- This isn't really meant as a series, I'm just sending it together with patch #1 for context. drivers/gpu/drm/panfrost/panfrost_mmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index bdd990568476..560439f63277 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -365,6 +365,9 @@ int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv) .iommu_dev = pfdev->dev, }; + if (of_device_is_compatible(pfdev->dev->of_node, "arm,juno-mali")) + pfdev->mmu->pgtbl_cfg.coherent_walk = true; + mmu->pgtbl_ops = alloc_io_pgtable_ops(ARM_MALI_LPAE, &mmu->pgtbl_cfg, priv); if (!mmu->pgtbl_ops) -- 2.21.0.dirty _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com> To: robh@kernel.org, tomeu.vizoso@collabora.com, sudeep.holla@arm.com Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, liviu.dudau@arm.com, dri-devel@lists.freedesktop.org, steven.price@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] drm/panfrost: Use coherent pagetable walk on Juno Date: Mon, 30 Sep 2019 16:24:59 +0100 [thread overview] Message-ID: <1e499f85220b735849126171e64ebdd1da0302ce.1569856049.git.robin.murphy@arm.com> (raw) In-Reply-To: <88dc6386929b3dcd7a65ba8063628c62b66b330c.1569856049.git.robin.murphy@arm.com> Although going full "dma-coherent" ends badly due to GEM objects still being forcibly mapped non-cacheable, we can at least take advantage of Juno's ACE-lite integration to skip cache maintenance for pagetables. CC: Rob Herring <robh@kernel.org> CC: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- This isn't really meant as a series, I'm just sending it together with patch #1 for context. drivers/gpu/drm/panfrost/panfrost_mmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c index bdd990568476..560439f63277 100644 --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -365,6 +365,9 @@ int panfrost_mmu_pgtable_alloc(struct panfrost_file_priv *priv) .iommu_dev = pfdev->dev, }; + if (of_device_is_compatible(pfdev->dev->of_node, "arm,juno-mali")) + pfdev->mmu->pgtbl_cfg.coherent_walk = true; + mmu->pgtbl_ops = alloc_io_pgtable_ops(ARM_MALI_LPAE, &mmu->pgtbl_cfg, priv); if (!mmu->pgtbl_ops) -- 2.21.0.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-30 15:24 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-30 15:24 [PATCH 1/2] arm64: dts: juno: add GPU subsystem Robin Murphy 2019-09-30 15:24 ` Robin Murphy 2019-09-30 15:24 ` Robin Murphy [this message] 2019-09-30 15:24 ` [PATCH 2/2] drm/panfrost: Use coherent pagetable walk on Juno Robin Murphy 2019-09-30 16:26 ` Steven Price 2019-09-30 16:26 ` Steven Price 2019-09-30 17:52 ` Rob Herring 2019-09-30 17:52 ` Rob Herring 2019-09-30 17:54 ` Robin Murphy 2019-09-30 17:54 ` Robin Murphy 2019-09-30 17:27 ` [PATCH 1/2] arm64: dts: juno: add GPU subsystem Liviu Dudau 2019-09-30 17:27 ` Liviu Dudau 2019-09-30 17:46 ` Rob Herring 2019-09-30 17:46 ` Rob Herring 2019-10-01 8:59 ` Sudeep Holla 2019-10-01 8:59 ` Sudeep Holla 2019-10-01 12:45 ` Robin Murphy 2019-10-01 12:45 ` Robin Murphy 2019-10-01 14:34 ` Sudeep Holla 2019-10-01 14:34 ` Sudeep Holla
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1e499f85220b735849126171e64ebdd1da0302ce.1569856049.git.robin.murphy@arm.com \ --to=robin.murphy@arm.com \ --cc=devicetree@vger.kernel.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=liviu.dudau@arm.com \ --cc=lorenzo.pieralisi@arm.com \ --cc=robh@kernel.org \ --cc=steven.price@arm.com \ --cc=sudeep.holla@arm.com \ --cc=tomeu.vizoso@collabora.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.