[Letux-kernel] LetuxOS: Kernel: m-stable 5.4.77 successful
Andreas Kemnade
andreas at kemnade.info
Fri Nov 27 17:31:08 CET 2020
On Fri, 27 Nov 2020 16:24:54 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > Am 27.11.2020 um 14:47 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >
> > Hi,
> >
> > On Fri, 27 Nov 2020 10:26:14 +0100
> > "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >
> >>> Am 26.11.2020 um 21:57 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> >>>
> >>> Hi Andreas,
> >>>
> >>> In summary I think we must drop 881-882 and 907-913.
> >>>
> >>> What do you think?
> >>
> >>>
> >>>
> >>> diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
> >>> index 47585dcbafb4e9..f37af7ff785aaf 100644
> >>> --- a/drivers/gpu/drm/omapdrm/omap_gem.c
> >>> +++ b/drivers/gpu/drm/omapdrm/omap_gem.c
> >>> @@ -878,8 +878,6 @@ static void _omap_gem_unpin(struct drm_gem_object *obj)
> >>>
> >>> if (omap_gem_is_contiguous(omap_obj))
> >>> return;
> >>> - if (omap_obj->dma_addr_cnt--)
> >>> - return;
> >>> if (WARN_ON(!omap_obj->block))
> >>> return;
> >>>
> >>> @@ -904,13 +902,6 @@ static void _omap_gem_unpin(struct drm_gem_object *obj)
> >>> omap_obj->dma_addr = 0;
> >>> omap_obj->block = NULL;
> >>> }
> >>> - ret = tiler_release(omap_obj->block);
> >>> - if (ret) {
> >>> - dev_err(obj->dev->dev,
> >>> - "could not release unmap: %d\n", ret);
> >>> - }
> >>> - omap_obj->dma_addr = 0;
> >>> - omap_obj->block = NULL;
> >>> }
> >>>
> >>> /**
> >>>
> >>
> >> I have tested the patch and pyra display (still?) works with proper rotation.
> >>
> >> What was the symptom to get rid of?
> >>
> > Well, the symptom was that the code did not compile without alarming
> > warnings with are treated as errors. Your patch does not fix that. And
> > while analysing it I found not that the code is broken.
>
> Ah, now I see. Although there should have been a functional issue by decrementing
> too much and running tiler_release potentially twice...
>
I have seen several oopses in omap_gem.c which I have not traced down
all. So some of them might be related.
> >
> > My proposal is attached.
>
> Ok, I think functionally they are the same.
>
> But refcount_dec_and_test() does more tests and enforces a typed argument which
> ends in your compile error.
>
> So I think we can use your patch equally well. And I will take yours if it avoids
> redefining the data type of refcount_dec_and_test parameters...
Well, we would otherwise need to redefine dma_addr_cnt as it was done
in
commit cec4fa7511ef7a73eb635834e9d85b25a5b47a98
Author: Jean-Jacques Hiblot <jjhiblot at ti.com>
Date: Thu Oct 10 13:59:53 2019 +0200
drm/omap: use refcount API to track the number of users of dma_addr
And then the tiler patch was applied on top of that and cherry-picked
and that produced the mess.
Regards,
Andreas
More information about the Letux-kernel
mailing list