diff options
author | Geert Uytterhoeven <[email protected]> | 2023-05-23 17:06:20 +0200 |
---|---|---|
committer | Thomas Zimmermann <[email protected]> | 2023-05-24 13:35:40 +0200 |
commit | e79d85c6c217221ea32354a5ac0587a7ccea02b9 (patch) | |
tree | 829ac871880c4c393d87e94b86a1d26d31397659 /drivers/gpu/drm/ast/ast_main.c | |
parent | e997c218ad736fd6f524d73a987bad9d94128d3d (diff) |
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 <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Tested-by: Sui Jingfeng <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/57e6b334dae8148b1b8ae6ef308ce9a83810a850.1684854344.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/gpu/drm/ast/ast_main.c')
0 files changed, 0 insertions, 0 deletions