FAILED: patch "[PATCH] drm/i915: Fix 90/270 rotated coordinates for FBC" failed to apply to 4.9-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
1065467ed8e2601bf2d7018cf47c557ccbea3769Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Fri, 31 Mar 2017 21:00:56 +0300
Subject: [PATCH] drm/i915: Fix 90/270 rotated coordinates for FBC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The clipped src coordinates have already been rotated by 270 degrees for when the plane rotation is 90/270 degrees, hence the FBC code should no longer swap the width and height.
drivers/gpu/drm/i915/intel_fbc.c +7 -12
@@ -82,20 +82,10 @@ static unsigned int get_crtc_fence_y_offset(struct intel_crtc *crtc)static void intel_fbc_get_plane_source_size (struct intel_fbc_state_cache *cache,int *width,int *height) { -int w, h; - -if (drm_rotation_90_or_270 (cache->plane.rotation)) { - w = cache->plane.src_h; - h = cache->plane.src_w; - }else { - w = cache->plane.src_w; - h = cache->plane.src_h; - } -if (width) - *width = w; + *width = cache->plane.src_w;if (height) - *height = h; + *height = cache->plane.src_h; } static int intel_fbc_calculate_cfb_size(struct drm_i915_private *dev_priv,
@@ -746,6 +736,11 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc, cache->crtc.hsw_bdw_pixel_rate = crtc_state->pixel_rate; cache->plane.rotation = plane_state->base.rotation; +/* +* Src coordinates are already rotated by 270 degrees for +* the 90/270 degree plane rotation cases (to match the +* GTT mapping), hence no need to account for rotation here. +*/ cache->plane.src_w =drm_rect_width (&plane_state->base.src) >>16 ; cache->plane.src_h =drm_rect_height (&plane_state->base.src) >>16 ; cache->plane.visible = plane_state->base.visible;