drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
authorSinclair Yeh <syeh@vmware.com>
Fri, 31 Oct 2014 08:58:06 +0000 (09:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 17:00:12 +0000 (09:00 -0800)
commitd3555b73940f5e2a6e28b98c4a9fac1ddf82f309
treeab636de00456f7d3f96ebb7c524054a15d9e0aeb
parent68dc002ad8efcd11942c94a1a3906d6feb1533af
drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.

commit 9a72384d86b26cb8a2b25106677e1197f606668f upstream.

When screen objects are enabled, the bpp is assumed to be 32, otherwise
it is set to 16.

v2:
* Use u32 instead of u64 for assumed_bpp.
* Fixed mechanism to check for screen objects
* Limit the back buffer size to VRAM.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c