Skip to contentSkip to conversation

drm/etnaviv: Print error message when driver can't get pages

PATCH New Sui Jingfeng 1 participant 1 message Sep 8, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/etnaviv: Print error message when driver can't get pages

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().

---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_gem.c +1 -1
index 5c0c9d4e3be1..5ffc31f32ac9 100644
@@ -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);
 	}
 
Signature · 1 line
2.43.0