raspberrypi / userland

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.
BSD 3-Clause "New" or "Revised" License
2.05k stars 1.09k forks source link

CM4 host #695

Closed gregoryjaooi closed 3 years ago

gregoryjaooi commented 3 years ago

Problem : Some users are using CM4 and the source codes are using bcm_host_is_model_pi4() function call to check for BCM2711 to differentiate from other older Pi Models. As such, the same application has error/issues running on CM4 (0x14) or PI400 (0x13) while on PI4 (x11) there are no issues at all.

/ Returns the type of the Pi being used / int bcm_host_is_model_pi4(void) { return bcm_host_get_model_type() == 0x11 ? 1 : 0; }

Or may be there should be a better work around that I am not aware of.

pelwell commented 3 years ago

@popcornmix may have some thoughts on the matter, but as you say I think this function makes more sense as a way of detecting any member of the Pi 4 family, i.e. 4B, 400 and CM4. This is equivalent to checking if the processor is a BCM2711, so I think it should be implemented in that way. While looking at this I also noticed that the list of processor types include BCM2838 - our guess at the Broadcom name for what turned out to be called BCM2711. BCM_HOST_PROCESSOR_BCM2711 should be included as an alias.

pelwell commented 3 years ago

See https://github.com/raspberrypi/userland/pull/696.

gregoryjaooi commented 3 years ago

This issue can be closed as CM4 is running very well now after raspi-update. Thanks.