From: "Christian König" <christian.koenig@amd.com>
To: "Michel Dänzer" <michel@daenzer.net>,
"Tom St Denis" <tom.stdenis@amd.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
Christian Zigotzky <chzigotzky@xenosoft.de>
Subject: Re: Hardware 3D acceleration doesn't work anymore with the latest git kernel
Date: Mon, 27 Nov 2017 13:20:49 +0100 [thread overview]
Message-ID: <26dffb11-dfa1-16b7-f5b4-839b80b3b356@amd.com> (raw)
In-Reply-To: <7dc2fc90-269e-6b11-d9e4-a4de0dc1fd44@daenzer.net>
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
Am 27.11.2017 um 13:02 schrieb Michel Dänzer:
> [SNIP]
> I thought I did above...
>
> Commit f7871fd19389c5f64f625a4389675d0740f0dfe4 made the radeon driver
> rely on ttm_populate_and_map_pages, which is implemented as:
>
> static inline int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt)
> {
> return -ENOMEM;
> }
>
> when neither CONFIG_SWIOTLB nor CONFIG_INTEL_IOMMU is enabled.
> Previously, the driver worked fine without either of those enabled.
Ah! Sorry my fault. It looks like I incorrectly explained to Tom how to
handle the config options.
Please take a look at the attached patch, it should fix the issue (going
to send that one out separately once more).
Regards,
Christian.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drm-ttm-fix-populate_and_map-functions-once-more.patch --]
[-- Type: text/x-patch; name="0001-drm-ttm-fix-populate_and_map-functions-once-more.patch", Size: 3453 bytes --]
>From a53c4574a06ee5a46d8e5b8fb10623c76513fe5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Date: Mon, 27 Nov 2017 13:12:35 +0100
Subject: [PATCH] drm/ttm: fix populate_and_map() functions once more
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts "drm/ttm: Fix configuration error around populate_and_map()
functions".
This fix has gone into the wrong direction. Those helpers should be
available even when neither CONFIG_INTEL_IOMMU nor CONFIG_SWIOTLB are
set.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 --
include/drm/ttm/ttm_page_alloc.h | 32 ++++++++++----------------------
2 files changed, 10 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 1543532b8740..c82d94cbbabc 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -1096,7 +1096,6 @@ void ttm_pool_unpopulate(struct ttm_tt *ttm)
}
EXPORT_SYMBOL(ttm_pool_unpopulate);
-#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt)
{
unsigned i, j;
@@ -1167,7 +1166,6 @@ void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt)
ttm_pool_unpopulate(&tt->ttm);
}
EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages);
-#endif
int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
{
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 38a2b4770c35..593811362a91 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -59,11 +59,20 @@ int ttm_pool_populate(struct ttm_tt *ttm);
void ttm_pool_unpopulate(struct ttm_tt *ttm);
/**
+ * Populates and DMA maps pages to fullfil a ttm_dma_populate() request
+ */
+int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt);
+
+/**
+ * Unpopulates and DMA unmaps pages as part of a
+ * ttm_dma_unpopulate() request */
+void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt);
+
+/**
* Output the state of pools to debugfs file
*/
int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
-
#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
/**
* Initialize pool allocator.
@@ -83,17 +92,6 @@ int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
-
-/**
- * Populates and DMA maps pages to fullfil a ttm_dma_populate() request
- */
-int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt);
-
-/**
- * Unpopulates and DMA unmaps pages as part of a
- * ttm_dma_unpopulate() request */
-void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt);
-
#else
static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *glob,
unsigned max_pages)
@@ -116,16 +114,6 @@ static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma,
struct device *dev)
{
}
-
-static inline int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt)
-{
- return -ENOMEM;
-}
-
-static inline void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt)
-{
-}
-
#endif
#endif
--
2.11.0
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-11-27 12:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 18:08 Hardware 3D acceleration doesn't work anymore with the latest git kernel Christian Zigotzky
2017-11-21 4:38 ` Alex Deucher
2017-11-21 11:32 ` Christian Zigotzky
2017-11-22 13:20 ` Christian Zigotzky
2017-11-22 13:27 ` Ilia Mirkin
2017-11-22 13:40 ` Christian Zigotzky
2017-11-22 13:45 ` Ilia Mirkin
2017-11-22 14:53 ` Christian Zigotzky
2017-11-24 14:29 ` Christian Zigotzky
2017-11-24 16:09 ` Michel Dänzer
2017-11-24 19:08 ` Christian Zigotzky
2017-11-24 19:13 ` Christian Zigotzky
2017-11-24 19:14 ` Ilia Mirkin
2017-11-24 20:58 ` Christian Zigotzky
2017-11-27 11:02 ` Michel Dänzer
2017-11-27 11:50 ` Christian König
2017-11-27 12:02 ` Michel Dänzer
2017-11-27 12:17 ` Tom St Denis
2017-11-27 14:53 ` Michel Dänzer
2017-11-28 5:43 ` Christian Zigotzky
2017-11-28 9:40 ` Michel Dänzer
2017-11-28 23:48 ` Christian Zigotzky
2017-11-27 12:20 ` Christian König [this message]
2017-11-29 8:50 ` Michel Dänzer
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=26dffb11-dfa1-16b7-f5b4-839b80b3b356@amd.com \
--to=christian.koenig@amd.com \
--cc=chzigotzky@xenosoft.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel@daenzer.net \
--cc=tom.stdenis@amd.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).