Skip to content

Commit

Permalink
drm/i915: remove force argument from disable_plane
Browse files Browse the repository at this point in the history
The idea was good, but planes can have a fb even though
they're disabled. This makes the force argument useless
and always true, because only the commit function updates
state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Maarten Lankhorst authored and Daniel Vetter committed Jun 22, 2015
1 parent 061e4b8 commit 7fabf5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
16 changes: 3 additions & 13 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -4804,7 +4804,7 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc)
struct drm_crtc *from = intel_plane->base.crtc;

intel_plane->disable_plane(&intel_plane->base,
from ?: crtc, true);
from ?: crtc);
}
}

Expand Down Expand Up @@ -13770,8 +13770,7 @@ intel_commit_primary_plane(struct drm_plane *plane,

static void
intel_disable_primary_plane(struct drm_plane *plane,
struct drm_crtc *crtc,
bool force)
struct drm_crtc *crtc)
{
struct drm_device *dev = plane->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -14017,17 +14016,8 @@ intel_check_cursor_plane(struct drm_plane *plane,

static void
intel_disable_cursor_plane(struct drm_plane *plane,
struct drm_crtc *crtc,
bool force)
struct drm_crtc *crtc)
{
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);

if (!force) {
plane->fb = NULL;
intel_crtc->cursor_bo = NULL;
intel_crtc->cursor_addr = 0;
}

intel_crtc_update_cursor(crtc, false);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ struct intel_plane {
uint32_t x, uint32_t y,
uint32_t src_w, uint32_t src_h);
void (*disable_plane)(struct drm_plane *plane,
struct drm_crtc *crtc, bool force);
struct drm_crtc *crtc);
int (*check_plane)(struct drm_plane *plane,
struct intel_crtc_state *crtc_state,
struct intel_plane_state *state);
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/i915/intel_sprite.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
}

static void
skl_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc, bool force)
skl_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
{
struct drm_device *dev = dplane->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -456,7 +456,7 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
}

static void
vlv_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc, bool force)
vlv_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
{
struct drm_device *dev = dplane->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -597,7 +597,7 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
}

static void
ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc, bool force)
ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
{
struct drm_device *dev = plane->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -725,7 +725,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
}

static void
ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc, bool force)
ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
{
struct drm_device *dev = plane->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -946,7 +946,7 @@ intel_commit_sprite_plane(struct drm_plane *plane,
drm_rect_width(&state->src) >> 16,
drm_rect_height(&state->src) >> 16);
} else {
intel_plane->disable_plane(plane, crtc, false);
intel_plane->disable_plane(plane, crtc);
}
}

Expand Down

0 comments on commit 7fabf5e

Please sign in to comment.