Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45235 )
Change subject: libpayload: cbgfx: Fix 'equals' counter for Lanczos resampling ......................................................................
Patch Set 1:
(1 comment)
Can you explain exactly what the problem is (or did you just try around until it went away)? Because I'm not really seeing it yet or why your code is necessary to fix something. (Sorry, I know my code is hard to follow... but it's important we really understand what's going on here to make sure we can fix it in the most performant manner.)
I found one error in a different place and I guess your patch may be inadvertently working around that (because you're iterating over X before Y, which normally shouldn't make a difference, but it does because that bug can make it access uninitialized values in the array). Can you try to fix that instead and see if it has an effect on your 'k'?
https://review.coreboot.org/c/coreboot/+/45235/1/payloads/libpayload/drivers... File payloads/libpayload/drivers/video/graphics.c:
https://review.coreboot.org/c/coreboot/+/45235/1/payloads/libpayload/drivers... PS1, Line 873: sx I think this needs to be (sx - S0 >= dim_org->width), btw. Would be nice if you could fix that too while you're here. (I guess if the font glyph bitmaps are very small, this could actually be the reason for your bug?)