summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-10-25 18:58:01 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-10-31 16:56:32 +0200
commita81d6fa0966b88b1ddd79302d7d351d493c4db9d (patch)
treefa4c284eedb4a9adbb8db45f8c595869ceb3b7ef
parent33edc24d12c42710e23f1c2cef434937af73e245 (diff)
downloadtalos-obmc-linux-a81d6fa0966b88b1ddd79302d7d351d493c4db9d.tar.gz
talos-obmc-linux-a81d6fa0966b88b1ddd79302d7d351d493c4db9d.zip
drm/i915: Initialize planes in a reasonable order
The zpos magic sorting uses the object ID to solve conflicting zpos values. Let's initialize our planes in an order that makes the object IDs agree with the normal primary->sprites->cursor z order. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1477411083-19255-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 304073a03c4c..b9692f639a9f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15241,7 +15241,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
struct intel_crtc_state *crtc_state = NULL;
struct drm_plane *primary = NULL;
struct drm_plane *cursor = NULL;
- int ret;
+ int sprite, ret;
intel_crtc = kzalloc(sizeof(*intel_crtc), GFP_KERNEL);
if (intel_crtc == NULL)
@@ -15268,6 +15268,13 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
if (!primary)
goto fail;
+ for_each_sprite(dev_priv, pipe, sprite) {
+ ret = intel_plane_init(dev, pipe, sprite);
+ if (ret)
+ DRM_DEBUG_KMS("pipe %c sprite %c init failed: %d\n",
+ pipe_name(pipe), sprite_name(pipe, sprite), ret);
+ }
+
cursor = intel_cursor_plane_create(dev, pipe);
if (!cursor)
goto fail;
@@ -16392,7 +16399,6 @@ void intel_modeset_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
struct i915_ggtt *ggtt = &dev_priv->ggtt;
- int sprite, ret;
enum pipe pipe;
struct intel_crtc *crtc;
@@ -16463,12 +16469,6 @@ void intel_modeset_init(struct drm_device *dev)
for_each_pipe(dev_priv, pipe) {
intel_crtc_init(dev, pipe);
- for_each_sprite(dev_priv, pipe, sprite) {
- ret = intel_plane_init(dev, pipe, sprite);
- if (ret)
- DRM_DEBUG_KMS("pipe %c sprite %c init failed: %d\n",
- pipe_name(pipe), sprite_name(pipe, sprite), ret);
- }
}
intel_update_czclk(dev_priv);
OpenPOWER on IntegriCloud