Hi
Am 17.06.26 um 13:44 schrieb Javier Martinez Canillas:
Thomas Zimmermann <[email protected]> writes:
Hello Thomas,
Only return the actually visible size of the system framebuffer in
drm_sysfb_get_visible_size_si(). Drivers use this size value for
reserving access to framebuffer memory. Increasing the value can
make later attempts to do so fail.
Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays")
Fixes: a84eb6abe2b6 ("drm/sysfb: Add vesadrm for VESA displays")
Cc: Thomas Zimmermann <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v6.16+
---
drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c
b/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c
index 749290196c6a..361b7233600c 100644
--- a/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c
+++ b/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(drm_sysfb_get_stride_si);
u64 drm_sysfb_get_visible_size_si(struct drm_device *dev, const struct
screen_info *si,
unsigned int height, unsigned int stride, u64
size)
{
- u64 vsize = PAGE_ALIGN(height * stride);
Do you know why the original efidrm_get_visible_size_si() (from where
you took this code to make it generic) did the page align ?
There's nothing in the old reviews AFAICT. I think, it was an oversight
from prototyping the driver. I certainly wanted to return 0 for errors
at first, but later changed it to an errno code. There, I forgot to
update the code accordingly.
The change makes sense to me though from your explanation:
Reviewed-by: Javier Martinez Canillas <[email protected]>
Thanks.
Best regards
Thomas
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)