Merge branch 'px30' into 'rel-5-0'

add option for platform px30

See merge request VincentWei/minigui!17
This commit is contained in:
Vincent Wei
2021-06-21 16:29:17 +08:00
2 changed files with 11 additions and 1 deletions

View File

@@ -1636,7 +1636,7 @@ dnl ;;
dnl esac
AC_ARG_WITH(targetname,
[ --with-targetname=TARGET the target name <unknown, external, fmsoft, mstudio, r818, or vxi386>])
[ --with-targetname=TARGET the target name <unknown, external, fmsoft, mstudio, r818, px30, or vxi386>])
case "$with_targetname" in
external)
@@ -1652,6 +1652,9 @@ case "$with_targetname" in
r818)
AC_DEFINE(__TARGET_R818__, 1, [Define for Allwinner R818 target])
;;
px30)
AC_DEFINE(__TARGET_PX30__, 1, [Define for Rockchip PX30 target])
;;
vxi386)
AC_DEFINE(__TARGET_VXI386__, 1, [Define for VxWorks on i386])
;;

View File

@@ -952,6 +952,11 @@ static void DRM_DeleteDevice(GAL_VideoDevice *device)
free(device);
}
#ifdef __TARGET_PX30__
static inline char* find_driver_for_device (const char *dev_name) {
return strdup ("rockchip");
}
#else /* __TARGET_PX30__ */
static char* find_driver_for_device (const char *dev_name)
{
char *driver;
@@ -996,6 +1001,7 @@ static char* find_driver_for_device (const char *dev_name)
return strdup (driver + strlen ("/"));
}
#endif /* not defined __TARGET_PX30__ */
static DrmDriverOps* load_external_driver (DrmVideoData* vdata,
const char* driver_name, int device_fd)
@@ -1095,6 +1101,7 @@ static int open_drm_device(GAL_VideoDevice *device)
_DBG_PRINTF("Try to load DRM driver: %s\n", driver_name);
fd = drmOpen(driver_name, NULL);
if (fd < 0) {
_ERR_PRINTF("NEWGAL>DRM: drmOpen failed\n");
free(driver_name);