Rob Herring <[email protected]> writes: > Now that the base struct drm_gem_object has a reservation_object, use it > and remove the private BO one. > > Cc: Eric Anholt <[email protected]> > Cc: Daniel Vetter <[email protected]> > Cc: David Airlie <[email protected]> > Cc: [email protected] > Signed-off-by: Rob Herring <[email protected]>
> @@ -453,8 +453,6 @@ v3d_wait_bo_ioctl(struct drm_device *dev, void *data,
> {
> int ret;
> struct drm_v3d_wait_bo *args = data;
> - struct drm_gem_object *gem_obj;
> - struct v3d_bo *bo;
> ktime_t start = ktime_get();
> u64 delta_ns;
> unsigned long timeout_jiffies =
> @@ -463,21 +461,8 @@ v3d_wait_bo_ioctl(struct drm_device *dev, void *data,
> if (args->pad != 0)
> return -EINVAL;
>
> - gem_obj = drm_gem_object_lookup(file_priv, args->handle);
> - if (!gem_obj) {
> - DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle);
> - return -EINVAL;
> - }
> - bo = to_v3d_bo(gem_obj);
> -
> - ret = reservation_object_wait_timeout_rcu(bo->resv,
> - true, true,
> - timeout_jiffies);
> -
> - if (ret == 0)
> - ret = -ETIME;
> - else if (ret > 0)
> - ret = 0;
> + ret = drm_gem_reservation_object_wait(file_priv, args->handle,
> + true, timeout_jiffies);
Looks like you lost my ret handling in the change.
Honestly, I'd love to see drm_gem_reservation_object_wait return
sensible values like this (0 for success, -ETIME for timeouts) instead
of drivers having to stubmle over this API.
signature.asc
Description: PGP signature
_______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
