commit 0c3ce6a
Michael Forney
·
2014-10-11 06:43:44 +0000 UTC
parent 3acacf1
Remove GEM name support
M
drm.h
+0,
-1
1@@ -33,7 +33,6 @@ enum wld_drm_object_type
2 {
3 WLD_DRM_OBJECT_HANDLE = WLD_DRM_ID,
4 WLD_DRM_OBJECT_PRIME_FD,
5- WLD_DRM_OBJECT_GEM_NAME
6 };
7
8 enum wld_drm_flags
M
dumb.c
+0,
-20
1@@ -96,16 +96,6 @@ static bool export(struct wld_exporter * exporter, struct wld_buffer * base,
2 }
3
4 return true;
5- case WLD_DRM_OBJECT_GEM_NAME:
6- {
7- struct drm_gem_flink flink = { .handle = buffer->handle };
8-
9- if (drmIoctl(buffer->context->fd, DRM_IOCTL_GEM_FLINK, &flink) != 0)
10- return false;
11-
12- object->u32 = flink.name;
13- return true;
14- }
15 default:
16 return false;
17 }
18@@ -179,16 +169,6 @@ struct buffer * context_import_buffer(struct wld_context * base,
19 if (drmPrimeFDToHandle(context->fd, object.i, &handle) != 0)
20 return NULL;
21 break;
22- case WLD_DRM_OBJECT_GEM_NAME:
23- {
24- struct drm_gem_open gem_open = { .name = object.u32 };
25-
26- if (drmIoctl(context->fd, DRM_IOCTL_GEM_OPEN, &gem_open) != 0)
27- return NULL;
28-
29- handle = gem_open.handle;
30- break;
31- }
32 default: return NULL;
33 }
34
M
intel.c
+0,
-8
1@@ -125,10 +125,6 @@ static bool export(struct wld_exporter * exporter, struct wld_buffer * base,
2 if (drm_intel_bo_gem_export_to_prime(buffer->bo, &object->i) != 0)
3 return false;
4 return true;
5- case WLD_DRM_OBJECT_GEM_NAME:
6- if (drm_intel_bo_flink(buffer->bo, &object->u32) != 0)
7- return false;
8- return true;
9 default:
10 return false;
11 }
12@@ -197,10 +193,6 @@ struct buffer * context_import_buffer(struct wld_context * base,
13 object.i, size);
14 break;
15 }
16- case WLD_DRM_OBJECT_GEM_NAME:
17- bo = drm_intel_bo_gem_create_from_name(context->bufmgr, "buffer",
18- object.u32);
19- break;
20 default: bo = NULL;
21 };
22
+0,
-8
1@@ -311,10 +311,6 @@ static bool export(struct wld_exporter * exporter, struct wld_buffer * base,
2 if (nouveau_bo_set_prime(buffer->bo, &object->i) != 0)
3 return false;
4 return true;
5- case WLD_DRM_OBJECT_GEM_NAME:
6- if (nouveau_bo_name_get(buffer->bo, &object->u32) != 0)
7- return false;
8- return true;
9 default:
10 return false;
11 }
12@@ -402,10 +398,6 @@ struct buffer * context_import_buffer(struct wld_context * base,
13 goto error0;
14 }
15 break;
16- case WLD_DRM_OBJECT_GEM_NAME:
17- if (nouveau_bo_name_ref(context->device, object.u32, &bo) != 0)
18- goto error0;
19- break;
20 default: goto error0;
21 }
22