diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 20ea7c99d13a..c153be043078 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -541,7 +541,7 @@ static u32 calc_swidthsw(struct drm_i915_private *dev_priv, u32 offset, u32 widt | |||
541 | { | 541 | { |
542 | u32 sw; | 542 | u32 sw; |
543 | 543 | ||
544 | if (IS_GEN2(dev_priv)) | 544 | if (IS_GEN(dev_priv, 2)) |
545 | sw = ALIGN((offset & 31) + width, 32); | 545 | sw = ALIGN((offset & 31) + width, 32); |
546 | else | 546 | else |
547 | sw = ALIGN((offset & 63) + width, 64); | 547 | sw = ALIGN((offset & 63) + width, 64); |
@@ -778,7 +778,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, | |||
778 | u32 oconfig; | 778 | u32 oconfig; |
779 | 779 | ||
780 | oconfig = OCONF_CC_OUT_8BIT; | 780 | oconfig = OCONF_CC_OUT_8BIT; |
781 | if (IS_GEN4(dev_priv)) | 781 | if (IS_GEN(dev_priv, 4)) |
782 | oconfig |= OCONF_CSC_MODE_BT709; | 782 | oconfig |= OCONF_CSC_MODE_BT709; |
783 | oconfig |= pipe == 0 ? | 783 | oconfig |= pipe == 0 ? |
784 | OCONF_PIPE_A : OCONF_PIPE_B; | 784 | OCONF_PIPE_A : OCONF_PIPE_B; |
@@ -1012,7 +1012,7 @@ static int check_overlay_src(struct drm_i915_private *dev_priv, | |||
1012 | 1012 | ||
1013 | if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask) | 1013 | if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask) |
1014 | return -EINVAL; | 1014 | return -EINVAL; |
1015 | if (IS_GEN4(dev_priv) && rec->stride_Y < 512) | 1015 | if (IS_GEN(dev_priv, 4) && rec->stride_Y < 512) |
1016 | return -EINVAL; | 1016 | return -EINVAL; |
1017 | 1017 | ||
1018 | tmp = (rec->flags & I915_OVERLAY_TYPE_MASK) == I915_OVERLAY_YUV_PLANAR ? | 1018 | tmp = (rec->flags & I915_OVERLAY_TYPE_MASK) == I915_OVERLAY_YUV_PLANAR ? |
@@ -1246,7 +1246,7 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data, | |||
1246 | attrs->contrast = overlay->contrast; | 1246 | attrs->contrast = overlay->contrast; |
1247 | attrs->saturation = overlay->saturation; | 1247 | attrs->saturation = overlay->saturation; |
1248 | 1248 | ||
1249 | if (!IS_GEN2(dev_priv)) { | 1249 | if (!IS_GEN(dev_priv, 2)) { |
1250 | attrs->gamma0 = I915_READ(OGAMC0); | 1250 | attrs->gamma0 = I915_READ(OGAMC0); |
1251 | attrs->gamma1 = I915_READ(OGAMC1); | 1251 | attrs->gamma1 = I915_READ(OGAMC1); |
1252 | attrs->gamma2 = I915_READ(OGAMC2); | 1252 | attrs->gamma2 = I915_READ(OGAMC2); |
@@ -1270,7 +1270,7 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data, | |||
1270 | update_reg_attrs(overlay, overlay->regs); | 1270 | update_reg_attrs(overlay, overlay->regs); |
1271 | 1271 | ||
1272 | if (attrs->flags & I915_OVERLAY_UPDATE_GAMMA) { | 1272 | if (attrs->flags & I915_OVERLAY_UPDATE_GAMMA) { |
1273 | if (IS_GEN2(dev_priv)) | 1273 | if (IS_GEN(dev_priv, 2)) |
1274 | goto out_unlock; | 1274 | goto out_unlock; |
1275 | 1275 | ||
1276 | if (overlay->active) { | 1276 | if (overlay->active) { |