drm/vmwgfx: validate the screen formats
authorZack Rusin <zackr@vmware.com>
Fri, 18 Mar 2022 17:43:30 +0000 (13:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:30 +0000 (10:22 +0200)
commit079164db407c204065c4c87b7fc281ece180b056
treeb855666bc6f75155b6dfee72920da680ac3105a5
parent4475d3c3b224ce8c0790198a13a4e72ff60b1226
drm/vmwgfx: validate the screen formats

[ Upstream commit 8bb75aeb58bd688d70827ae179bd3da57b6d975b ]

The kms code wasn't validating the modifiers and was letting through
unsupported formats. rgb8 was never properly supported and has no
matching svga screen target format so remove it.
This fixes format/modifier failures in kms_addfb_basic from IGT.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220318174332.440068-4-zack@kde.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h