Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clk: bcm: rpi: Add a function to retrieve the minimum
The RaspberryPi firmware can be configured by the end user using the config.txt file. Some of these options will affect the kernel capabilities, and we thus need to be able to detect it to operate reliably. One of such parameters is the core_clock parameter that allows users to setup the clocks in a way that is suitable to reach the pixel frequencies required by the 4096x2016 resolution at 60Hz and higher modes. If the user misconfigured it, then those modes will simply not work but are still likely to be picked up by the userspace, which is a poor user-experience. The kernel can't access the config.txt file directly, but one of the effect that parameter has is that the core clock frequency minimum will be raised. Thus we can infer its setup by querying the firmware for that minimum, and if it isn't ignore any of the modes that wouldn't work. We had in the past a discussion for the maximum and it was suggested to create a small, ad-hoc function to query the RaspberryPi firmware for the minimum rate a given clock has, so let's do the same here. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
- Loading branch information