commit 4d5f85b

Michael Forney  ·  2013-06-22 05:16:16 +0000 UTC
parent 7e04c8a
intel: Remove unused bo.{c,h}
5 files changed,  +0, -80
+0, -1
1@@ -5,7 +5,6 @@ AM_CFLAGS = $(drm_CFLAGS)
2 noinst_LTLIBRARIES = libintel.la
3 
4 libintel_la_SOURCES = \
5-	bo.c bo.h \
6 	batch.c batch.h \
7 	blt.h \
8 	mi.h
+0, -1
1@@ -1,5 +1,4 @@
2 #include "batch.h"
3-#include "bo.h"
4 #include "mi.h"
5 
6 #include <stdio.h>
+0, -2
1@@ -1,8 +1,6 @@
2 #ifndef SWC_I915_BATCH_H
3 #define SWC_I915_BATCH_H 1
4 
5-#include "bo.h"
6-
7 #include <stdlib.h>
8 #include <stdint.h>
9 #include <stdarg.h>
+0, -52
 1@@ -1,52 +0,0 @@
 2-#include "bo.h"
 3-
 4-#include <stdio.h>
 5-#include <xf86drm.h>
 6-#include <libdrm/i915_drm.h>
 7-
 8-bool intel_bo_initialize(int drm, struct intel_bo * bo, uint32_t size)
 9-{
10-    struct drm_i915_gem_create create_arg = { .size = size };
11-
12-    if (drmCommandWriteRead(drm, DRM_I915_GEM_CREATE, &create_arg,
13-                            sizeof create_arg) != 0)
14-    {
15-        printf("could not create bo\n");
16-        goto error_base;
17-    }
18-
19-    bo->handle = create_arg.handle;
20-    bo->size = size;
21-
22-    bo->last_offset = 0;
23-
24-    return true;
25-
26-  error_base:
27-    return false;
28-}
29-
30-void intel_bo_finalize(int drm, struct intel_bo * bo)
31-{
32-    struct drm_gem_close close_arg = { .handle = bo->handle };
33-
34-    drmIoctl(drm, DRM_IOCTL_GEM_CLOSE, &close_arg);
35-}
36-
37-void intel_bo_write(int drm, struct intel_bo * bo, uint32_t offset,
38-                   void * data, size_t size)
39-{
40-    struct drm_i915_gem_pwrite pwrite_arg = {
41-        .handle = bo->handle,
42-        .offset = offset,
43-        .size = size,
44-        .data_ptr = (uint64_t) data
45-    };
46-
47-    if (drmCommandWrite(drm, DRM_I915_GEM_PWRITE, &pwrite_arg,
48-                        sizeof pwrite_arg) != 0)
49-    {
50-        printf("write failed\n");
51-    }
52-}
53-
+0, -24
 1@@ -1,24 +0,0 @@
 2-#ifndef SWC_I915_BO_H
 3-#define SWC_I915_BO_H 1
 4-
 5-#include <stdlib.h>
 6-#include <stdint.h>
 7-#include <stdbool.h>
 8-
 9-struct intel_bo
10-{
11-    uint32_t handle;
12-    uint32_t size;
13-
14-    uint64_t last_offset;
15-};
16-
17-bool intel_bo_initialize(int drm, struct intel_bo * bo, uint32_t size);
18-
19-void intel_bo_finalize(int drm, struct intel_bo * bo);
20-
21-void intel_bo_write(int drm, struct intel_bo * bo, uint32_t offset,
22-                   void * data, size_t size);
23-
24-#endif
25-