* [PATCH] drm/lima: fix lima_gem_wait() return value @ 2019-09-08 2:48 Vasily Khoruzhick 2019-09-09 2:30 ` Qiang Yu 0 siblings, 1 reply; 6+ messages in thread From: Vasily Khoruzhick @ 2019-09-08 2:48 UTC (permalink / raw) To: Qiang Yu, David Airlie, Daniel Vetter, dri-devel, lima Cc: Vasily Khoruzhick, stable drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME if it timeouts, but lima driver assumed that 0 is error. Cc: stable@vger.kernel.org Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> --- drivers/gpu/drm/lima/lima_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c index 477c0f766663..b609dc030d6c 100644 --- a/drivers/gpu/drm/lima/lima_gem.c +++ b/drivers/gpu/drm/lima/lima_gem.c @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) timeout = drm_timeout_abs_to_jiffies(timeout_ns); ret = drm_gem_reservation_object_wait(file, handle, write, timeout); - if (ret == 0) + if (ret == -ETIME) ret = timeout ? -ETIMEDOUT : -EBUSY; return ret; -- 2.23.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/lima: fix lima_gem_wait() return value 2019-09-08 2:48 [PATCH] drm/lima: fix lima_gem_wait() return value Vasily Khoruzhick @ 2019-09-09 2:30 ` Qiang Yu 2019-09-09 12:18 ` [Lima] " Heiko Stübner 0 siblings, 1 reply; 6+ messages in thread From: Qiang Yu @ 2019-09-09 2:30 UTC (permalink / raw) To: Vasily Khoruzhick; +Cc: David Airlie, Daniel Vetter, dri-devel, lima, stable Oh, I was miss leading by the drm_gem_reservation_object_wait comments. Patch is: Reviewed-by: Qiang Yu <yuq825@gmail.com> I'll apply this patch to drm-misc-next. Current kernel release is 5.3-rc8, is it too late for this fix to go into the mainline 5.3 release? I'd like to know how to apply this fix for current rc kernels, by drm-misc-fixes? Can I push to drm-misc-fixes by dim or I can only push to drm-misc-next and drm-misc maintainer will pick fixes from it to drm-misc-fixes? Thanks, Qiang On Sun, Sep 8, 2019 at 10:48 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME > if it timeouts, but lima driver assumed that 0 is error. > > Cc: stable@vger.kernel.org > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > --- > drivers/gpu/drm/lima/lima_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c > index 477c0f766663..b609dc030d6c 100644 > --- a/drivers/gpu/drm/lima/lima_gem.c > +++ b/drivers/gpu/drm/lima/lima_gem.c > @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) > timeout = drm_timeout_abs_to_jiffies(timeout_ns); > > ret = drm_gem_reservation_object_wait(file, handle, write, timeout); > - if (ret == 0) > + if (ret == -ETIME) > ret = timeout ? -ETIMEDOUT : -EBUSY; > > return ret; > -- > 2.23.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lima] [PATCH] drm/lima: fix lima_gem_wait() return value 2019-09-09 2:30 ` Qiang Yu @ 2019-09-09 12:18 ` Heiko Stübner 2019-09-09 16:23 ` Vasily Khoruzhick 0 siblings, 1 reply; 6+ messages in thread From: Heiko Stübner @ 2019-09-09 12:18 UTC (permalink / raw) To: lima Cc: Qiang Yu, Vasily Khoruzhick, David Airlie, stable, dri-devel, Daniel Vetter Hi Qiang, Am Montag, 9. September 2019, 04:30:43 CEST schrieb Qiang Yu: > Oh, I was miss leading by the drm_gem_reservation_object_wait > comments. Patch is: > Reviewed-by: Qiang Yu <yuq825@gmail.com> > > I'll apply this patch to drm-misc-next. > > Current kernel release is 5.3-rc8, is it too late for this fix to go > into the mainline 5.3 release? > I'd like to know how to apply this fix for current rc kernels, by > drm-misc-fixes? Can I push > to drm-misc-fixes by dim or I can only push to drm-misc-next and > drm-misc maintainer will > pick fixes from it to drm-misc-fixes? drm-misc-fixes gets merged into drm-misc-next by maintainers regularly, so I _think_ you should apply the fix-patch to drm-misc-fixes first. [I also always have to read the documentation ;-) ] In any case you might want to add a "Fixes: ....." tag as well as a "Cc: stable@vger.kernel.org" tag, so it can be backported to stable kernels if applicable. Heiko > On Sun, Sep 8, 2019 at 10:48 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > > > drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME > > if it timeouts, but lima driver assumed that 0 is error. > > > > Cc: stable@vger.kernel.org > > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > > --- > > drivers/gpu/drm/lima/lima_gem.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c > > index 477c0f766663..b609dc030d6c 100644 > > --- a/drivers/gpu/drm/lima/lima_gem.c > > +++ b/drivers/gpu/drm/lima/lima_gem.c > > @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) > > timeout = drm_timeout_abs_to_jiffies(timeout_ns); > > > > ret = drm_gem_reservation_object_wait(file, handle, write, timeout); > > - if (ret == 0) > > + if (ret == -ETIME) > > ret = timeout ? -ETIMEDOUT : -EBUSY; > > > > return ret; > > -- > > 2.23.0 > > > _______________________________________________ > lima mailing list > lima@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/lima ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lima] [PATCH] drm/lima: fix lima_gem_wait() return value 2019-09-09 12:18 ` [Lima] " Heiko Stübner @ 2019-09-09 16:23 ` Vasily Khoruzhick 2019-09-10 1:16 ` Qiang Yu 0 siblings, 1 reply; 6+ messages in thread From: Vasily Khoruzhick @ 2019-09-09 16:23 UTC (permalink / raw) To: Heiko Stübner Cc: lima, Qiang Yu, David Airlie, stable, dri-devel, Daniel Vetter On Mon, Sep 9, 2019 at 5:18 AM Heiko Stübner <heiko@sntech.de> wrote: > > Hi Qiang, > > Am Montag, 9. September 2019, 04:30:43 CEST schrieb Qiang Yu: > > Oh, I was miss leading by the drm_gem_reservation_object_wait > > comments. Patch is: > > Reviewed-by: Qiang Yu <yuq825@gmail.com> > > > > I'll apply this patch to drm-misc-next. > > > > Current kernel release is 5.3-rc8, is it too late for this fix to go > > into the mainline 5.3 release? > > I'd like to know how to apply this fix for current rc kernels, by > > drm-misc-fixes? Can I push > > to drm-misc-fixes by dim or I can only push to drm-misc-next and > > drm-misc maintainer will > > pick fixes from it to drm-misc-fixes? > > drm-misc-fixes gets merged into drm-misc-next by maintainers regularly, > so I _think_ you should apply the fix-patch to drm-misc-fixes first. > [I also always have to read the documentation ;-) ] > > In any case you might want to add a "Fixes: ....." tag as well as a > "Cc: stable@vger.kernel.org" tag, so it can be backported to stable > kernels if applicable. Cc: stable is already here, but I think it still needs "Fixes: " tag. Qiang, can you add it at your side or you want me to resend the patch? > > Heiko > > > On Sun, Sep 8, 2019 at 10:48 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > > > > > drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME > > > if it timeouts, but lima driver assumed that 0 is error. > > > > > > Cc: stable@vger.kernel.org > > > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > > > --- > > > drivers/gpu/drm/lima/lima_gem.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c > > > index 477c0f766663..b609dc030d6c 100644 > > > --- a/drivers/gpu/drm/lima/lima_gem.c > > > +++ b/drivers/gpu/drm/lima/lima_gem.c > > > @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) > > > timeout = drm_timeout_abs_to_jiffies(timeout_ns); > > > > > > ret = drm_gem_reservation_object_wait(file, handle, write, timeout); > > > - if (ret == 0) > > > + if (ret == -ETIME) > > > ret = timeout ? -ETIMEDOUT : -EBUSY; > > > > > > return ret; > > > -- > > > 2.23.0 > > > > > _______________________________________________ > > lima mailing list > > lima@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/lima > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lima] [PATCH] drm/lima: fix lima_gem_wait() return value 2019-09-09 16:23 ` Vasily Khoruzhick @ 2019-09-10 1:16 ` Qiang Yu 2019-09-10 3:09 ` Qiang Yu 0 siblings, 1 reply; 6+ messages in thread From: Qiang Yu @ 2019-09-10 1:16 UTC (permalink / raw) To: Vasily Khoruzhick Cc: Heiko Stübner, lima, David Airlie, stable, dri-devel, Daniel Vetter Thanks Heiko, I'll push this patch to drm-misc-fixes. I can add the Fixes tag before push. Thanks, Qiang On Tue, Sep 10, 2019 at 12:23 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > On Mon, Sep 9, 2019 at 5:18 AM Heiko Stübner <heiko@sntech.de> wrote: > > > > Hi Qiang, > > > > Am Montag, 9. September 2019, 04:30:43 CEST schrieb Qiang Yu: > > > Oh, I was miss leading by the drm_gem_reservation_object_wait > > > comments. Patch is: > > > Reviewed-by: Qiang Yu <yuq825@gmail.com> > > > > > > I'll apply this patch to drm-misc-next. > > > > > > Current kernel release is 5.3-rc8, is it too late for this fix to go > > > into the mainline 5.3 release? > > > I'd like to know how to apply this fix for current rc kernels, by > > > drm-misc-fixes? Can I push > > > to drm-misc-fixes by dim or I can only push to drm-misc-next and > > > drm-misc maintainer will > > > pick fixes from it to drm-misc-fixes? > > > > drm-misc-fixes gets merged into drm-misc-next by maintainers regularly, > > so I _think_ you should apply the fix-patch to drm-misc-fixes first. > > [I also always have to read the documentation ;-) ] > > > > In any case you might want to add a "Fixes: ....." tag as well as a > > "Cc: stable@vger.kernel.org" tag, so it can be backported to stable > > kernels if applicable. > > Cc: stable is already here, but I think it still needs "Fixes: " tag. > > Qiang, can you add it at your side or you want me to resend the patch? > > > > > Heiko > > > > > On Sun, Sep 8, 2019 at 10:48 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > > > > > > > drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME > > > > if it timeouts, but lima driver assumed that 0 is error. > > > > > > > > Cc: stable@vger.kernel.org > > > > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > > > > --- > > > > drivers/gpu/drm/lima/lima_gem.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c > > > > index 477c0f766663..b609dc030d6c 100644 > > > > --- a/drivers/gpu/drm/lima/lima_gem.c > > > > +++ b/drivers/gpu/drm/lima/lima_gem.c > > > > @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) > > > > timeout = drm_timeout_abs_to_jiffies(timeout_ns); > > > > > > > > ret = drm_gem_reservation_object_wait(file, handle, write, timeout); > > > > - if (ret == 0) > > > > + if (ret == -ETIME) > > > > ret = timeout ? -ETIMEDOUT : -EBUSY; > > > > > > > > return ret; > > > > -- > > > > 2.23.0 > > > > > > > _______________________________________________ > > > lima mailing list > > > lima@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/lima > > > > > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Lima] [PATCH] drm/lima: fix lima_gem_wait() return value 2019-09-10 1:16 ` Qiang Yu @ 2019-09-10 3:09 ` Qiang Yu 0 siblings, 0 replies; 6+ messages in thread From: Qiang Yu @ 2019-09-10 3:09 UTC (permalink / raw) To: Vasily Khoruzhick Cc: Heiko Stübner, lima, David Airlie, stable, dri-devel, Daniel Vetter I've pushed this patch to drm-misc-fixes: https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-fixes&id=21670bd78a25001cf8ef2679b378c73fb73b904f There is a conflict when drm-tip merge process which has been solved by following the doc: https://drm.pages.freedesktop.org/maintainer-tools/drm-tip.html drm_gem_reservation_object_wait() has been renamed to drm_gem_dma_resv_wait() in drm-misc-next and drm-next. Please let me know if I have to also push this fix to drm-misc-next by my own. Thanks, Qiang On Tue, Sep 10, 2019 at 9:16 AM Qiang Yu <yuq825@gmail.com> wrote: > > Thanks Heiko, I'll push this patch to drm-misc-fixes. > > I can add the Fixes tag before push. > > Thanks, > Qiang > > On Tue, Sep 10, 2019 at 12:23 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > > > On Mon, Sep 9, 2019 at 5:18 AM Heiko Stübner <heiko@sntech.de> wrote: > > > > > > Hi Qiang, > > > > > > Am Montag, 9. September 2019, 04:30:43 CEST schrieb Qiang Yu: > > > > Oh, I was miss leading by the drm_gem_reservation_object_wait > > > > comments. Patch is: > > > > Reviewed-by: Qiang Yu <yuq825@gmail.com> > > > > > > > > I'll apply this patch to drm-misc-next. > > > > > > > > Current kernel release is 5.3-rc8, is it too late for this fix to go > > > > into the mainline 5.3 release? > > > > I'd like to know how to apply this fix for current rc kernels, by > > > > drm-misc-fixes? Can I push > > > > to drm-misc-fixes by dim or I can only push to drm-misc-next and > > > > drm-misc maintainer will > > > > pick fixes from it to drm-misc-fixes? > > > > > > drm-misc-fixes gets merged into drm-misc-next by maintainers regularly, > > > so I _think_ you should apply the fix-patch to drm-misc-fixes first. > > > [I also always have to read the documentation ;-) ] > > > > > > In any case you might want to add a "Fixes: ....." tag as well as a > > > "Cc: stable@vger.kernel.org" tag, so it can be backported to stable > > > kernels if applicable. > > > > Cc: stable is already here, but I think it still needs "Fixes: " tag. > > > > Qiang, can you add it at your side or you want me to resend the patch? > > > > > > > > Heiko > > > > > > > On Sun, Sep 8, 2019 at 10:48 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote: > > > > > > > > > > drm_gem_reservation_object_wait() returns 0 if it succeeds and -ETIME > > > > > if it timeouts, but lima driver assumed that 0 is error. > > > > > > > > > > Cc: stable@vger.kernel.org > > > > > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > > > > > --- > > > > > drivers/gpu/drm/lima/lima_gem.c | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c > > > > > index 477c0f766663..b609dc030d6c 100644 > > > > > --- a/drivers/gpu/drm/lima/lima_gem.c > > > > > +++ b/drivers/gpu/drm/lima/lima_gem.c > > > > > @@ -342,7 +342,7 @@ int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns) > > > > > timeout = drm_timeout_abs_to_jiffies(timeout_ns); > > > > > > > > > > ret = drm_gem_reservation_object_wait(file, handle, write, timeout); > > > > > - if (ret == 0) > > > > > + if (ret == -ETIME) > > > > > ret = timeout ? -ETIMEDOUT : -EBUSY; > > > > > > > > > > return ret; > > > > > -- > > > > > 2.23.0 > > > > > > > > > _______________________________________________ > > > > lima mailing list > > > > lima@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/lima > > > > > > > > > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-10 3:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-09-08 2:48 [PATCH] drm/lima: fix lima_gem_wait() return value Vasily Khoruzhick 2019-09-09 2:30 ` Qiang Yu 2019-09-09 12:18 ` [Lima] " Heiko Stübner 2019-09-09 16:23 ` Vasily Khoruzhick 2019-09-10 1:16 ` Qiang Yu 2019-09-10 3:09 ` Qiang Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).