aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Rawat <drawat@vmware.com>2019-05-09 15:42:58 -0400
committerThomas Hellstrom <thellstrom@vmware.com>2019-06-18 09:21:04 -0400
commit358d76d9b577aefba973aea9a50dbfcbaac25d6e (patch)
tree11559349990e6f16a817d39b3c2c2f13c80bd84b
parent03583e503de624b0672d1a1c16e66b39324db509 (diff)
drm/vmwgfx: Use VMW_DEBUG_KMS for vmwgfx mode-setting user errors
For errors during layout change ioctl use VMW_DEBUG_KMS instead of DRM_ERROR. Signed-off-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 7f9264a72e1d..e7222fa2cfdf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -1462,7 +1462,7 @@ static int vmw_kms_check_display_memory(struct drm_device *dev,
1462 if (dev_priv->active_display_unit == vmw_du_screen_target && 1462 if (dev_priv->active_display_unit == vmw_du_screen_target &&
1463 (drm_rect_width(&rects[i]) > dev_priv->stdu_max_width || 1463 (drm_rect_width(&rects[i]) > dev_priv->stdu_max_width ||
1464 drm_rect_height(&rects[i]) > dev_priv->stdu_max_height)) { 1464 drm_rect_height(&rects[i]) > dev_priv->stdu_max_height)) {
1465 DRM_ERROR("Screen size not supported.\n"); 1465 VMW_DEBUG_KMS("Screen size not supported.\n");
1466 return -EINVAL; 1466 return -EINVAL;
1467 } 1467 }
1468 1468
@@ -1486,7 +1486,7 @@ static int vmw_kms_check_display_memory(struct drm_device *dev,
1486 * limit on primary bounding box 1486 * limit on primary bounding box
1487 */ 1487 */
1488 if (pixel_mem > dev_priv->prim_bb_mem) { 1488 if (pixel_mem > dev_priv->prim_bb_mem) {
1489 DRM_ERROR("Combined output size too large.\n"); 1489 VMW_DEBUG_KMS("Combined output size too large.\n");
1490 return -EINVAL; 1490 return -EINVAL;
1491 } 1491 }
1492 1492
@@ -1496,7 +1496,7 @@ static int vmw_kms_check_display_memory(struct drm_device *dev,
1496 bb_mem = (u64) bounding_box.x2 * bounding_box.y2 * 4; 1496 bb_mem = (u64) bounding_box.x2 * bounding_box.y2 * 4;
1497 1497
1498 if (bb_mem > dev_priv->prim_bb_mem) { 1498 if (bb_mem > dev_priv->prim_bb_mem) {
1499 DRM_ERROR("Topology is beyond supported limits.\n"); 1499 VMW_DEBUG_KMS("Topology is beyond supported limits.\n");
1500 return -EINVAL; 1500 return -EINVAL;
1501 } 1501 }
1502 } 1502 }
@@ -1645,6 +1645,7 @@ static int vmw_kms_check_topology(struct drm_device *dev,
1645 struct vmw_connector_state *vmw_conn_state; 1645 struct vmw_connector_state *vmw_conn_state;
1646 1646
1647 if (!du->pref_active && new_crtc_state->enable) { 1647 if (!du->pref_active && new_crtc_state->enable) {
1648 VMW_DEBUG_KMS("Enabling a disabled display unit\n");
1648 ret = -EINVAL; 1649 ret = -EINVAL;
1649 goto clean; 1650 goto clean;
1650 } 1651 }
@@ -1701,8 +1702,10 @@ vmw_kms_atomic_check_modeset(struct drm_device *dev,
1701 return ret; 1702 return ret;
1702 1703
1703 ret = vmw_kms_check_implicit(dev, state); 1704 ret = vmw_kms_check_implicit(dev, state);
1704 if (ret) 1705 if (ret) {
1706 VMW_DEBUG_KMS("Invalid implicit state\n");
1705 return ret; 1707 return ret;
1708 }
1706 1709
1707 if (!state->allow_modeset) 1710 if (!state->allow_modeset)
1708 return ret; 1711 return ret;
@@ -2401,7 +2404,9 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
2401 if (drm_rects[i].x1 < 0 || drm_rects[i].y1 < 0 || 2404 if (drm_rects[i].x1 < 0 || drm_rects[i].y1 < 0 ||
2402 drm_rects[i].x2 > mode_config->max_width || 2405 drm_rects[i].x2 > mode_config->max_width ||
2403 drm_rects[i].y2 > mode_config->max_height) { 2406 drm_rects[i].y2 > mode_config->max_height) {
2404 DRM_ERROR("Invalid GUI layout.\n"); 2407 VMW_DEBUG_KMS("Invalid layout %d %d %d %d\n",
2408 drm_rects[i].x1, drm_rects[i].y1,
2409 drm_rects[i].x2, drm_rects[i].y2);
2405 ret = -EINVAL; 2410 ret = -EINVAL;
2406 goto out_free; 2411 goto out_free;
2407 } 2412 }