Commit cc41b0fd authored by Imre Deak's avatar Imre Deak

drm/i915: Fix rotation setup during plane HW readout

The HW plane state is cleared and inited after we store the rotation to
it, so store it instead to the uapi state to match what we do with all
other plane state until intel_plane_copy_uapi_to_hw_state() is called.

Rotation for initial FBs is not supported atm, but let's still fix the
plane state setup here.

While at it remove the redundant intel_state->uapi.src/dst init, which
will be done in intel_plane_copy_uapi_to_hw_state().

v2: Remove redundant intel_state->uapi.src/dst init. (Ville)
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-2-imre.deak@intel.com
parent 8cef45e2
...@@ -2470,11 +2470,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, ...@@ -2470,11 +2470,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
return; return;
valid_fb: valid_fb:
intel_state->hw.rotation = plane_config->rotation; plane_state->rotation = plane_config->rotation;
intel_fill_fb_ggtt_view(&intel_state->view, fb, intel_fill_fb_ggtt_view(&intel_state->view, fb,
intel_state->hw.rotation); plane_state->rotation);
intel_state->color_plane[0].stride = intel_state->color_plane[0].stride =
intel_fb_pitch(fb, 0, intel_state->hw.rotation); intel_fb_pitch(fb, 0, plane_state->rotation);
__i915_vma_pin(vma); __i915_vma_pin(vma);
intel_state->vma = i915_vma_get(vma); intel_state->vma = i915_vma_get(vma);
...@@ -2492,9 +2492,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, ...@@ -2492,9 +2492,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
plane_state->crtc_w = fb->width; plane_state->crtc_w = fb->width;
plane_state->crtc_h = fb->height; plane_state->crtc_h = fb->height;
intel_state->uapi.src = drm_plane_state_src(plane_state);
intel_state->uapi.dst = drm_plane_state_dest(plane_state);
if (plane_config->tiling) if (plane_config->tiling)
dev_priv->preserve_bios_swizzle = true; dev_priv->preserve_bios_swizzle = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment