Commit f6d1973d authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Move modeset state verifier calls.

The modeset state verifier no longer has full access to the hardware,
instead it should only verify affected crtc's.

Looking for disabled stuff can be verified immediately after all crtc
disables have completed, while each enabled crtc can be verified right
after being enabled.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1458741487-23801-3-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
[mlankhorst: check -> verify]
parent e7c84544
...@@ -13036,28 +13036,13 @@ check_disabled_dpll_state(struct drm_device *dev) ...@@ -13036,28 +13036,13 @@ check_disabled_dpll_state(struct drm_device *dev)
} }
static void static void
intel_modeset_check_disabled(struct drm_device *dev, intel_modeset_check_disabled(struct drm_device *dev)
struct drm_atomic_state *old_state)
{ {
check_encoder_state(dev); check_encoder_state(dev);
check_connector_state(dev, NULL); check_connector_state(dev, NULL);
check_disabled_dpll_state(dev); check_disabled_dpll_state(dev);
} }
static void
intel_modeset_check_state(struct drm_device *dev,
struct drm_atomic_state *old_state)
{
struct drm_crtc_state *old_crtc_state;
struct drm_crtc *crtc;
int i;
for_each_crtc_in_state(old_state, crtc, old_crtc_state, i)
intel_modeset_check_crtc(crtc, old_crtc_state, crtc->state);
intel_modeset_check_disabled(dev, old_state);
}
static void update_scanline_offset(struct intel_crtc *crtc) static void update_scanline_offset(struct intel_crtc *crtc)
{ {
struct drm_device *dev = crtc->base.dev; struct drm_device *dev = crtc->base.dev;
...@@ -13625,6 +13610,8 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -13625,6 +13610,8 @@ static int intel_atomic_commit(struct drm_device *dev,
if (dev_priv->display.modeset_commit_cdclk && if (dev_priv->display.modeset_commit_cdclk &&
intel_state->dev_cdclk != dev_priv->cdclk_freq) intel_state->dev_cdclk != dev_priv->cdclk_freq)
dev_priv->display.modeset_commit_cdclk(state); dev_priv->display.modeset_commit_cdclk(state);
intel_modeset_check_disabled(dev);
} }
/* Now enable the clocks, plane, pipe, and connectors that we set up. */ /* Now enable the clocks, plane, pipe, and connectors that we set up. */
...@@ -13679,6 +13666,8 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -13679,6 +13666,8 @@ static int intel_atomic_commit(struct drm_device *dev,
if (put_domains[i]) if (put_domains[i])
modeset_put_power_domains(dev_priv, put_domains[i]); modeset_put_power_domains(dev_priv, put_domains[i]);
intel_modeset_check_crtc(crtc, old_crtc_state, crtc->state);
} }
if (intel_state->modeset) if (intel_state->modeset)
...@@ -13688,9 +13677,6 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -13688,9 +13677,6 @@ static int intel_atomic_commit(struct drm_device *dev,
drm_atomic_helper_cleanup_planes(dev, state); drm_atomic_helper_cleanup_planes(dev, state);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
if (hw_check)
intel_modeset_check_state(dev, state);
drm_atomic_state_free(state); drm_atomic_state_free(state);
/* As one of the primary mmio accessors, KMS has a high likelihood /* As one of the primary mmio accessors, KMS has a high likelihood
......
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