From: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>,
Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Maarten Lankhorst
<maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Maxime Ripard
<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Christian Gmeiner
<christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
Russell King
<linux+etnaviv-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Subject: Re: [PATCH 4/5] drm: v3d: Switch to use drm_gem_object reservation_object
Date: Fri, 01 Feb 2019 09:12:05 -0800 [thread overview]
Message-ID: <87tvhn4emy.fsf@anholt.net> (raw)
In-Reply-To: <20190201005057.13648-5-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1684 bytes --]
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> writes:
> Now that the base struct drm_gem_object has a reservation_object, use it
> and remove the private BO one.
>
> Cc: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
> Cc: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
> Cc: David Airlie <airlied-cv59FeDIM0c@public.gmane.org>
> Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> @@ -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.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2019-02-01 17:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 0:50 [PATCH 0/5] Add reservation_object to drm_gem_object Rob Herring
2019-02-01 0:50 ` [PATCH 1/5] drm: " Rob Herring
2019-02-01 12:39 ` kbuild test robot
[not found] ` <20190201005057.13648-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-02-01 17:21 ` Daniel Vetter
2019-02-01 0:50 ` [PATCH 5/5] drm: vc4: Switch to use drm_gem_object reservation_object Rob Herring
[not found] ` <20190201005057.13648-6-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-02-01 17:13 ` Eric Anholt
[not found] ` <20190201005057.13648-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-02-01 0:50 ` [PATCH 2/5] drm: etnaviv: " Rob Herring
2019-02-01 0:50 ` [PATCH 3/5] drm: msm: " Rob Herring
2019-02-01 0:50 ` [PATCH 4/5] drm: v3d: " Rob Herring
[not found] ` <20190201005057.13648-5-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-02-01 17:12 ` Eric Anholt [this message]
2019-02-01 17:38 ` Rob Herring
2019-02-01 17:23 ` [PATCH 0/5] Add reservation_object to drm_gem_object Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvhn4emy.fsf@anholt.net \
--to=eric-whkq6xtqapystnjn9+bgxg@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=daniel-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux+etnaviv-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox