v3dv/device: handle primary nodes for newer kernels

For kernels rpi-5.X.y it changed from brcm,bcm2835-vc4 to
brcm,bcm2711-vc5, so let's just check for both strings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
n00b7
2020-07-03 10:46:51 +02:00
committed by Marge Bot
parent 3bd02a729a
commit aebfdfa04c

View File

@@ -503,7 +503,8 @@ enumerate_devices(struct v3dv_instance *instance)
} else if (devices[i]->available_nodes & 1 << DRM_NODE_PRIMARY) {
char **compat = devices[i]->deviceinfo.platform->compatible;
while (*compat) {
if (strncmp(*compat, "brcm,bcm2835-vc4", 16) == 0) {
if (strncmp(*compat, "brcm,bcm2711-vc5", 16) == 0 ||
strncmp(*compat, "brcm,bcm2835-vc4", 16) == 0 ) {
vc4_idx = i;
break;
}