Rename DRM_NODE_RENDER to DRM_NODE_PRIMARY

Now that there are render nodes it doesn't seem appropriate for the type of
the card nodes to be DRM_NODE_RENDER. For this reason, rename this type to
DRM_NODE_PRIMARY as this name better represents the purpose of these nodes.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
main
Frank Binns 2015-01-14 14:07:50 +00:00 committed by Emil Velikov
parent d2e0f55246
commit ad8bbfd3c7
2 changed files with 6 additions and 6 deletions

View File

@ -268,7 +268,7 @@ int main(int argc, char **argv)
for (i = 0; i < 16; i++) if (!minor || i == minor) { for (i = 0; i < 16; i++) if (!minor || i == minor) {
sprintf(buf, DRM_DEV_NAME, DRM_DIR_NAME, i); sprintf(buf, DRM_DEV_NAME, DRM_DIR_NAME, i);
fd = drmOpenMinor(i, 1, DRM_NODE_RENDER); fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY);
if (fd >= 0) { if (fd >= 0) {
printf("%s\n", buf); printf("%s\n", buf);
if (mask & DRM_BUSID) getbusid(fd); if (mask & DRM_BUSID) getbusid(fd);

View File

@ -86,7 +86,7 @@
#define DRM_MSG_VERBOSITY 3 #define DRM_MSG_VERBOSITY 3
#define DRM_NODE_CONTROL 0 #define DRM_NODE_CONTROL 0
#define DRM_NODE_RENDER 1 #define DRM_NODE_PRIMARY 1
static drmServerInfoPtr drm_server_info; static drmServerInfoPtr drm_server_info;
@ -444,7 +444,7 @@ int drmAvailable(void)
int retval = 0; int retval = 0;
int fd; int fd;
if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) { if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
#ifdef __linux__ #ifdef __linux__
/* Try proc for backward Linux compatibility */ /* Try proc for backward Linux compatibility */
if (!access("/proc/dri/0", R_OK)) if (!access("/proc/dri/0", R_OK))
@ -485,7 +485,7 @@ static int drmOpenByBusid(const char *busid)
drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid); drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid);
for (i = 0; i < DRM_MAX_MINOR; i++) { for (i = 0; i < DRM_MAX_MINOR; i++) {
fd = drmOpenMinor(i, 1, DRM_NODE_RENDER); fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY);
drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd); drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
if (fd >= 0) { if (fd >= 0) {
/* We need to try for 1.4 first for proper PCI domain support /* We need to try for 1.4 first for proper PCI domain support
@ -547,7 +547,7 @@ static int drmOpenByName(const char *name)
* already in use. If it's in use it will have a busid assigned already. * already in use. If it's in use it will have a busid assigned already.
*/ */
for (i = 0; i < DRM_MAX_MINOR; i++) { for (i = 0; i < DRM_MAX_MINOR; i++) {
if ((fd = drmOpenMinor(i, 1, DRM_NODE_RENDER)) >= 0) { if ((fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY)) >= 0) {
if ((version = drmGetVersion(fd))) { if ((version = drmGetVersion(fd))) {
if (!strcmp(version->name, name)) { if (!strcmp(version->name, name)) {
drmFreeVersion(version); drmFreeVersion(version);
@ -591,7 +591,7 @@ static int drmOpenByName(const char *name)
if (*pt) { /* Found busid */ if (*pt) { /* Found busid */
return drmOpenByBusid(++pt); return drmOpenByBusid(++pt);
} else { /* No busid */ } else { /* No busid */
return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER); return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_PRIMARY);
} }
} }
} }