REVIEWED: Platform DRM messages...
This commit is contained in:
parent
749a512f13
commit
d0e638cc31
1 changed files with 8 additions and 4 deletions
|
@ -735,20 +735,24 @@ int InitPlatform(void)
|
||||||
|
|
||||||
#if defined(DEFAULT_GRAPHIC_DEVICE_DRM)
|
#if defined(DEFAULT_GRAPHIC_DEVICE_DRM)
|
||||||
platform.fd = open(DEFAULT_GRAPHIC_DEVICE_DRM, O_RDWR);
|
platform.fd = open(DEFAULT_GRAPHIC_DEVICE_DRM, O_RDWR);
|
||||||
|
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: Default graphic device DRM opened successfully");
|
||||||
#else
|
#else
|
||||||
TRACELOG(LOG_INFO, "DISPLAY: No graphic card set, trying platform-gpu-card");
|
TRACELOG(LOG_WARNING, "DISPLAY: No graphic card set, trying platform-gpu-card");
|
||||||
platform.fd = open("/dev/dri/by-path/platform-gpu-card", O_RDWR); // VideoCore VI (Raspberry Pi 4)
|
platform.fd = open("/dev/dri/by-path/platform-gpu-card", O_RDWR); // VideoCore VI (Raspberry Pi 4)
|
||||||
|
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: platform-gpu-card opened successfully");
|
||||||
|
|
||||||
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
|
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_INFO, "DISPLAY: Failed to open platform-gpu-card, trying card1");
|
TRACELOG(LOG_WARNING, "DISPLAY: Failed to open platform-gpu-card, trying card1");
|
||||||
platform.fd = open("/dev/dri/card1", O_RDWR); // Other Embedded
|
platform.fd = open("/dev/dri/card1", O_RDWR); // Other Embedded
|
||||||
|
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: card1 opened successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
|
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_INFO, "DISPLAY: Failed to open graphic card1, trying card0");
|
TRACELOG(LOG_WARNING, "DISPLAY: Failed to open graphic card1, trying card0");
|
||||||
platform.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)
|
platform.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)
|
||||||
|
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: card0 opened successfully");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1399,7 +1403,7 @@ static void ConfigureEvdevDevice(char *device)
|
||||||
int fd = open(device, O_RDONLY | O_NONBLOCK);
|
int fd = open(device, O_RDONLY | O_NONBLOCK);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "DRM: Failed to open input device: %s", device);
|
TRACELOG(LOG_WARNING, "SYSTEM: Failed to open input device: %s", device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue