summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r--lib/intel_batchbuffer.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 1aa4ec34..a1b0643f 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -40,6 +40,7 @@
#include "rendercopy.h"
#include "media_fill.h"
#include "ioctl_wrappers.h"
+#include "media_spin.h"
#include <i915_drm.h>
@@ -788,3 +789,26 @@ igt_fillfunc_t igt_get_gpgpu_fillfunc(int devid)
return fill;
}
+
+/**
+ * igt_get_media_spinfunc:
+ * @devid: pci device id
+ *
+ * Returns:
+ *
+ * The platform-specific media spin function pointer for the device specified
+ * with @devid. Will return NULL when no media spin function is implemented.
+ */
+igt_media_spinfunc_t igt_get_media_spinfunc(int devid)
+{
+ igt_media_spinfunc_t spin = NULL;
+
+ if (IS_GEN9(devid))
+ spin = gen9_media_spinfunc;
+ else if (IS_BROADWELL(devid))
+ spin = gen8_media_spinfunc;
+ else if (IS_CHERRYVIEW(devid))
+ spin = gen8lp_media_spinfunc;
+
+ return spin;
+}