diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index ddfd0aefe0c0..a98a990fbab3 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -821,14 +821,11 @@ int intel_overlay_switch_off(struct intel_overlay *overlay) | |||
821 | static int check_overlay_possible_on_crtc(struct intel_overlay *overlay, | 821 | static int check_overlay_possible_on_crtc(struct intel_overlay *overlay, |
822 | struct intel_crtc *crtc) | 822 | struct intel_crtc *crtc) |
823 | { | 823 | { |
824 | drm_i915_private_t *dev_priv = overlay->dev->dev_private; | ||
825 | |||
826 | if (!crtc->active) | 824 | if (!crtc->active) |
827 | return -EINVAL; | 825 | return -EINVAL; |
828 | 826 | ||
829 | /* can't use the overlay with double wide pipe */ | 827 | /* can't use the overlay with double wide pipe */ |
830 | if (INTEL_INFO(overlay->dev)->gen < 4 && | 828 | if (crtc->config.double_wide) |
831 | (I915_READ(PIPECONF(crtc->pipe)) & (PIPECONF_DOUBLE_WIDE | PIPECONF_ENABLE)) != PIPECONF_ENABLE) | ||
832 | return -EINVAL; | 829 | return -EINVAL; |
833 | 830 | ||
834 | return 0; | 831 | return 0; |
@@ -1056,7 +1053,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, | |||
1056 | return ret; | 1053 | return ret; |
1057 | } | 1054 | } |
1058 | 1055 | ||
1059 | params = kmalloc(sizeof(struct put_image_params), GFP_KERNEL); | 1056 | params = kmalloc(sizeof(*params), GFP_KERNEL); |
1060 | if (!params) | 1057 | if (!params) |
1061 | return -ENOMEM; | 1058 | return -ENOMEM; |
1062 | 1059 | ||
@@ -1323,7 +1320,7 @@ void intel_setup_overlay(struct drm_device *dev) | |||
1323 | if (!HAS_OVERLAY(dev)) | 1320 | if (!HAS_OVERLAY(dev)) |
1324 | return; | 1321 | return; |
1325 | 1322 | ||
1326 | overlay = kzalloc(sizeof(struct intel_overlay), GFP_KERNEL); | 1323 | overlay = kzalloc(sizeof(*overlay), GFP_KERNEL); |
1327 | if (!overlay) | 1324 | if (!overlay) |
1328 | return; | 1325 | return; |
1329 | 1326 | ||