mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/gem-framebuffer: log errors when gem size < afbc_size
@ 2025-05-08  8:47 Andy Yan
  2025-05-08  9:11 ` Daniel Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Yan @ 2025-05-08  8:47 UTC (permalink / raw)
  To: tzimmermann; +Cc: simona, mripard, dri-devel, linux-kernel, Andy Yan

Let the user know what went wrong in drm_gem_fb_afbc_init
failure paths.

Signed-off-by: Andy Yan <andyshrk@163.com>
---

 drivers/gpu/drm/drm_gem_framebuffer_helper.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
index 6f72e7a0f427..baf99a68bdb5 100644
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -607,8 +607,11 @@ int drm_gem_fb_afbc_init(struct drm_device *dev,
 	if (ret < 0)
 		return ret;
 
-	if (objs[0]->size < afbc_fb->afbc_size)
+	if (objs[0]->size < afbc_fb->afbc_size) {
+		drm_dbg_kms(dev, "GEM object size (%zu) smaller than minimum afbc size (%u)\n",
+			    objs[0]->size, afbc_fb->afbc_size);
 		return -EINVAL;
+	}
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-26  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-08  8:47 [PATCH] drm/gem-framebuffer: log errors when gem size < afbc_size Andy Yan
2025-05-08  9:11 ` Daniel Stone
2025-05-22  7:54   ` Andy Yan
2025-05-26  7:37     ` Thomas Zimmermann

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

all inboxes | Powered by JetHome®