summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_cursor.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-02-23 15:13:15 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2022-03-10 11:05:24 +0200
commit8d8b2dd3995f80f26723ad61865e1eb265225561 (patch)
treeaaaf165af7a9edf6f00a40357342304c06dae623 /drivers/gpu/drm/i915/display/intel_cursor.c
parent759b30f70597562ebfa60b516c4c5cbfc2f432dc (diff)
downloadlinux-8d8b2dd3995f80f26723ad61865e1eb265225561.tar.gz
linux-8d8b2dd3995f80f26723ad61865e1eb265225561.tar.bz2
linux-8d8b2dd3995f80f26723ad61865e1eb265225561.zip
drm/i915: Make the PIPESRC rect relative to the entire bigjoiner area
When using bigjoiner it's useful to know the offset of each individual pipe in the whole set of joined pipes. Let's include that information in our PIPESRC rectangle. With this we can make the plane clipping code blissfully unaware of bigjoiner usage, as all we have to do is remove the pipe's offset from the final plane destination coordinates. v2: Use intel_bigjoiner_num_pipes() Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220223131315.18016-14-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_cursor.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_cursor.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 24a42be1b1c5..8c80de877605 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -152,9 +152,11 @@ static int intel_check_cursor(struct intel_crtc_state *crtc_state,
/* Use the unclipped src/dst rectangles, which we program to hw */
plane_state->uapi.src = src;
plane_state->uapi.dst = dst;
- if (intel_crtc_is_bigjoiner_slave(crtc_state))
- drm_rect_translate(&plane_state->uapi.dst,
- -drm_rect_width(&crtc_state->pipe_src), 0);
+
+ /* final plane coordinates will be relative to the plane's pipe */
+ drm_rect_translate(&plane_state->uapi.dst,
+ -crtc_state->pipe_src.x1,
+ -crtc_state->pipe_src.y1);
ret = intel_cursor_check_surface(plane_state);
if (ret)