[Letux-kernel] LetuxOS: Kernel: m-stable 5.4.77 successful

H. Nikolaus Schaller hns at goldelico.com
Fri Nov 27 16:24:54 CET 2020


> 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...

> 
> 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...

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list