Merge branch 'CR_1748_v4l2_test_Arvin.Zhu' into 'jh7110-devel'

CR 1748 v4l2_test:modify open drm function

See merge request sdk/buildroot!36
This commit is contained in:
Jason Zhou
2022-07-30 09:36:31 +00:00
+6 -2
View File
@@ -7,14 +7,18 @@
#include "stf_drm.h"
#include "stf_log.h"
#define DRM_MODULE_NAME "starfive"
#define DRM_BUSID NULL
static int drm_open(const char *path, int need_dumb, int need_prime)
{
int fd, flags;
uint64_t has_it;
LOG(STF_LEVEL_TRACE, "Enter\n");
if ((fd = open(path, O_RDWR)) < 0) {
LOG(STF_LEVEL_ERR, "cannot open \"%s\"\n", path);
fd = drmOpen(DRM_MODULE_NAME, DRM_BUSID);
if (fd < 0) {
LOG(STF_LEVEL_ERR, "cannot open drm module starfive. \n");
error("open");
}