anv: remove anv_gem_set_context_priority helper
authorTapani Pälli <tapani.palli@intel.com>
Wed, 28 Feb 2018 16:54:24 +0000 (18:54 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 28 Feb 2018 17:50:54 +0000 (19:50 +0200)
anv_gem_set_context_param is to be used directly instead!

Fixes: 6d8ab53303 "anv: implement VK_EXT_global_priority extension"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_gem.c
src/intel/vulkan/anv_private.h

index f314d7667d6b8220f87288f249576d46bdae66c4..56c0c5fa9fdda815205f2cf7b557d40d73c79af4 100644 (file)
@@ -1433,8 +1433,9 @@ VkResult anv_CreateDevice(
     * is returned.
     */
    if (physical_device->has_context_priority) {
-      int err =
-         anv_gem_set_context_priority(device, vk_priority_to_gen(priority));
+      int err = anv_gem_set_context_param(device->fd, device->context_id,
+                                          I915_CONTEXT_PARAM_PRIORITY,
+                                          vk_priority_to_gen(priority));
       if (err != 0 && priority > VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) {
          result = vk_error(VK_ERROR_NOT_PERMITTED_EXT);
          goto fail_fd;
index 93072c7d3b87f1acdc84cd1ac313b6d6d51dc801..2a8f8b14b7ea557282aff6d66e7dfd0ca483b9a9 100644 (file)
@@ -303,15 +303,6 @@ close_and_return:
    return swizzled;
 }
 
-int
-anv_gem_set_context_priority(struct anv_device *device,
-                             int priority)
-{
-   return anv_gem_set_context_param(device->fd, device->context_id,
-                                    I915_CONTEXT_PARAM_PRIORITY,
-                                    priority);
-}
-
 bool
 anv_gem_has_context_priority(int fd)
 {
index 3a4a80d869939a4d47b8fb13e828020ecaaeef7b..a6863f5532d2d732b2b5c69ba0bc83968c48bcda 100644 (file)
@@ -925,7 +925,6 @@ int anv_gem_set_tiling(struct anv_device *device, uint32_t gem_handle,
                        uint32_t stride, uint32_t tiling);
 int anv_gem_create_context(struct anv_device *device);
 bool anv_gem_has_context_priority(int fd);
-int anv_gem_set_context_priority(struct anv_device *device, int priority);
 int anv_gem_destroy_context(struct anv_device *device, int context);
 int anv_gem_set_context_param(int fd, int context, uint32_t param,
                               uint64_t value);