@@ -323,16 +323,16 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
if (ret)
goto fail;
- BUG_ON(pipe >= ARRAY_SIZE(dev_priv->pipe_to_crtc_mapping) ||
- dev_priv->pipe_to_crtc_mapping[pipe] != NULL);
- dev_priv->pipe_to_crtc_mapping[pipe] = crtc;
+ BUG_ON(pipe >= ARRAY_SIZE(dev_priv->display->pipe_to_crtc_mapping) ||
+ dev_priv->display->pipe_to_crtc_mapping[pipe] != NULL);
+ dev_priv->display->pipe_to_crtc_mapping[pipe] = crtc;
if (DISPLAY_VER(dev_priv) < 9) {
enum i9xx_plane_id i9xx_plane = primary->i9xx_plane;
- BUG_ON(i9xx_plane >= ARRAY_SIZE(dev_priv->plane_to_crtc_mapping) ||
- dev_priv->plane_to_crtc_mapping[i9xx_plane] != NULL);
- dev_priv->plane_to_crtc_mapping[i9xx_plane] = crtc;
+ BUG_ON(i9xx_plane >= ARRAY_SIZE(dev_priv->display->plane_to_crtc_mapping) ||
+ dev_priv->display->plane_to_crtc_mapping[i9xx_plane] != NULL);
+ dev_priv->display->plane_to_crtc_mapping[i9xx_plane] = crtc;
}
if (DISPLAY_VER(dev_priv) >= 11)
@@ -1754,9 +1754,9 @@ vlv_pipe_to_channel(enum pipe pipe)
static inline bool intel_pipe_valid(struct drm_i915_private *i915, enum pipe pipe)
{
return (pipe >= 0 &&
- pipe < ARRAY_SIZE(i915->pipe_to_crtc_mapping) &&
+ pipe < ARRAY_SIZE(i915->display->pipe_to_crtc_mapping) &&
INTEL_INFO(i915)->pipe_mask & BIT(pipe) &&
- i915->pipe_to_crtc_mapping[pipe]);
+ i915->display->pipe_to_crtc_mapping[pipe]);
}
static inline struct intel_crtc *
@@ -1771,13 +1771,13 @@ intel_get_crtc_for_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
/* pipe_to_crtc_mapping may have hole on any of 3 display pipe system */
drm_WARN_ON(&dev_priv->drm,
!(INTEL_INFO(dev_priv)->pipe_mask & BIT(pipe)));
- return dev_priv->pipe_to_crtc_mapping[pipe];
+ return dev_priv->display->pipe_to_crtc_mapping[pipe];
}
static inline struct intel_crtc *
intel_get_crtc_for_plane(struct drm_i915_private *dev_priv, enum i9xx_plane_id plane)
{
- return dev_priv->plane_to_crtc_mapping[plane];
+ return dev_priv->display->plane_to_crtc_mapping[plane];
}
struct intel_load_detect_pipe {
@@ -869,6 +869,9 @@ struct drm_i915_display {
struct intel_dmc dmc;
struct i915_drrs drrs;
struct intel_fbc fbc;
+
+ struct intel_crtc *plane_to_crtc_mapping[I915_MAX_PIPES];
+ struct intel_crtc *pipe_to_crtc_mapping[I915_MAX_PIPES];
};
struct drm_i915_private {
@@ -995,9 +998,6 @@ struct drm_i915_private {
/* Kernel Modesetting */
- struct intel_crtc *plane_to_crtc_mapping[I915_MAX_PIPES];
- struct intel_crtc *pipe_to_crtc_mapping[I915_MAX_PIPES];
-
/**
* dpll and cdclk state is protected by connection_mutex
* dpll.lock serializes intel_{prepare,enable,disable}_shared_dpll.