drm/i915: Remove unused ring argument from frontbuffer invalidate and busy functions.
This patch doesn't have any functional change, but organize fruntbuffer invalidate and busy by removing unecesarry signature argument for ring. It was unsed on mark_fb_busy and only used on fb_obj_invalidate for the same ORIGIN_CS usage. So let's clean it a bit Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
3b1429d945
commit
77a0d1cab4
|
@ -350,7 +350,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
intel_fb_obj_invalidate(obj, NULL, ORIGIN_CPU);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_CPU);
|
||||
if (__copy_from_user_inatomic_nocache(vaddr, user_data, args->size)) {
|
||||
unsigned long unwritten;
|
||||
|
||||
|
@ -804,7 +804,7 @@ i915_gem_gtt_pwrite_fast(struct drm_device *dev,
|
|||
|
||||
offset = i915_gem_obj_ggtt_offset(obj) + args->offset;
|
||||
|
||||
intel_fb_obj_invalidate(obj, NULL, ORIGIN_GTT);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_GTT);
|
||||
|
||||
while (remain > 0) {
|
||||
/* Operation in this page
|
||||
|
@ -948,7 +948,7 @@ i915_gem_shmem_pwrite(struct drm_device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
intel_fb_obj_invalidate(obj, NULL, ORIGIN_CPU);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_CPU);
|
||||
|
||||
i915_gem_object_pin_pages(obj);
|
||||
|
||||
|
@ -3942,7 +3942,7 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write)
|
|||
}
|
||||
|
||||
if (write)
|
||||
intel_fb_obj_invalidate(obj, NULL, ORIGIN_GTT);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_GTT);
|
||||
|
||||
trace_i915_gem_object_change_domain(obj,
|
||||
old_read_domains,
|
||||
|
@ -4215,7 +4215,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
|
|||
}
|
||||
|
||||
if (write)
|
||||
intel_fb_obj_invalidate(obj, NULL, ORIGIN_CPU);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_CPU);
|
||||
|
||||
trace_i915_gem_object_change_domain(obj,
|
||||
old_read_domains,
|
||||
|
|
|
@ -1038,7 +1038,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *vmas,
|
|||
obj->dirty = 1;
|
||||
i915_gem_request_assign(&obj->last_write_req, req);
|
||||
|
||||
intel_fb_obj_invalidate(obj, ring, ORIGIN_CS);
|
||||
intel_fb_obj_invalidate(obj, ORIGIN_CS);
|
||||
|
||||
/* update for the implicit flush after a batch */
|
||||
obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS;
|
||||
|
|
|
@ -956,7 +956,6 @@ void bxt_ddi_vswing_sequence(struct drm_device *dev, u32 level,
|
|||
|
||||
/* intel_frontbuffer.c */
|
||||
void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
|
||||
struct intel_engine_cs *ring,
|
||||
enum fb_op_origin origin);
|
||||
void intel_frontbuffer_flip_prepare(struct drm_device *dev,
|
||||
unsigned frontbuffer_bits);
|
||||
|
|
|
@ -89,7 +89,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info)
|
|||
* now until we solve this for real.
|
||||
*/
|
||||
mutex_lock(&fb_helper->dev->struct_mutex);
|
||||
intel_fb_obj_invalidate(ifbdev->fb->obj, NULL, ORIGIN_GTT);
|
||||
intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
|
||||
mutex_unlock(&fb_helper->dev->struct_mutex);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
|
|||
* now until we solve this for real.
|
||||
*/
|
||||
mutex_lock(&fb_helper->dev->struct_mutex);
|
||||
intel_fb_obj_invalidate(ifbdev->fb->obj, NULL, ORIGIN_GTT);
|
||||
intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
|
||||
mutex_unlock(&fb_helper->dev->struct_mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,14 +98,12 @@ static void intel_increase_pllclock(struct drm_device *dev,
|
|||
* intel_mark_fb_busy - mark given planes as busy
|
||||
* @dev: DRM device
|
||||
* @frontbuffer_bits: bits for the affected planes
|
||||
* @ring: optional ring for asynchronous commands
|
||||
*
|
||||
* This function gets called every time the screen contents change. It can be
|
||||
* used to keep e.g. the update rate at the nominal refresh rate with DRRS.
|
||||
*/
|
||||
static void intel_mark_fb_busy(struct drm_device *dev,
|
||||
unsigned frontbuffer_bits,
|
||||
struct intel_engine_cs *ring)
|
||||
unsigned frontbuffer_bits)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
enum pipe pipe;
|
||||
|
@ -121,17 +119,15 @@ static void intel_mark_fb_busy(struct drm_device *dev,
|
|||
/**
|
||||
* intel_fb_obj_invalidate - invalidate frontbuffer object
|
||||
* @obj: GEM object to invalidate
|
||||
* @ring: set for asynchronous rendering
|
||||
* @origin: which operation caused the invalidation
|
||||
*
|
||||
* This function gets called every time rendering on the given object starts and
|
||||
* frontbuffer caching (fbc, low refresh rate for DRRS, panel self refresh) must
|
||||
* be invalidated. If @ring is non-NULL any subsequent invalidation will be delayed
|
||||
* be invalidated. For ORIGIN_CS any subsequent invalidation will be delayed
|
||||
* until the rendering completes or a flip on this frontbuffer plane is
|
||||
* scheduled.
|
||||
*/
|
||||
void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
|
||||
struct intel_engine_cs *ring,
|
||||
enum fb_op_origin origin)
|
||||
{
|
||||
struct drm_device *dev = obj->base.dev;
|
||||
|
@ -142,7 +138,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
|
|||
if (!obj->frontbuffer_bits)
|
||||
return;
|
||||
|
||||
if (ring) {
|
||||
if (origin == ORIGIN_CS) {
|
||||
mutex_lock(&dev_priv->fb_tracking.lock);
|
||||
dev_priv->fb_tracking.busy_bits
|
||||
|= obj->frontbuffer_bits;
|
||||
|
@ -151,7 +147,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
|
|||
mutex_unlock(&dev_priv->fb_tracking.lock);
|
||||
}
|
||||
|
||||
intel_mark_fb_busy(dev, obj->frontbuffer_bits, ring);
|
||||
intel_mark_fb_busy(dev, obj->frontbuffer_bits);
|
||||
|
||||
intel_psr_invalidate(dev, obj->frontbuffer_bits);
|
||||
intel_edp_drrs_invalidate(dev, obj->frontbuffer_bits);
|
||||
|
@ -179,7 +175,7 @@ void intel_frontbuffer_flush(struct drm_device *dev,
|
|||
frontbuffer_bits &= ~dev_priv->fb_tracking.busy_bits;
|
||||
mutex_unlock(&dev_priv->fb_tracking.lock);
|
||||
|
||||
intel_mark_fb_busy(dev, frontbuffer_bits, NULL);
|
||||
intel_mark_fb_busy(dev, frontbuffer_bits);
|
||||
|
||||
intel_edp_drrs_flush(dev, frontbuffer_bits);
|
||||
intel_psr_flush(dev, frontbuffer_bits);
|
||||
|
|
Loading…
Reference in New Issue