-
Notifications
You must be signed in to change notification settings - Fork 5.2k
vcio rewrite #4624
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
vcio rewrite #4624
Conversation
The old vcio driver is a simple character device that manually locates the firmware driver. Initialising it before the firmware driver causes a failure, and no retries are attempted. Rewrite vcio as a platform driver that depends on a DT node for its instantiation and the location of the firmware driver, making use of the miscdevice framework to reduce the code size. N.B. Using miscdevice changes the udev SUBSYSTEM string, so a change to the companion udev rule is required in order to continue to set the correct device permissions, e.g.: KERNEL="vcio", GROUP="video", MODE="0660" See: raspberrypi#4620 Signed-off-by: Phil Elwell <[email protected]>
In order to resolve a potential startup order bug, the vcio driver has been rewritten as a platform driver that depends on a DT node for its instantiation and to locate the firmware driver. Add that DT node. See: raspberrypi#4620 Signed-off-by: Phil Elwell <[email protected]>
@vianpl @waveform80 @Dark-Sky @graysky2 I'd like to merge this PR soon but also want to warn you about the possible need to update your udev rules as shown above. If you are make that change, I would recommend also changing the rule for vchiq in the same way:
|
@pelwell - Thanks for the heads-up |
I should also have mentioned that it is safe to make the udev changes now - they are backwards compatible. |
@pelwell - For Arch ARM, I believe this change only affects a single line. Can you view the above mentioned commit in my udev rules for kodi for sanity? |
That looks fine (although it doesn't need the extra space). The vchiq change is only in linux-next at the moment, so you have plenty of time to roll out your patch. |
Thanks, if it is backwards compatible I will just work it in sooner than later or else I might forgot 😄 |
@pelwell Thank you very much for the heads up! |
Thank you all - this PR has now been merged. Send any complaints in my direction. |
P.S. RPiOS users can install the updated udev rule with:
|
See: raspberrypi/linux#4624 kernel: Wrap PWM output as GPIO See: raspberrypi/linux#4629 kernel: mmc: sdhost: Pass DT pointer to rpi_firmware_get kernel: ARM: dts: Give sdhost a firmware reference See: raspberrypi/linux#4631 kernel: rtc: pcf85063: Always clear EXT_TEST from set_time
See: raspberrypi/linux#4624 kernel: Wrap PWM output as GPIO See: raspberrypi/linux#4629 kernel: mmc: sdhost: Pass DT pointer to rpi_firmware_get kernel: ARM: dts: Give sdhost a firmware reference See: raspberrypi/linux#4631 kernel: rtc: pcf85063: Always clear EXT_TEST from set_time
#4620 identified a problem with kernel startup ordering that can break the vcio device. This PR avoids the problem by making vcio a platform device, instantiated from Device Tree.
Note that using the new driver will require a corresponding udev rule change (backwards-compatible):
(was
SUBSYSTEM=="bcm2708_vcio", ...
)