drm/simpledrm: Set preferred depth from format of scanout buffer
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 23 Nov 2022 11:53:46 +0000 (12:53 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 24 Nov 2022 13:07:52 +0000 (14:07 +0100)
commit88f19f8bdc45994009321efa73060d99a3061d3e
treee0a85b264cb7a23f2c35b0b130a88c054885bce2
parent5580f263210d401a4f7a5601c9ec8dbe27da1fc1
drm/simpledrm: Set preferred depth from format of scanout buffer

Set the preferred depth from the format of the scanout buffer. The
value cannot be hardcoded, as the scanout buffer is only known at
runtime. Also derive the fbdev emulation's bpp value from the scanout
format.

v2:
* fix commit-message typo

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-6-tzimmermann@suse.de
drivers/gpu/drm/tiny/simpledrm.c