iris: Make iris_kernel_context_get_priority() public

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12692>
This commit is contained in:
Jordan Justen 2021-11-19 16:21:26 -08:00
parent f0bec1dd1e
commit 9f0070e9e8
2 changed files with 4 additions and 3 deletions

View file

@ -2057,8 +2057,8 @@ iris_create_hw_context(struct iris_bufmgr *bufmgr)
return create.ctx_id;
}
static int
iris_hw_context_get_priority(struct iris_bufmgr *bufmgr, uint32_t ctx_id)
int
iris_kernel_context_get_priority(struct iris_bufmgr *bufmgr, uint32_t ctx_id)
{
struct drm_i915_gem_context_param p = {
.ctx_id = ctx_id,
@ -2093,7 +2093,7 @@ iris_clone_hw_context(struct iris_bufmgr *bufmgr, uint32_t ctx_id)
uint32_t new_ctx = iris_create_hw_context(bufmgr);
if (new_ctx) {
int priority = iris_hw_context_get_priority(bufmgr, ctx_id);
int priority = iris_kernel_context_get_priority(bufmgr, ctx_id);
iris_hw_context_set_priority(bufmgr, new_ctx, priority);
}

View file

@ -450,6 +450,7 @@ int iris_bo_wait(struct iris_bo *bo, int64_t timeout_ns);
uint32_t iris_create_hw_context(struct iris_bufmgr *bufmgr);
uint32_t iris_clone_hw_context(struct iris_bufmgr *bufmgr, uint32_t ctx_id);
int iris_kernel_context_get_priority(struct iris_bufmgr *bufmgr, uint32_t ctx_id);
#define IRIS_CONTEXT_LOW_PRIORITY ((I915_CONTEXT_MIN_USER_PRIORITY-1)/2)
#define IRIS_CONTEXT_MEDIUM_PRIORITY (I915_CONTEXT_DEFAULT_PRIORITY)