mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
drm/i915/gem: add i915_gem_fence_wait_priority_display() helper
Add i915_gem_fence_wait_priority_display() helper to wait with I915_PRIORITY_DISPLAY. This drops the intel_plane.c dependency on i915_scheduler_types.h, and allows us to remove the compat header from xe. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://lore.kernel.org/r/20250924085129.146173-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
#include <drm/drm_panic.h>
|
||||
|
||||
#include "gem/i915_gem_object.h"
|
||||
#include "i915_scheduler_types.h"
|
||||
#include "i9xx_plane_regs.h"
|
||||
#include "intel_cdclk.h"
|
||||
#include "intel_cursor.h"
|
||||
@@ -1172,7 +1171,6 @@ static int
|
||||
intel_prepare_plane_fb(struct drm_plane *_plane,
|
||||
struct drm_plane_state *_new_plane_state)
|
||||
{
|
||||
struct i915_sched_attr attr = { .priority = I915_PRIORITY_DISPLAY };
|
||||
struct intel_plane *plane = to_intel_plane(_plane);
|
||||
struct intel_display *display = to_intel_display(plane);
|
||||
struct intel_plane_state *new_plane_state =
|
||||
@@ -1221,8 +1219,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
|
||||
goto unpin_fb;
|
||||
|
||||
if (new_plane_state->uapi.fence) {
|
||||
i915_gem_fence_wait_priority(new_plane_state->uapi.fence,
|
||||
&attr);
|
||||
i915_gem_fence_wait_priority_display(new_plane_state->uapi.fence);
|
||||
|
||||
intel_display_rps_boost_after_vblank(new_plane_state->hw.crtc,
|
||||
new_plane_state->uapi.fence);
|
||||
|
||||
@@ -802,6 +802,7 @@ static inline void __start_cpu_write(struct drm_i915_gem_object *obj)
|
||||
|
||||
void i915_gem_fence_wait_priority(struct dma_fence *fence,
|
||||
const struct i915_sched_attr *attr);
|
||||
void i915_gem_fence_wait_priority_display(struct dma_fence *fence);
|
||||
|
||||
int i915_gem_object_wait(struct drm_i915_gem_object *obj,
|
||||
unsigned int flags,
|
||||
|
||||
@@ -138,6 +138,13 @@ void i915_gem_fence_wait_priority(struct dma_fence *fence,
|
||||
local_bh_enable(); /* kick the tasklets if queues were reprioritised */
|
||||
}
|
||||
|
||||
void i915_gem_fence_wait_priority_display(struct dma_fence *fence)
|
||||
{
|
||||
struct i915_sched_attr attr = { .priority = I915_PRIORITY_DISPLAY };
|
||||
|
||||
i915_gem_fence_wait_priority(fence, &attr);
|
||||
}
|
||||
|
||||
int
|
||||
i915_gem_object_wait_priority(struct drm_i915_gem_object *obj,
|
||||
unsigned int flags,
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
#define __I915_GEM_OBJECT_H__
|
||||
|
||||
struct dma_fence;
|
||||
struct i915_sched_attr;
|
||||
|
||||
static inline void i915_gem_fence_wait_priority(struct dma_fence *fence,
|
||||
const struct i915_sched_attr *attr)
|
||||
static inline void i915_gem_fence_wait_priority_display(struct dma_fence *fence)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright © 2025 Intel Corporation */
|
||||
|
||||
#ifndef __I915_SCHEDULER_TYPES_H__
|
||||
#define __I915_SCHEDULER_TYPES_H__
|
||||
|
||||
#define I915_PRIORITY_DISPLAY 0
|
||||
|
||||
struct i915_sched_attr {
|
||||
int priority;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user