diff options
authorBuddy Liong2018-01-30 14:17:27 -0600
committerBuddy Liong2018-01-30 14:17:27 -0600
commitf210e3b7ab107c4897e36dbf325267513a16d3a6 (patch)
tree1b32528e814bf3a42c129486da955238410834cf /libdce_linux.c
parentf72096090e3063e85ea77cae66b2d99a48d91727 (diff)
LCPD-11846: omapdrm API call with bus-version style
On linux, libdce is opening drm device as shown below: OmapDrm_FD = drmOpen("omapdrm", "platform:omapdrm:00"); That causes a conflict with other masters (eg. X11 backend) are opening the device. The 2nd argument is not needed with drmOpen() call. Per Tomi Valkeinen, "drmOpen() does a lot of things, it tries to figure out what exact device the user wants, loads kernel modules if they're not loaded, and who knows what. Especially the bus-version style (the 2nd argument defined) seems to do lots of stuff, probably needed by legacy PCI card or something. I don't see any need to define the bus-id in our case." "There's a render node that should be used if only buffer management is needed (e.g. /dev/dri/renderD128). ... drmOpenWithType() can be used to to open the render node using "omapdrm" name, and libdrm resolves that to the correct device node." This commit changes how linux libdce gets the OmapDrm_FD. Instead of using drmOpen(), it will use drmOpenWithType(). Change-Id: I4eed4dedad7451c782cf6c94fb6165e25f870976 Signed-off-by: Buddy Liong <>
Diffstat (limited to 'libdce_linux.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/libdce_linux.c b/libdce_linux.c
index 43ea740..8bae002 100644
--- a/libdce_linux.c
+++ b/libdce_linux.c
@@ -66,7 +66,7 @@ void *dce_init(void)
66 /* Open omapdrm device only for the first dce_init call */ 66 /* Open omapdrm device only for the first dce_init call */
67 if( dce_init_count == 1 ) { 67 if( dce_init_count == 1 ) {
68 DEBUG("Open omapdrm device and initializing the mutex..."); 68 DEBUG("Open omapdrm device and initializing the mutex...");
69 OmapDrm_FD = drmOpen("omapdrm", "platform:omapdrm:00"); 69 OmapDrm_FD = drmOpenWithType("omapdrm", NULL, DRM_NODE_RENDER);
71 71
72 pthread_mutexattr_init(&attr); 72 pthread_mutexattr_init(&attr);