Commit 77a0d1ca authored by Rodrigo Vivi's avatar Rodrigo Vivi Committed by Daniel Vetter

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: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3b1429d9
...@@ -350,7 +350,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, ...@@ -350,7 +350,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
if (ret) if (ret)
return 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)) { if (__copy_from_user_inatomic_nocache(vaddr, user_data, args->size)) {
unsigned long unwritten; unsigned long unwritten;
...@@ -804,7 +804,7 @@ i915_gem_gtt_pwrite_fast(struct drm_device *dev, ...@@ -804,7 +804,7 @@ i915_gem_gtt_pwrite_fast(struct drm_device *dev,
offset = i915_gem_obj_ggtt_offset(obj) + args->offset; 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) { while (remain > 0) {
/* Operation in this page /* Operation in this page
...@@ -948,7 +948,7 @@ i915_gem_shmem_pwrite(struct drm_device *dev, ...@@ -948,7 +948,7 @@ i915_gem_shmem_pwrite(struct drm_device *dev,
if (ret) if (ret)
return ret; return ret;
intel_fb_obj_invalidate(obj, NULL, ORIGIN_CPU); intel_fb_obj_invalidate(obj, ORIGIN_CPU);
i915_gem_object_pin_pages(obj); 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) ...@@ -3942,7 +3942,7 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write)
} }
if (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, trace_i915_gem_object_change_domain(obj,
old_read_domains, old_read_domains,
...@@ -4215,7 +4215,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write) ...@@ -4215,7 +4215,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
} }
if (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, trace_i915_gem_object_change_domain(obj,
old_read_domains, old_read_domains,
......
...@@ -1038,7 +1038,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *vmas, ...@@ -1038,7 +1038,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *vmas,
obj->dirty = 1; obj->dirty = 1;
i915_gem_request_assign(&obj->last_write_req, req); 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 */ /* update for the implicit flush after a batch */
obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS;
......
...@@ -956,7 +956,6 @@ void bxt_ddi_vswing_sequence(struct drm_device *dev, u32 level, ...@@ -956,7 +956,6 @@ void bxt_ddi_vswing_sequence(struct drm_device *dev, u32 level,
/* intel_frontbuffer.c */ /* intel_frontbuffer.c */
void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
struct intel_engine_cs *ring,
enum fb_op_origin origin); enum fb_op_origin origin);
void intel_frontbuffer_flip_prepare(struct drm_device *dev, void intel_frontbuffer_flip_prepare(struct drm_device *dev,
unsigned frontbuffer_bits); unsigned frontbuffer_bits);
......
...@@ -89,7 +89,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info) ...@@ -89,7 +89,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info)
* now until we solve this for real. * now until we solve this for real.
*/ */
mutex_lock(&fb_helper->dev->struct_mutex); 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); mutex_unlock(&fb_helper->dev->struct_mutex);
} }
...@@ -115,7 +115,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var, ...@@ -115,7 +115,7 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
* now until we solve this for real. * now until we solve this for real.
*/ */
mutex_lock(&fb_helper->dev->struct_mutex); 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); mutex_unlock(&fb_helper->dev->struct_mutex);
} }
......
...@@ -98,14 +98,12 @@ static void intel_increase_pllclock(struct drm_device *dev, ...@@ -98,14 +98,12 @@ static void intel_increase_pllclock(struct drm_device *dev,
* intel_mark_fb_busy - mark given planes as busy * intel_mark_fb_busy - mark given planes as busy
* @dev: DRM device * @dev: DRM device
* @frontbuffer_bits: bits for the affected planes * @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 * 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. * 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, static void intel_mark_fb_busy(struct drm_device *dev,
unsigned frontbuffer_bits, unsigned frontbuffer_bits)
struct intel_engine_cs *ring)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
enum pipe pipe; enum pipe pipe;
...@@ -121,17 +119,15 @@ static void intel_mark_fb_busy(struct drm_device *dev, ...@@ -121,17 +119,15 @@ static void intel_mark_fb_busy(struct drm_device *dev,
/** /**
* intel_fb_obj_invalidate - invalidate frontbuffer object * intel_fb_obj_invalidate - invalidate frontbuffer object
* @obj: GEM object to invalidate * @obj: GEM object to invalidate
* @ring: set for asynchronous rendering
* @origin: which operation caused the invalidation * @origin: which operation caused the invalidation
* *
* This function gets called every time rendering on the given object starts and * 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 * 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 * until the rendering completes or a flip on this frontbuffer plane is
* scheduled. * scheduled.
*/ */
void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
struct intel_engine_cs *ring,
enum fb_op_origin origin) enum fb_op_origin origin)
{ {
struct drm_device *dev = obj->base.dev; struct drm_device *dev = obj->base.dev;
...@@ -142,7 +138,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, ...@@ -142,7 +138,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
if (!obj->frontbuffer_bits) if (!obj->frontbuffer_bits)
return; return;
if (ring) { if (origin == ORIGIN_CS) {
mutex_lock(&dev_priv->fb_tracking.lock); mutex_lock(&dev_priv->fb_tracking.lock);
dev_priv->fb_tracking.busy_bits dev_priv->fb_tracking.busy_bits
|= obj->frontbuffer_bits; |= obj->frontbuffer_bits;
...@@ -151,7 +147,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, ...@@ -151,7 +147,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
mutex_unlock(&dev_priv->fb_tracking.lock); 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_psr_invalidate(dev, obj->frontbuffer_bits);
intel_edp_drrs_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, ...@@ -179,7 +175,7 @@ void intel_frontbuffer_flush(struct drm_device *dev,
frontbuffer_bits &= ~dev_priv->fb_tracking.busy_bits; frontbuffer_bits &= ~dev_priv->fb_tracking.busy_bits;
mutex_unlock(&dev_priv->fb_tracking.lock); 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_edp_drrs_flush(dev, frontbuffer_bits);
intel_psr_flush(dev, frontbuffer_bits); intel_psr_flush(dev, frontbuffer_bits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment