drm/vmwgfx: Do not allow invalid bpp's for dumb buffers
authorZack Rusin <zackr@vmware.com>
Sat, 22 Oct 2022 04:02:31 +0000 (00:02 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 25 Oct 2022 16:42:27 +0000 (12:42 -0400)
commit1c8d537bbcc9708d667d81ddc2caf43ec753cf05
treed5d7400742c7f753cf40030733c28c695e83cf25
parent9da30cdd6a318595199319708c143ae318f804ef
drm/vmwgfx: Do not allow invalid bpp's for dumb buffers

Dumb buffers allow a very limited set of formats. Basically everything
apart from 1, 2 and 4 is expected to return an error. Make vmwgfx
follow those guidelines.

This fixes igt's dumb_buffer invalid_bpp test on vmwgfx.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Maaz Mombasawala <mombasawalam@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221022040236.616490-13-zack@kde.org
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c