Thread (50 messages) 50 messages, 8 authors, 2022-09-22

Re: [PATCH v2 04/10] drm/simpledrm: Compute framebuffer stride if not set

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2022-07-27 07:53:30
Also in: dri-devel, linuxppc-dev

Hi

Am 25.07.22 um 17:13 schrieb Javier Martinez Canillas:
Hello Geert,

On 7/21/22 16:46, Geert Uytterhoeven wrote:
quoted
Hi Thomas,

On Wed, Jul 20, 2022 at 4:27 PM Thomas Zimmermann [off-list ref] wrote:
quoted
Compute the framebuffer's scanline stride length if not given by
the simplefb data.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for your patch!
quoted
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -743,6 +743,9 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
                 drm_err(dev, "no simplefb configuration found\n");
                 return ERR_PTR(-ENODEV);
         }
+       if (!stride)
+               stride = format->cpp[0] * width;
DIV_ROUND_UP(drm_format_info_bpp(format) * width, 8)
I think you meant here:

DIV_ROUND_UP(drm_format_info_bpp(format, 0) * width, 8) ?
I guess, that's the right function. My original code is correct, but cpp 
is also deprecated.

Best regards
Thomas
  
With that change,

Acked-by: Javier Martinez Canillas <javierm@redhat.com>
-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help