intel: Add and use intel_gem_destroy_context()
Again sharing the same function across all Intel drivers. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18974>
This commit is contained in:
committed by
Marge Bot
parent
f928ead625
commit
6ae6921216
@@ -2855,7 +2855,7 @@ anv_device_setup_context(struct anv_device *device,
|
||||
return result;
|
||||
|
||||
fail_context:
|
||||
anv_gem_destroy_context(device, device->context_id);
|
||||
intel_gem_destroy_context(device->fd, device->context_id);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -3263,7 +3263,7 @@ VkResult anv_CreateDevice(
|
||||
anv_queue_finish(&device->queues[i]);
|
||||
vk_free(&device->vk.alloc, device->queues);
|
||||
fail_context_id:
|
||||
anv_gem_destroy_context(device, device->context_id);
|
||||
intel_gem_destroy_context(device->fd, device->context_id);
|
||||
fail_fd:
|
||||
close(device->fd);
|
||||
fail_device:
|
||||
@@ -3335,7 +3335,7 @@ void anv_DestroyDevice(
|
||||
anv_queue_finish(&device->queues[i]);
|
||||
vk_free(&device->vk.alloc, device->queues);
|
||||
|
||||
anv_gem_destroy_context(device, device->context_id);
|
||||
intel_gem_destroy_context(device->fd, device->context_id);
|
||||
|
||||
if (INTEL_DEBUG(DEBUG_BATCH))
|
||||
intel_batch_decode_ctx_finish(&device->decoder_ctx);
|
||||
|
||||
@@ -273,16 +273,6 @@ anv_gem_has_context_priority(int fd, int priority)
|
||||
priority);
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_destroy_context(struct anv_device *device, int context)
|
||||
{
|
||||
struct drm_i915_gem_context_destroy destroy = {
|
||||
.ctx_id = context,
|
||||
};
|
||||
|
||||
return intel_ioctl(device->fd, DRM_IOCTL_I915_GEM_CONTEXT_DESTROY, &destroy);
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_set_context_param(int fd, int context, uint32_t param, uint64_t value)
|
||||
{
|
||||
|
||||
@@ -116,12 +116,6 @@ anv_gem_get_param(int fd, uint32_t param)
|
||||
unreachable("Unused");
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_destroy_context(struct anv_device *device, int context)
|
||||
{
|
||||
unreachable("Unused");
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_set_context_param(int fd, int context, uint32_t param, uint64_t value)
|
||||
{
|
||||
|
||||
@@ -1382,7 +1382,6 @@ int anv_gem_execbuffer(struct anv_device *device,
|
||||
int anv_gem_set_tiling(struct anv_device *device, uint32_t gem_handle,
|
||||
uint32_t stride, uint32_t tiling);
|
||||
bool anv_gem_has_context_priority(int fd, 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);
|
||||
int anv_gem_get_param(int fd, uint32_t param);
|
||||
|
||||
Reference in New Issue
Block a user