diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fbc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 74d425c700ef..14cbaf4a0e93 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c | |||
@@ -84,7 +84,7 @@ static int intel_fbc_calculate_cfb_size(struct drm_i915_private *dev_priv, | |||
84 | int lines; | 84 | int lines; |
85 | 85 | ||
86 | intel_fbc_get_plane_source_size(cache, NULL, &lines); | 86 | intel_fbc_get_plane_source_size(cache, NULL, &lines); |
87 | if (INTEL_GEN(dev_priv) == 7) | 87 | if (IS_GEN7(dev_priv)) |
88 | lines = min(lines, 2048); | 88 | lines = min(lines, 2048); |
89 | else if (INTEL_GEN(dev_priv) >= 8) | 89 | else if (INTEL_GEN(dev_priv) >= 8) |
90 | lines = min(lines, 2560); | 90 | lines = min(lines, 2560); |
@@ -674,6 +674,8 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc, | |||
674 | cache->plane.adjusted_y = plane_state->color_plane[0].y; | 674 | cache->plane.adjusted_y = plane_state->color_plane[0].y; |
675 | cache->plane.y = plane_state->base.src.y1 >> 16; | 675 | cache->plane.y = plane_state->base.src.y1 >> 16; |
676 | 676 | ||
677 | cache->plane.pixel_blend_mode = plane_state->base.pixel_blend_mode; | ||
678 | |||
677 | if (!cache->plane.visible) | 679 | if (!cache->plane.visible) |
678 | return; | 680 | return; |
679 | 681 | ||
@@ -748,6 +750,12 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc) | |||
748 | return false; | 750 | return false; |
749 | } | 751 | } |
750 | 752 | ||
753 | if (cache->plane.pixel_blend_mode != DRM_MODE_BLEND_PIXEL_NONE && | ||
754 | cache->fb.format->has_alpha) { | ||
755 | fbc->no_fbc_reason = "per-pixel alpha blending is incompatible with FBC"; | ||
756 | return false; | ||
757 | } | ||
758 | |||
751 | /* WaFbcExceedCdClockThreshold:hsw,bdw */ | 759 | /* WaFbcExceedCdClockThreshold:hsw,bdw */ |
752 | if ((IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) && | 760 | if ((IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) && |
753 | cache->crtc.hsw_bdw_pixel_rate >= dev_priv->cdclk.hw.cdclk * 95 / 100) { | 761 | cache->crtc.hsw_bdw_pixel_rate >= dev_priv->cdclk.hw.cdclk * 95 / 100) { |