public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/etnaviv: Print error message when driver can't get pages
@ 2024-09-08  7:19 Sui Jingfeng
  0 siblings, 0 replies; only message in thread
From: Sui Jingfeng @ 2024-09-08  7:19 UTC (permalink / raw)
  To: Lucas Stach, Russell King, Christian Gmeiner
  Cc: David Airlie, Daniel Vetter, etnaviv, dri-devel, linux-kernel,
	Sui Jingfeng

This error could happen when the GFP_HIGHUSER flag is set, such an error
can also be seen on the X86 platform. According to the kernel document in
gfp_types.h, "the GFP_HIGHUSER is for userspace allocations that may be
mapped to userspace, it do not need to be directly accessible by the
kernel."

However, drm/etnaviv will use the pages to implement vmap and mmap
operations of the GEM object function. The flag still set at present.
When we can't get pages, it certainly is a bug. Hence, we should print
this kind of error with drm_err() instead of dev_dbg().

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 5c0c9d4e3be1..5ffc31f32ac9 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -61,7 +61,7 @@ static int etnaviv_gem_shmem_get_pages(struct etnaviv_gem_object *etnaviv_obj)
 	struct page **p = drm_gem_get_pages(&etnaviv_obj->base);
 
 	if (IS_ERR(p)) {
-		dev_dbg(dev->dev, "could not get pages: %ld\n", PTR_ERR(p));
+		drm_err(dev, "could not get pages: %ld\n", PTR_ERR(p));
 		return PTR_ERR(p);
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-08  7:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-08  7:19 [PATCH] drm/etnaviv: Print error message when driver can't get pages Sui Jingfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox