summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-05-23 18:06:20 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2023-05-24 14:35:40 +0300
commite79d85c6c217221ea32354a5ac0587a7ccea02b9 (patch)
tree829ac871880c4c393d87e94b86a1d26d31397659 /drivers/gpu/drm/ast
parente997c218ad736fd6f524d73a987bad9d94128d3d (diff)
downloadlinux-e79d85c6c217221ea32354a5ac0587a7ccea02b9.tar.xz
drm/fb-helper: Fix height, width, and accel_flags in fb_var
Fbtest contains some very simple validation of the fbdev userspace API contract. When used with shmob-drm, it reports the following warnings and errors: height changed from 68 to 0 height was rounded down width changed from 111 to 0 width was rounded down accel_flags changed from 0 to 1 The first part happens because __fill_var() resets the physical dimensions of the first connector, as filled in by drm_setup_crtcs_fb(). Fix this by retaining the original values. The last part happens because __fill_var() forces the FB_ACCELF_TEXT flag on, while fbtest disables all acceleration on purpose, so it can draw safely to the frame buffer. Fix this by setting accel_flags to zero, as DRM does not implement any text console acceleration. Note that this issue can also be seen in the output of fbset, which reports "accel true". Fixes: ee4cce0a8f03a333 ("drm/fb-helper: fix input validation gaps in check_var") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/57e6b334dae8148b1b8ae6ef308ce9a83810a850.1684854344.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/gpu/drm/ast')
0 files changed, 0 insertions, 0 deletions