diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_frontbuffer.c | 4 |
5 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 06eb77113c01..ceeed35e9672 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -788,6 +788,13 @@ struct intel_context { | |||
788 | struct list_head link; | 788 | struct list_head link; |
789 | }; | 789 | }; |
790 | 790 | ||
791 | enum fb_op_origin { | ||
792 | ORIGIN_GTT, | ||
793 | ORIGIN_CPU, | ||
794 | ORIGIN_CS, | ||
795 | ORIGIN_FLIP, | ||
796 | }; | ||
797 | |||
791 | struct i915_fbc { | 798 | struct i915_fbc { |
792 | unsigned long uncompressed_size; | 799 | unsigned long uncompressed_size; |
793 | unsigned threshold; | 800 | unsigned threshold; |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0107c2ae77d0..d88002e7aa7c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3756,7 +3756,7 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write) | |||
3756 | } | 3756 | } |
3757 | 3757 | ||
3758 | if (write) | 3758 | if (write) |
3759 | intel_fb_obj_invalidate(obj, NULL); | 3759 | intel_fb_obj_invalidate(obj, NULL, ORIGIN_GTT); |
3760 | 3760 | ||
3761 | trace_i915_gem_object_change_domain(obj, | 3761 | trace_i915_gem_object_change_domain(obj, |
3762 | old_read_domains, | 3762 | old_read_domains, |
@@ -4071,7 +4071,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write) | |||
4071 | } | 4071 | } |
4072 | 4072 | ||
4073 | if (write) | 4073 | if (write) |
4074 | intel_fb_obj_invalidate(obj, NULL); | 4074 | intel_fb_obj_invalidate(obj, NULL, ORIGIN_CPU); |
4075 | 4075 | ||
4076 | trace_i915_gem_object_change_domain(obj, | 4076 | trace_i915_gem_object_change_domain(obj, |
4077 | old_read_domains, | 4077 | old_read_domains, |
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 213a261bfa55..dc10bc43864e 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -971,7 +971,7 @@ i915_gem_execbuffer_move_to_active(struct list_head *vmas, | |||
971 | obj->dirty = 1; | 971 | obj->dirty = 1; |
972 | i915_gem_request_assign(&obj->last_write_req, req); | 972 | i915_gem_request_assign(&obj->last_write_req, req); |
973 | 973 | ||
974 | intel_fb_obj_invalidate(obj, ring); | 974 | intel_fb_obj_invalidate(obj, ring, ORIGIN_CS); |
975 | 975 | ||
976 | /* update for the implicit flush after a batch */ | 976 | /* update for the implicit flush after a batch */ |
977 | obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; | 977 | obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 773f19bcd498..61a40ab61d6b 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -873,7 +873,8 @@ void intel_ddi_set_vc_payload_alloc(struct drm_crtc *crtc, bool state); | |||
873 | 873 | ||
874 | /* intel_frontbuffer.c */ | 874 | /* intel_frontbuffer.c */ |
875 | void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, | 875 | void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, |
876 | struct intel_engine_cs *ring); | 876 | struct intel_engine_cs *ring, |
877 | enum fb_op_origin origin); | ||
877 | void intel_frontbuffer_flip_prepare(struct drm_device *dev, | 878 | void intel_frontbuffer_flip_prepare(struct drm_device *dev, |
878 | unsigned frontbuffer_bits); | 879 | unsigned frontbuffer_bits); |
879 | void intel_frontbuffer_flip_complete(struct drm_device *dev, | 880 | void intel_frontbuffer_flip_complete(struct drm_device *dev, |
diff --git a/drivers/gpu/drm/i915/intel_frontbuffer.c b/drivers/gpu/drm/i915/intel_frontbuffer.c index 73cb6e036445..5da73f0124ce 100644 --- a/drivers/gpu/drm/i915/intel_frontbuffer.c +++ b/drivers/gpu/drm/i915/intel_frontbuffer.c | |||
@@ -127,6 +127,7 @@ static void intel_mark_fb_busy(struct drm_device *dev, | |||
127 | * intel_fb_obj_invalidate - invalidate frontbuffer object | 127 | * intel_fb_obj_invalidate - invalidate frontbuffer object |
128 | * @obj: GEM object to invalidate | 128 | * @obj: GEM object to invalidate |
129 | * @ring: set for asynchronous rendering | 129 | * @ring: set for asynchronous rendering |
130 | * @origin: which operation caused the invalidation | ||
130 | * | 131 | * |
131 | * This function gets called every time rendering on the given object starts and | 132 | * This function gets called every time rendering on the given object starts and |
132 | * frontbuffer caching (fbc, low refresh rate for DRRS, panel self refresh) must | 133 | * frontbuffer caching (fbc, low refresh rate for DRRS, panel self refresh) must |
@@ -135,7 +136,8 @@ static void intel_mark_fb_busy(struct drm_device *dev, | |||
135 | * scheduled. | 136 | * scheduled. |
136 | */ | 137 | */ |
137 | void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, | 138 | void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, |
138 | struct intel_engine_cs *ring) | 139 | struct intel_engine_cs *ring, |
140 | enum fb_op_origin origin) | ||
139 | { | 141 | { |
140 | struct drm_device *dev = obj->base.dev; | 142 | struct drm_device *dev = obj->base.dev; |
141 | struct drm_i915_private *dev_priv = dev->dev_private; | 143 | struct drm_i915_private *dev_priv = dev->dev_private; |