drm/vmwgfx: Add an option to change assumed FB bpp

Offer an option for advanced users who want larger modes at 16bpp.

This becomes necessary after the fix: "Work around mode set
failure in 2D VMs."  Without this patch, there would be no way
for existing advanced users to get to a high res mode, and the
regression is they will likely get a black screen after a software
update on their current VM.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: <stable@vger.kernel.org>
This commit is contained in:
Sinclair Yeh
2016-06-29 12:15:48 -07:00
parent 7c20d213dd
commit 04319d89fb
3 changed files with 9 additions and 0 deletions

View File

@@ -1555,6 +1555,9 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
int i;
u32 assumed_bpp = 4;
if (dev_priv->assume_16bpp)
assumed_bpp = 2;
if (dev_priv->active_display_unit == vmw_du_screen_target) {
max_width = min(max_width, dev_priv->stdu_max_width);
max_height = min(max_height, dev_priv->stdu_max_height);