]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: Don't try to initialize sprite planes on pre-ilk
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 25 Oct 2016 15:58:00 +0000 (18:58 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 31 Oct 2016 14:56:32 +0000 (16:56 +0200)
We don't currently implement support for sprite planes on pre-ilk
platforms, so let's leave num_sprites at 0 so that we don't get
spurious errors during driver init.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477411083-19255-2-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/i915/intel_sprite.c

index d6a8f11813d50be83acc603e0e9ed5a7da671cbf..185e3bbc9ec90d399fd681da6bbe2c0b8b19047f 100644 (file)
@@ -282,12 +282,13 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
                info->num_sprites[PIPE_A] = 2;
                info->num_sprites[PIPE_B] = 2;
                info->num_sprites[PIPE_C] = 1;
-       } else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+       } else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
                for_each_pipe(dev_priv, pipe)
                        info->num_sprites[pipe] = 2;
-       else
+       } else if (INTEL_GEN(dev_priv) >= 5) {
                for_each_pipe(dev_priv, pipe)
                        info->num_sprites[pipe] = 1;
+       }
 
        if (i915.disable_display) {
                DRM_INFO("Display disabled (module parameter)\n");
index 43d0350856e7d933760e0e19541ae771d1d3a15f..ae1e3d47951b254a73df119da716813ea6699e37 100644 (file)
@@ -1054,9 +1054,6 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
        int num_plane_formats;
        int ret;
 
-       if (INTEL_INFO(dev)->gen < 5)
-               return -ENODEV;
-
        intel_plane = kzalloc(sizeof(*intel_plane), GFP_KERNEL);
        if (!intel_plane) {
                ret = -ENOMEM;