[Letux-kernel] LetuxOS: Kernel: m-stable 5.4.77 successful
H. Nikolaus Schaller
hns at goldelico.com
Sat Nov 21 08:46:44 CET 2020
Hi Andreas,
> Am 20.11.2020 um 22:37 schrieb Andreas Kemnade <andreas at kemnade.info>:
>
> On Fri, 20 Nov 2020 22:26:16 +0100
> Andreas Kemnade <andreas at kemnade.info> wrote:
>
>> On Mon, 16 Nov 2020 15:20:24 +0100 (CET)
>> hns at goldelico.com (H. Nikolaus Schaller) wrote:
>>
>>> KVERSION: v5.4.77 - http://www.kernel.org
>>> CONFIGS: arch/arm/configs/letux_defconfig arch/arm/configs/letux_lpae_defconfig arch/mips/configs/letux_defconfig
>>>
>> does not compile here
>> CC [M] drivers/gpu/drm/omapdrm/omap_gem.o
>> /home/andi/kernel/drivers/gpu/drm/omapdrm/omap_gem.c: In function ‘_omap_gem_unpin’:
>> /home/andi/kernel/drivers/gpu/drm/omapdrm/omap_gem.c:886:28: error: passing argument 1 of ‘refcount_dec_and_test_checked’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>> if (refcount_dec_and_test(&omap_obj->dma_addr_cnt)) {
>> ^~~~~~~~~~~~~~~~~~~~~~~
>> In file included from /home/andi/kernel/include/linux/kref.h:17,
>> from /home/andi/kernel/include/linux/kobject.h:23,
>> from /home/andi/kernel/include/linux/device.h:16,
>> from /home/andi/kernel/include/linux/dma-mapping.h:7,
>> from /home/andi/kernel/drivers/gpu/drm/omapdrm/omap_gem.c:7:
>> /home/andi/kernel/include/linux/refcount.h:54:68: note: expected ‘refcount_t *’ {aka ‘struct refcount_struct *’} but argument is of type ‘u32 *’ {aka ‘unsigned int *’}
>> extern __must_check bool refcount_dec_and_test_checked(refcount_t *r);
>> ~~~~~~~~~~~~^
>> cc1: some warnings being treated as errors
Yes, my compiler also complains but does not treat it as error:
https://download.goldelico.com/letux-kernel/letux-5.4.77/src/warnings.log
>>
>> git blame:
>> commit a882ed5f130ce0d467944a5d0a4d1e7259d815af
>> Author: Matthijs van Duin <matthijsvanduin at gmail.com>
>> Date: Fri Jun 19 16:34:41 2020 +0100
>>
>> omapdrm: Use sg_table for dmabufs to enable width != 8192
>>
>> This fixes cases other than width=8k/stride=32k by using a proper
>> sg_table with multiple entries for dmabufs, mapping each line
>> to its correct TILER address.
>>
>> Original-by: Matthijs van Duin <matthijsvanduin at gmail.com>
>> Signed-off-by: David Shah <dave at ds0.me>
>>
>> Hmm, letux-5.9 compiles, so any dangerous cherry-picking here?!
AFAIR 5.4 did have a lot of trouble and I am not 100% sure if the tiler rotation works
properly at all. 5.6 was the best kernel for a while and 5.9 should be best.
>>
> the logic looks ill:
> return;
> if (omap_obj->dma_addr_cnt--)
> return;
> if (WARN_ON(!omap_obj->block))
> return;
>
> if (refcount_dec_and_test(&omap_obj->dma_addr_cnt)) {
>
> That looks a bit duplicated here (besides of the type problem).
> dma_addr_cnt will always be 0 if that if is reached.
> And then the 0 is decremented and checked if it is zero?!
Yes, it may be a cherry-pick with bad automatic or manual conflict resolution.
It may come from a patch backported from 5.6. AFAIR, 5.6 was the best Pyra kernel
for a while and is currently used by PyraOS. But it is no longer maintained.
I haven't looked into 5.9 code - does it look better? Then we should
backport/fix the 5.4 version as needed.
BR,
Nikolaus
More information about the Letux-kernel
mailing list