drivers/gpu/drm/drm_gem_framebuffer_helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
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
Hi Andy, On Thu, 8 May 2025 at 11:49, Andy Yan <andyshrk@163.com> wrote: > Let the user know what went wrong in drm_gem_fb_afbc_init > failure paths. Thanks for this, and thanks also for using drm_dbg_kms() to make sure that userspace can't flood the log with errors. Reviewed-by: Daniel Stone <daniels@collabora.com> Cheers, Daniel
Hello, At 2025-05-08 17:11:01, "Daniel Stone" <daniel@fooishbar.org> wrote: >Hi Andy, > >On Thu, 8 May 2025 at 11:49, Andy Yan <andyshrk@163.com> wrote: >> Let the user know what went wrong in drm_gem_fb_afbc_init >> failure paths. > >Thanks for this, and thanks also for using drm_dbg_kms() to make sure >that userspace can't flood the log with errors. > >Reviewed-by: Daniel Stone <daniels@collabora.com> May I kindly ask which Maintainer can take this patch? > >Cheers, >Daniel
Hi Am 22.05.25 um 09:54 schrieb Andy Yan: > Hello, > > > At 2025-05-08 17:11:01, "Daniel Stone" <daniel@fooishbar.org> wrote: >> Hi Andy, >> >> On Thu, 8 May 2025 at 11:49, Andy Yan <andyshrk@163.com> wrote: >>> Let the user know what went wrong in drm_gem_fb_afbc_init >>> failure paths. >> Thanks for this, and thanks also for using drm_dbg_kms() to make sure >> that userspace can't flood the log with errors. >> >> Reviewed-by: Daniel Stone <daniels@collabora.com> > > May I kindly ask which Maintainer can take this patch? Merged into drm-misc-next. Thanks for the patch. Best regards Thomas > >> Cheers, >> Daniel -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
© 2016 - 2026 Red Hat, Inc.