Skip to content

Vchiq cache #2666

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

Merged
merged 4 commits into from
Aug 29, 2018
Merged

Vchiq cache #2666

merged 4 commits into from
Aug 29, 2018

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Aug 28, 2018

This series of commits gives the vchiq driver the ability to discern the
correct cache_line_size value in the absence of the cache-line-size
property. The correction of the reg size value doubles as a hint to
the firmware that the kernel includes the updated value.

See: #2643

Signed-off-by: Phil Elwell [email protected]

Phil Elwell added 3 commits August 28, 2018 10:36
The ARM coprocessor registers include dcache line size, but there is no
function to expose this value. Rather than create a new one, use the
read_cpuid_id function to derive the correct value, which is 32 for
BCM2835 and 64 for BCM2836/7.

Signed-off-by: Phil Elwell <[email protected]>
The size field in a Device Tree "reg" property is encoded in bytes, not
words.

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor Author

pelwell commented Aug 28, 2018

A preview firmware release that implements the new logic can be downloaded here: https://drive.google.com/file/d/13c66cJkNmCQFMd7_f3GNA_tk5usoK0ZW/view?usp=sharing

@HiassofT
Copy link
Contributor

Thanks a lot!

Testing on RPi3B+ with the preview firmware worked fine - tvservice -m showed correct lists of modes.

When using the current official firmware I got a corrupted mode list with this PR - but I guess this is to be expected?

@pelwell
Copy link
Contributor Author

pelwell commented Aug 28, 2018

Yes it is. The current firmware assumes that a lack of cache-line-size property (strictly, a lack of cache_line_size parameter) means it is a very old BCM2835 kernel and therefore requires a 32 byte cache line. I could improve backwards compatibility on a downstream kernel/DTB by retaining a cache_line_size parameter that does nothing...

Retain a vestigial cache_line_size parameter to improve backwards-
compatibility.

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor Author

pelwell commented Aug 28, 2018

The DT commit has been updated to retain a vestigial cache_line_size parameter, which should keep old firmware happy.

@HiassofT
Copy link
Contributor

thanks, the updated version works fine with the August 24 firmware

@mkreisl
Copy link

mkreisl commented Aug 28, 2018

Confirmed, 4.18.5 works with older firmware (Jul 23)

@popcornmix popcornmix merged commit 5655d36 into raspberrypi:rpi-4.18.y Aug 29, 2018
@pelwell pelwell deleted the vchiq_cache branch September 15, 2021 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants