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)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 14 Dec 2014 16:23:54 +0000 (16:23 +0000)
commita8f42325dfed2c10410816a48032a75984078883
tree9a5520a08e0e5247d93359a86a34ed8bbedebe3d
parent8043761416d5ae6d8fe5e95331d26465d52e8c6e
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>
[bwh: Backported to 3.2: drop changes for dev_priv->prim_bb_mem]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c