提交 c65355bb 编写于 作者: C Chris Wilson 提交者: Daniel Vetter

drm/i915: Track when we dirty the scanout with render commands

This is required for tracking render damage for use with FBC and will be
used in subsequent patches.
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 0e088b8f
...@@ -786,7 +786,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *objects, ...@@ -786,7 +786,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *objects,
obj->dirty = 1; obj->dirty = 1;
obj->last_write_seqno = intel_ring_get_seqno(ring); obj->last_write_seqno = intel_ring_get_seqno(ring);
if (obj->pin_count) /* check for potential scanout */ if (obj->pin_count) /* check for potential scanout */
intel_mark_fb_busy(obj); intel_mark_fb_busy(obj, ring);
} }
trace_i915_gem_object_change_domain(obj, old_read, old_write); trace_i915_gem_object_change_domain(obj, old_read, old_write);
......
...@@ -7112,7 +7112,8 @@ void intel_mark_idle(struct drm_device *dev) ...@@ -7112,7 +7112,8 @@ void intel_mark_idle(struct drm_device *dev)
} }
} }
void intel_mark_fb_busy(struct drm_i915_gem_object *obj) void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
struct intel_ring_buffer *ring)
{ {
struct drm_device *dev = obj->base.dev; struct drm_device *dev = obj->base.dev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
...@@ -7124,8 +7125,12 @@ void intel_mark_fb_busy(struct drm_i915_gem_object *obj) ...@@ -7124,8 +7125,12 @@ void intel_mark_fb_busy(struct drm_i915_gem_object *obj)
if (!crtc->fb) if (!crtc->fb)
continue; continue;
if (to_intel_framebuffer(crtc->fb)->obj == obj) if (to_intel_framebuffer(crtc->fb)->obj != obj)
continue;
intel_increase_pllclock(crtc); intel_increase_pllclock(crtc);
if (ring && intel_fbc_enabled(dev))
ring->fbc_dirty = true;
} }
} }
...@@ -7575,7 +7580,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, ...@@ -7575,7 +7580,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
goto cleanup_pending; goto cleanup_pending;
intel_disable_fbc(dev); intel_disable_fbc(dev);
intel_mark_fb_busy(obj); intel_mark_fb_busy(obj, NULL);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
trace_i915_flip_request(intel_crtc->plane, obj); trace_i915_flip_request(intel_crtc->plane, obj);
......
...@@ -574,7 +574,8 @@ extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, ...@@ -574,7 +574,8 @@ extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg,
extern void intel_dvo_init(struct drm_device *dev); extern void intel_dvo_init(struct drm_device *dev);
extern void intel_tv_init(struct drm_device *dev); extern void intel_tv_init(struct drm_device *dev);
extern void intel_mark_busy(struct drm_device *dev); extern void intel_mark_busy(struct drm_device *dev);
extern void intel_mark_fb_busy(struct drm_i915_gem_object *obj); extern void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
struct intel_ring_buffer *ring);
extern void intel_mark_idle(struct drm_device *dev); extern void intel_mark_idle(struct drm_device *dev);
extern bool intel_lvds_init(struct drm_device *dev); extern bool intel_lvds_init(struct drm_device *dev);
extern bool intel_is_dual_link_lvds(struct drm_device *dev); extern bool intel_is_dual_link_lvds(struct drm_device *dev);
......
...@@ -140,6 +140,7 @@ struct intel_ring_buffer { ...@@ -140,6 +140,7 @@ struct intel_ring_buffer {
*/ */
u32 outstanding_lazy_request; u32 outstanding_lazy_request;
bool gpu_caches_dirty; bool gpu_caches_dirty;
bool fbc_dirty;
wait_queue_head_t irq_queue; wait_queue_head_t irq_queue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册