Skip to content

Commit

Permalink
drm/i915: Fix cursor src/dst rectangle with bigjoiner
Browse files Browse the repository at this point in the history
We can't call drm_plane_state_src() this late for the slave plane since
it would consult the wrong uapi state. We've alreayd done the correct
uapi->hw copy earlier, so let's just preserve the unclipped src/dst
rects using a temp copy across the intel_atomic_plane_check_clipping()
call.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-14-manasi.d.navare@intel.com
  • Loading branch information
Ville Syrjälä authored and Manasi Navare committed Nov 18, 2020
1 parent 756c1b8 commit bf473cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -11689,6 +11689,8 @@ static int intel_check_cursor(struct intel_crtc_state *crtc_state,
{
const struct drm_framebuffer *fb = plane_state->hw.fb;
struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
const struct drm_rect src = plane_state->uapi.src;
const struct drm_rect dst = plane_state->uapi.dst;
int ret;

if (fb && fb->modifier != DRM_FORMAT_MOD_LINEAR) {
Expand All @@ -11704,8 +11706,8 @@ static int intel_check_cursor(struct intel_crtc_state *crtc_state,
return ret;

/* Use the unclipped src/dst rectangles, which we program to hw */
plane_state->uapi.src = drm_plane_state_src(&plane_state->uapi);
plane_state->uapi.dst = drm_plane_state_dest(&plane_state->uapi);
plane_state->uapi.src = src;
plane_state->uapi.dst = dst;

ret = intel_cursor_check_surface(plane_state);
if (ret)
Expand Down

0 comments on commit bf473cb

Please sign in to comment.