v4l2_test:modify open drm function
Modify the interface that opens the DRM Signed-off-by: arvin.zhu <arvin.zhu@starfivetech.com>
This commit is contained in:
Regular → Executable
+6
-2
@@ -7,14 +7,18 @@
|
|||||||
#include "stf_drm.h"
|
#include "stf_drm.h"
|
||||||
#include "stf_log.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)
|
static int drm_open(const char *path, int need_dumb, int need_prime)
|
||||||
{
|
{
|
||||||
int fd, flags;
|
int fd, flags;
|
||||||
uint64_t has_it;
|
uint64_t has_it;
|
||||||
|
|
||||||
LOG(STF_LEVEL_TRACE, "Enter\n");
|
LOG(STF_LEVEL_TRACE, "Enter\n");
|
||||||
if ((fd = open(path, O_RDWR)) < 0) {
|
fd = drmOpen(DRM_MODULE_NAME, DRM_BUSID);
|
||||||
LOG(STF_LEVEL_ERR, "cannot open \"%s\"\n", path);
|
if (fd < 0) {
|
||||||
|
LOG(STF_LEVEL_ERR, "cannot open drm module starfive. \n");
|
||||||
error("open");
|
error("open");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user