Commit 1d4258db authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Remove useless casts to intel_plane_state

The visible member used to be in intel_plane_state->visible,
but has been moved to drm_plane_state->visible. In the conversion
some casts were left in that are now useless.

to_intel_plane_state(x)->base.visible is the same as x->visible,
so use the latter to clear up the code a little.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484214225-30328-1-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent df210574
...@@ -2796,7 +2796,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, ...@@ -2796,7 +2796,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
* simplest solution is to just disable the primary plane now and * simplest solution is to just disable the primary plane now and
* pretend the BIOS never had it enabled. * pretend the BIOS never had it enabled.
*/ */
to_intel_plane_state(plane_state)->base.visible = false; plane_state->visible = false;
crtc_state->plane_mask &= ~(1 << drm_plane_index(primary)); crtc_state->plane_mask &= ~(1 << drm_plane_index(primary));
intel_pre_disable_primary_noatomic(&intel_crtc->base); intel_pre_disable_primary_noatomic(&intel_crtc->base);
intel_plane->disable_plane(primary, &intel_crtc->base); intel_plane->disable_plane(primary, &intel_crtc->base);
...@@ -6883,13 +6883,13 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc) ...@@ -6883,13 +6883,13 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
if (!intel_crtc->active) if (!intel_crtc->active)
return; return;
if (to_intel_plane_state(crtc->primary->state)->base.visible) { if (crtc->primary->state->visible) {
WARN_ON(intel_crtc->flip_work); WARN_ON(intel_crtc->flip_work);
intel_pre_disable_primary_noatomic(crtc); intel_pre_disable_primary_noatomic(crtc);
intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary)); intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary));
to_intel_plane_state(crtc->primary->state)->base.visible = false; crtc->primary->state->visible = false;
} }
state = drm_atomic_state_alloc(crtc->dev); state = drm_atomic_state_alloc(crtc->dev);
...@@ -12463,7 +12463,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -12463,7 +12463,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
} }
was_visible = old_plane_state->base.visible; was_visible = old_plane_state->base.visible;
visible = to_intel_plane_state(plane_state)->base.visible; visible = plane_state->visible;
if (!was_crtc_enabled && WARN_ON(was_visible)) if (!was_crtc_enabled && WARN_ON(was_visible))
was_visible = false; was_visible = false;
...@@ -12479,7 +12479,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -12479,7 +12479,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
* only combine the results from all planes in the current place? * only combine the results from all planes in the current place?
*/ */
if (!is_crtc_enabled) if (!is_crtc_enabled)
to_intel_plane_state(plane_state)->base.visible = visible = false; plane_state->visible = visible = false;
if (!was_visible && !visible) if (!was_visible && !visible)
return 0; return 0;
...@@ -16841,7 +16841,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc) ...@@ -16841,7 +16841,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
* Temporarily change the plane mapping and disable everything * Temporarily change the plane mapping and disable everything
* ... */ * ... */
plane = crtc->plane; plane = crtc->plane;
to_intel_plane_state(crtc->base.primary->state)->base.visible = true; crtc->base.primary->state->visible = true;
crtc->plane = !plane; crtc->plane = !plane;
intel_crtc_disable_noatomic(&crtc->base); intel_crtc_disable_noatomic(&crtc->base);
crtc->plane = plane; crtc->plane = plane;
......
...@@ -1296,7 +1296,7 @@ void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv) ...@@ -1296,7 +1296,7 @@ void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv)
for_each_intel_crtc(&dev_priv->drm, crtc) for_each_intel_crtc(&dev_priv->drm, crtc)
if (intel_crtc_active(crtc) && if (intel_crtc_active(crtc) &&
to_intel_plane_state(crtc->base.primary->state)->base.visible) crtc->base.primary->state->visible)
dev_priv->fbc.visible_pipes_mask |= (1 << crtc->pipe); dev_priv->fbc.visible_pipes_mask |= (1 << crtc->pipe);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment