|
@@ -1054,11 +1054,11 @@ out:
|
|
* enable FBC for the chosen CRTC. If it does, it will set dev_priv->fbc.crtc.
|
|
* enable FBC for the chosen CRTC. If it does, it will set dev_priv->fbc.crtc.
|
|
*/
|
|
*/
|
|
void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
|
|
void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
|
|
- struct drm_atomic_state *state)
|
|
|
|
|
|
+ struct intel_atomic_state *state)
|
|
{
|
|
{
|
|
struct intel_fbc *fbc = &dev_priv->fbc;
|
|
struct intel_fbc *fbc = &dev_priv->fbc;
|
|
- struct drm_plane *plane;
|
|
|
|
- struct drm_plane_state *plane_state;
|
|
|
|
|
|
+ struct intel_plane *plane;
|
|
|
|
+ struct intel_plane_state *plane_state;
|
|
bool crtc_chosen = false;
|
|
bool crtc_chosen = false;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
@@ -1066,7 +1066,7 @@ void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
|
|
|
|
|
|
/* Does this atomic commit involve the CRTC currently tied to FBC? */
|
|
/* Does this atomic commit involve the CRTC currently tied to FBC? */
|
|
if (fbc->crtc &&
|
|
if (fbc->crtc &&
|
|
- !drm_atomic_get_existing_crtc_state(state, &fbc->crtc->base))
|
|
|
|
|
|
+ !intel_atomic_get_new_crtc_state(state, fbc->crtc))
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
if (!intel_fbc_can_enable(dev_priv))
|
|
if (!intel_fbc_can_enable(dev_priv))
|
|
@@ -1076,13 +1076,11 @@ void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
|
|
* plane. We could go for fancier schemes such as checking the plane
|
|
* plane. We could go for fancier schemes such as checking the plane
|
|
* size, but this would just affect the few platforms that don't tie FBC
|
|
* size, but this would just affect the few platforms that don't tie FBC
|
|
* to pipe or plane A. */
|
|
* to pipe or plane A. */
|
|
- for_each_new_plane_in_state(state, plane, plane_state, i) {
|
|
|
|
- struct intel_plane_state *intel_plane_state =
|
|
|
|
- to_intel_plane_state(plane_state);
|
|
|
|
- struct intel_crtc_state *intel_crtc_state;
|
|
|
|
- struct intel_crtc *crtc = to_intel_crtc(plane_state->crtc);
|
|
|
|
|
|
+ for_each_new_intel_plane_in_state(state, plane, plane_state, i) {
|
|
|
|
+ struct intel_crtc_state *crtc_state;
|
|
|
|
+ struct intel_crtc *crtc = to_intel_crtc(plane_state->base.crtc);
|
|
|
|
|
|
- if (!intel_plane_state->base.visible)
|
|
|
|
|
|
+ if (!plane_state->base.visible)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
if (fbc_on_pipe_a_only(dev_priv) && crtc->pipe != PIPE_A)
|
|
if (fbc_on_pipe_a_only(dev_priv) && crtc->pipe != PIPE_A)
|
|
@@ -1091,10 +1089,9 @@ void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv,
|
|
if (fbc_on_plane_a_only(dev_priv) && crtc->i9xx_plane != PLANE_A)
|
|
if (fbc_on_plane_a_only(dev_priv) && crtc->i9xx_plane != PLANE_A)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- intel_crtc_state = to_intel_crtc_state(
|
|
|
|
- drm_atomic_get_existing_crtc_state(state, &crtc->base));
|
|
|
|
|
|
+ crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
|
|
|
|
|
|
- intel_crtc_state->enable_fbc = true;
|
|
|
|
|
|
+ crtc_state->enable_fbc = true;
|
|
crtc_chosen = true;
|
|
crtc_chosen = true;
|
|
break;
|
|
break;
|
|
}
|
|
}
|