|
@@ -187,7 +187,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
|
|
* can do this since the caller in the drm core doesn't check anything
|
|
* can do this since the caller in the drm core doesn't check anything
|
|
* which is protected by any looks.
|
|
* which is protected by any looks.
|
|
*/
|
|
*/
|
|
- drm_modeset_unlock(&crtc->mutex);
|
|
|
|
|
|
+ drm_modeset_unlock_crtc(crtc);
|
|
drm_modeset_lock_all(dev_priv->dev);
|
|
drm_modeset_lock_all(dev_priv->dev);
|
|
|
|
|
|
/* A lot of the code assumes this */
|
|
/* A lot of the code assumes this */
|
|
@@ -252,7 +252,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
|
|
ret = 0;
|
|
ret = 0;
|
|
out:
|
|
out:
|
|
drm_modeset_unlock_all(dev_priv->dev);
|
|
drm_modeset_unlock_all(dev_priv->dev);
|
|
- drm_modeset_lock(&crtc->mutex, NULL);
|
|
|
|
|
|
+ drm_modeset_lock_crtc(crtc);
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
@@ -273,7 +273,7 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
|
|
* can do this since the caller in the drm core doesn't check anything
|
|
* can do this since the caller in the drm core doesn't check anything
|
|
* which is protected by any looks.
|
|
* which is protected by any looks.
|
|
*/
|
|
*/
|
|
- drm_modeset_unlock(&crtc->mutex);
|
|
|
|
|
|
+ drm_modeset_unlock_crtc(crtc);
|
|
drm_modeset_lock_all(dev_priv->dev);
|
|
drm_modeset_lock_all(dev_priv->dev);
|
|
|
|
|
|
vmw_cursor_update_position(dev_priv, shown,
|
|
vmw_cursor_update_position(dev_priv, shown,
|
|
@@ -281,7 +281,7 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
|
|
du->cursor_y + du->hotspot_y);
|
|
du->cursor_y + du->hotspot_y);
|
|
|
|
|
|
drm_modeset_unlock_all(dev_priv->dev);
|
|
drm_modeset_unlock_all(dev_priv->dev);
|
|
- drm_modeset_lock(&crtc->mutex, NULL);
|
|
|
|
|
|
+ drm_modeset_lock_crtc(crtc);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -1950,6 +1950,14 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
|
|
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
|
|
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
|
|
};
|
|
};
|
|
int i;
|
|
int i;
|
|
|
|
+ u32 assumed_bpp = 2;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * If using screen objects, then assume 32-bpp because that's what the
|
|
|
|
+ * SVGA device is assuming
|
|
|
|
+ */
|
|
|
|
+ if (dev_priv->sou_priv)
|
|
|
|
+ assumed_bpp = 4;
|
|
|
|
|
|
/* Add preferred mode */
|
|
/* Add preferred mode */
|
|
{
|
|
{
|
|
@@ -1960,8 +1968,9 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
|
|
mode->vdisplay = du->pref_height;
|
|
mode->vdisplay = du->pref_height;
|
|
vmw_guess_mode_timing(mode);
|
|
vmw_guess_mode_timing(mode);
|
|
|
|
|
|
- if (vmw_kms_validate_mode_vram(dev_priv, mode->hdisplay * 2,
|
|
|
|
- mode->vdisplay)) {
|
|
|
|
|
|
+ if (vmw_kms_validate_mode_vram(dev_priv,
|
|
|
|
+ mode->hdisplay * assumed_bpp,
|
|
|
|
+ mode->vdisplay)) {
|
|
drm_mode_probed_add(connector, mode);
|
|
drm_mode_probed_add(connector, mode);
|
|
} else {
|
|
} else {
|
|
drm_mode_destroy(dev, mode);
|
|
drm_mode_destroy(dev, mode);
|
|
@@ -1983,7 +1992,8 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
|
|
bmode->vdisplay > max_height)
|
|
bmode->vdisplay > max_height)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- if (!vmw_kms_validate_mode_vram(dev_priv, bmode->hdisplay * 2,
|
|
|
|
|
|
+ if (!vmw_kms_validate_mode_vram(dev_priv,
|
|
|
|
+ bmode->hdisplay * assumed_bpp,
|
|
bmode->vdisplay))
|
|
bmode->vdisplay))
|
|
continue;
|
|
continue;
|
|
|
|
|