Skip to content

Commit

Permalink
drm/i915: Drop unpin stall in atomic_prepare_commit
Browse files Browse the repository at this point in the history
The core already does this in setup_commit(). With this we can also
remove the unpin_work_count since it's the last user, and also remove
the loop since that was only used for stalling against legacy flips.

v2: Amend commit message a bit (Chris).

Cc: Maarten Lankhorst <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
danvet committed Jul 20, 2017
1 parent 8b5d27b commit 3118cb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 1 addition & 12 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -11815,18 +11815,7 @@ static int intel_atomic_check(struct drm_device *dev,
static int intel_atomic_prepare_commit(struct drm_device *dev,
struct drm_atomic_state *state)
{
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_crtc_state *crtc_state;
struct drm_crtc *crtc;
int i, ret;

for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
if (state->legacy_cursor_update)
continue;

if (atomic_read(&to_intel_crtc(crtc)->unpin_work_count) >= 2)
flush_workqueue(dev_priv->wq);
}
int ret;

ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,6 @@ struct intel_crtc {
unsigned long long enabled_power_domains;
struct intel_overlay *overlay;

atomic_t unpin_work_count;

/* Display surface base address adjustement for pageflips. Note that on
* gen4+ this only adjusts up to a tile, offsets within a tile are
* handled in the hw itself (with the TILEOFF register). */
Expand Down

0 comments on commit 3118cb0

Please sign in to comment.