Hi Vladimir
I really don't get what's the problem here. The listing of ld9040_prepare at the given commit and with the given .config is:
The culprint is likely ld9040_brightness_set() that is inlined.
I think we have troubles with
static u8 const ld9040_gammas[25][22]
I did not look closely but if you can reproduce this is where I think you should look.
Sam