aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDeepak Rawat <drawat@vmware.com>2019-05-09 14:47:40 -0400
committerThomas Hellstrom <thellstrom@vmware.com>2019-06-18 09:20:11 -0400
commit03583e503de624b0672d1a1c16e66b39324db509 (patch)
treee6dcb32bc23d192de129ff92d448475a978e01fe /drivers/gpu
parent4ba397671237784a212378c271f700e99c66cf39 (diff)
drm/vmwgfx: Add debug message for layout change ioctl
Add debug code to check user-space layout change request. 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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.h8
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 5971c0d47507..b4c8817dc267 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -1424,6 +1424,14 @@ int vmw_host_log(const char *log);
1424#define VMW_DEBUG_USER(fmt, ...) \ 1424#define VMW_DEBUG_USER(fmt, ...) \
1425 DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__) 1425 DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
1426 1426
1427/**
1428 * VMW_DEBUG_KMS - Debug output for kernel mode-setting
1429 *
1430 * This macro is for debugging vmwgfx mode-setting code.
1431 */
1432#define VMW_DEBUG_KMS(fmt, ...) \
1433 DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
1434
1427/* Resource dirtying - vmwgfx_page_dirty.c */ 1435/* Resource dirtying - vmwgfx_page_dirty.c */
1428void vmw_bo_dirty_scan(struct vmw_buffer_object *vbo); 1436void vmw_bo_dirty_scan(struct vmw_buffer_object *vbo);
1429int vmw_bo_dirty_add(struct vmw_buffer_object *vbo); 1437int vmw_bo_dirty_add(struct vmw_buffer_object *vbo);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index b97bc8e5944b..7f9264a72e1d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -2347,6 +2347,9 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
2347 2347
2348 if (!arg->num_outputs) { 2348 if (!arg->num_outputs) {
2349 struct drm_rect def_rect = {0, 0, 800, 600}; 2349 struct drm_rect def_rect = {0, 0, 800, 600};
2350 VMW_DEBUG_KMS("Default layout x1 = %d y1 = %d x2 = %d y2 = %d\n",
2351 def_rect.x1, def_rect.y1,
2352 def_rect.x2, def_rect.y2);
2350 vmw_du_update_layout(dev_priv, 1, &def_rect); 2353 vmw_du_update_layout(dev_priv, 1, &def_rect);
2351 return 0; 2354 return 0;
2352 } 2355 }
@@ -2367,6 +2370,7 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
2367 2370
2368 drm_rects = (struct drm_rect *)rects; 2371 drm_rects = (struct drm_rect *)rects;
2369 2372
2373 VMW_DEBUG_KMS("Layout count = %u\n", arg->num_outputs);
2370 for (i = 0; i < arg->num_outputs; i++) { 2374 for (i = 0; i < arg->num_outputs; i++) {
2371 struct drm_vmw_rect curr_rect; 2375 struct drm_vmw_rect curr_rect;
2372 2376
@@ -2383,6 +2387,10 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
2383 drm_rects[i].x2 = curr_rect.x + curr_rect.w; 2387 drm_rects[i].x2 = curr_rect.x + curr_rect.w;
2384 drm_rects[i].y2 = curr_rect.y + curr_rect.h; 2388 drm_rects[i].y2 = curr_rect.y + curr_rect.h;
2385 2389
2390 VMW_DEBUG_KMS(" x1 = %d y1 = %d x2 = %d y2 = %d\n",
2391 drm_rects[i].x1, drm_rects[i].y1,
2392 drm_rects[i].x2, drm_rects[i].y2);
2393
2386 /* 2394 /*
2387 * Currently this check is limiting the topology within 2395 * Currently this check is limiting the topology within
2388 * mode_config->max (which actually is max texture size 2396 * mode_config->max (which actually is max texture size