All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/lease: debug output for lease creation
@ 2018-11-02 13:25 Daniel Vetter
  2018-11-02 13:25 ` [PATCH 2/3] drm/file: Uncompact the feature flags Daniel Vetter
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Daniel Vetter @ 2018-11-02 13:25 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development

I spent a bit of time scratching heads and figuring out why the igts
don't work. Probably useful to keep this work.

Cc: Keith Packard <keithp@keithp.com>
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_lease.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
index 9ab88db8fad0..46408278c5b1 100644
--- a/drivers/gpu/drm/drm_lease.c
+++ b/drivers/gpu/drm/drm_lease.c
@@ -419,14 +419,17 @@ static int fill_object_idr(struct drm_device *dev,
 		}
 
 		if (!drm_mode_object_lease_required(objects[o]->type)) {
+			DRM_DEBUG_KMS("invalid object for lease\n");
 			ret = -EINVAL;
 			goto out_free_objects;
 		}
 	}
 
 	ret = validate_lease(dev, lessor_priv, object_count, objects);
-	if (ret)
+	if (ret) {
+		DRM_DEBUG_LEASE("lease validation failed\n");
 		goto out_free_objects;
+	}
 
 	/* add their IDs to the lease request - taking into account
 	   universal planes */
@@ -509,15 +512,21 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
 		return -EOPNOTSUPP;
 
 	/* Do not allow sub-leases */
-	if (lessor->lessor)
+	if (lessor->lessor) {
+		DRM_DEBUG_LEASE("recursive leasing not allowed\n");
 		return -EINVAL;
+	}
 
 	/* need some objects */
-	if (cl->object_count == 0)
+	if (cl->object_count == 0) {
+		DRM_DEBUG_LEASE("no objects in lease\n");
 		return -EINVAL;
+	}
 
-	if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK)))
+	if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK))) {
+		DRM_DEBUG_LEASE("invalid flags\n");
 		return -EINVAL;
+	}
 
 	object_count = cl->object_count;
 
@@ -532,6 +541,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
 			      object_count, object_ids);
 	kfree(object_ids);
 	if (ret) {
+		DRM_DEBUG_LEASE("lease object lookup failed: %i\n", ret);
 		idr_destroy(&leases);
 		return ret;
 	}
-- 
2.14.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-11-06 17:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 13:25 [PATCH 1/3] drm/lease: debug output for lease creation Daniel Vetter
2018-11-02 13:25 ` [PATCH 2/3] drm/file: Uncompact the feature flags Daniel Vetter
2018-11-02 17:05   ` Chris Wilson
2018-11-02 13:25 ` [PATCH 3/3] drm/lease: look at ->universal_planes only once Daniel Vetter
2018-11-02 15:04   ` Keith Packard
2018-11-02 21:46   ` [PATCH] " Daniel Vetter
2018-11-05 10:12   ` Daniel Vetter
2018-11-06 17:23     ` Daniel Vetter
2018-11-02 14:18 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/lease: debug output for lease creation Patchwork
2018-11-02 14:36 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-02 15:02 ` [PATCH 1/3] " Keith Packard
2018-11-02 16:16 ` ✓ Fi.CI.IGT: success for series starting with [1/3] " Patchwork
2018-11-02 22:37 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/lease: debug output for lease creation (rev2) Patchwork
2018-11-05 10:26 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/lease: debug output for lease creation (rev3) Patchwork
2018-11-05 10:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-05 11:57 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-11-06  8:46 ` ✓ Fi.CI.IGT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.