Skip to content

Commit 20f0cd5

Browse files
committed
drm/i915: Remove the broken flush_ring from page-flip
This is already performed with the pipelined flush, so by the time we schedule the flush in the page-flip, the ring is NULL and we OOPs instead. Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
1 parent 6ec3d0c commit 20f0cd5

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,11 +1007,6 @@ int i915_gem_object_put_fence_reg(struct drm_gem_object *obj,
10071007
void i915_gem_retire_requests(struct drm_device *dev);
10081008
void i915_gem_reset_lists(struct drm_device *dev);
10091009
void i915_gem_clflush_object(struct drm_gem_object *obj);
1010-
void i915_gem_flush_ring(struct drm_device *dev,
1011-
struct drm_file *file_priv,
1012-
struct intel_ring_buffer *ring,
1013-
uint32_t invalidate_domains,
1014-
uint32_t flush_domains);
10151010
int i915_gem_object_set_domain(struct drm_gem_object *obj,
10161011
uint32_t read_domains,
10171012
uint32_t write_domain);

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1924,7 +1924,7 @@ i915_wait_request(struct drm_device *dev, uint32_t seqno,
19241924
return i915_do_wait_request(dev, seqno, 1, ring);
19251925
}
19261926

1927-
void
1927+
static void
19281928
i915_gem_flush_ring(struct drm_device *dev,
19291929
struct drm_file *file_priv,
19301930
struct intel_ring_buffer *ring,

drivers/gpu/drm/i915/intel_display.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5028,7 +5028,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
50285028
struct intel_unpin_work *work;
50295029
unsigned long flags, offset;
50305030
int pipe = intel_crtc->pipe;
5031-
u32 was_dirty, pf, pipesrc;
5031+
u32 pf, pipesrc;
50325032
int ret;
50335033

50345034
work = kzalloc(sizeof *work, GFP_KERNEL);
@@ -5057,7 +5057,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
50575057
obj = intel_fb->obj;
50585058

50595059
mutex_lock(&dev->struct_mutex);
5060-
was_dirty = obj->write_domain & I915_GEM_GPU_DOMAINS;
50615060
ret = intel_pin_and_fence_fb_obj(dev, obj, true);
50625061
if (ret)
50635062
goto cleanup_work;
@@ -5076,10 +5075,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
50765075
atomic_inc(&obj_priv->pending_flip);
50775076
work->pending_flip_obj = obj;
50785077

5079-
/* Schedule the pipelined flush */
5080-
if (was_dirty)
5081-
i915_gem_flush_ring(dev, NULL, obj_priv->ring, 0, was_dirty);
5082-
50835078
if (IS_GEN3(dev) || IS_GEN2(dev)) {
50845079
u32 flip_mask;
50855080

0 commit comments

Comments
 (0)