-
Notifications
You must be signed in to change notification settings - Fork 5.2k
sh1106-spi invalid buffer alignment on 6.12 kernel #6733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Upstream have managed to configure two different kernel modules to have the same compatible string Both are getting loaded, and it's the gpu/drm/solomon driver that is crashing. If you want the deprecated fbtf version (which is what you appeared to have in 6.6), then create a file |
The splat after that is from the AXI DMAC driver - presumably this error path hasn't been called before... Also, I'm not entirely sure that the DMAC requires a word-aligned start address. It should only need naturally-aligned buffers with a length of integer multiples of SRC_WIDTH. |
The solomon driver hasn't set a dma_mask, hence the
|
The solomon driver is passing in an odd address for the transfer, which is not very friendly. The problem with the error path is that axi_desc_put assumes that the LLIs have been allocated and calls dma_pool_free on them. I'll fix the latter. |
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: raspberrypi#6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: raspberrypi#6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See #6734. |
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Please close the issue if it has been resolved. |
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Blacklisting the ssd130x-spi driver worked as a workaround for now, I will get around to testing a newer kernel version again hopefully by the end of the week. |
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The overlay and module loads now without problems, however, the ssd130x-spi module does not work well with sh1106 OLED, I will stick to the older module for now. |
Have you tried blacklisting fb_sh1106 instead of ssd130x-spi? With the recent fixes that have been applied (use However you don't want two modules trying to implement the same functionality. If ssd130x-spi works, then dropping fb_sh1106 from the defconfigs would be a good move. All the FBTFT drivers are orphaned and stuck in staging. |
This is a one off use case where I'll pretty much lock the software versions, so I'm just happy fb_sh1106 works fine. :) If I have to come across this again in the future, I'll look for better solutions. Thank you for your help! |
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: #6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Describe the bug
Trying to load the DT overlay and module for sh1106 display (possibly other SPI displays are affected too), fails with
invalid buffer alignment
.It is not necessary to have the actual display to be hooked up to reproduce the problem.
Doesn't happen on 6.6 kernel versions.
Steps to reproduce the behaviour
Execute:
Device (s)
Raspberry Pi 5
System
Logs
6.12_error.log
6.6 success log for comparison:
6.6_success.log
Additional context
No response
The text was updated successfully, but these errors were encountered: