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)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 31 Oct 2014 08:58:06 +0000 (09:58 +0100)
commit9a72384d86b26cb8a2b25106677e1197f606668f
tree7ed2226a545e009b66577298e8538e7e3c5ec131
parent0468ab5b791b0d55a7158b70f555157c8d79d0fb
drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.

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>
Cc: <stable@vger.kernel.org>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c