Skip to contentSkip to conversation

drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()

PATCH In review Ville Syrjala 3 participants 4 messages Oct 15, 2019 – Oct 16, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()

From: Ville Syrjälä <[email protected]>

Unlike other planes the cursor currently handles 180 degree rotation adjustment during the hardware programming phase. Let's move that stuff into intel_cursor_check_surface() to match how we do things with other plane types.

And while at we'll plop in the final src x/y coordinates (which will actually always be zero) into the src rect and color_plane[0].x/y, just for some extra consistency.

---
 drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++------
 1 file changed, 22 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +22 -9
index 7d7d1859775a..6a105dc6e168 100644
@@ -10524,15 +10524,7 @@ static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
 	else
 		base = intel_plane_ggtt_offset(plane_state);
 
-	base += plane_state->color_plane[0].offset;
-
-	/* ILK+ do this automagically */
-	if (HAS_GMCH(dev_priv) &&
-	    plane_state->base.rotation & DRM_MODE_ROTATE_180)
-		base += (drm_rect_height(&plane_state->base.dst) *
-			 drm_rect_width(&plane_state->base.dst) - 1) * fb->format->cpp[0];
-
-	return base;
+	return base + plane_state->color_plane[0].offset;
 }
 
 static u32 intel_cursor_position(const struct intel_plane_state *plane_state)
@@ -10569,6 +10561,9 @@ static bool intel_cursor_size_ok(const struct intel_plane_state *plane_state)
 
 static int intel_cursor_check_surface(struct intel_plane_state *plane_state)
 {
+	struct drm_i915_private *dev_priv =
+		to_i915(plane_state->base.plane->dev);
+	unsigned int rotation = plane_state->base.rotation;
 	int src_x, src_y;
 	u32 offset;
 	int ret;
@@ -10592,7 +10587,25 @@ static int intel_cursor_check_surface(struct intel_plane_state *plane_state)
 		return -EINVAL;
 	}
 
+	/*
+	 * Put the final coordinates back so that the src
+	 * coordinate checks will see the right values.
+	 */
+	drm_rect_translate_to(&plane_state->base.src,
+			      src_x << 16, src_y << 16);
+
+	/* ILK+ do this automagically in hardware */
+	if (HAS_GMCH(dev_priv) && rotation & DRM_MODE_ROTATE_180) {
+		const struct drm_framebuffer *fb = plane_state->base.fb;
+		int src_w = drm_rect_width(&plane_state->base.src) >> 16;
+		int src_h = drm_rect_height(&plane_state->base.src) >> 16;
+
+		offset += (src_h * src_w - 1) * fb->format->cpp[0];
+	}
+
 	plane_state->color_plane[0].offset = offset;
+	plane_state->color_plane[0].x = src_x;
+	plane_state->color_plane[0].y = src_y;
 
 	return 0;
 }
Signature · 6 lines
2.21.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()

== Series Details ==

== Series Details ==

Series: drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()
URL : https://patchwork.freedesktop.org/series/68035/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7098 -> Patchwork_14813
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_14813:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live_gem_contexts:
- {fi-icl-dsi}: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-icl-dsi/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-icl-dsi/igt@i915_selftest@live_gem_contexts.html

Known issues
------------

Here are the changes found in Patchwork_14813 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_gem_contexts:
- fi-cfl-guc: [PASS][3] -> [INCOMPLETE][4] ([fdo#106070] / [fdo#111700])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
- fi-skl-iommu: [PASS][5] -> [INCOMPLETE][6] ([fdo#111700])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-skl-iommu/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-skl-iommu/igt@i915_selftest@live_gem_contexts.html

#### Possible fixes ####

* igt@gem_ctx_create@basic-files:
- fi-bxt-dsi: [INCOMPLETE][7] ([fdo#103927]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-bxt-dsi/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-bxt-dsi/igt@[email protected]
- fi-icl-u3: [INCOMPLETE][9] ([fdo#107713] / [fdo#109100]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: [INCOMPLETE][11] ([fdo#103927]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-apl-guc/igt@i915_selftest@live_execlists.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-apl-guc/igt@i915_selftest@live_execlists.html

* igt@i915_selftest@live_hangcheck:
- {fi-icl-guc}: [DMESG-FAIL][13] ([fdo#111678]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-icl-guc/igt@i915_selftest@live_hangcheck.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-icl-guc/igt@i915_selftest@live_hangcheck.html
- {fi-icl-u4}: [INCOMPLETE][15] ([fdo#107713] / [fdo#108569]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-icl-u4/igt@i915_selftest@live_hangcheck.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-icl-u4/igt@i915_selftest@live_hangcheck.html

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [FAIL][18] ([fdo#111045] / [fdo#111096])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/fi-kbl-7500u/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/fi-kbl-7500u/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600
[fdo#111678]: https://bugs.freedesktop.org/show_bug.cgi?id=111678
[fdo#111700]: https://bugs.freedesktop.org/show_bug.cgi?id=111700

Participating hosts (53 -> 45)
------------------------------

Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7098 -> Patchwork_14813

CI-20190529: 20190529
CI_DRM_7098: 4e4fe1f2e2ff11f066e3ea4706dec0dded6925e5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5231: e293051f8f99c72cb01d21e4b73a5928ea351eb3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14813: 1ba095d989c6b9bafaa393f4701024e3046e2be5 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

1ba095d989c6 drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm/i915: Move the cursor rotation handling into intel_cursor_check_surface()
URL : https://patchwork.freedesktop.org/series/68035/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7098_full -> Patchwork_14813_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_14813_full:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@kms_cursor_crc@pipe-d-cursor-512x170-offscreen}:
- {shard-tglb}: NOTRUN -> [SKIP][1] +4 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-tglb1/igt@[email protected]

* {igt@kms_cursor_crc@pipe-d-cursor-64x21-onscreen}:
- {shard-tglb}: NOTRUN -> [FAIL][2] +1 similar issue
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-tglb6/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_14813_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110841])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb4/igt@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110854])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@preempt-contexts-bsd2:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +19 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb6/igt@[email protected]

* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#111325]) +6 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb4/igt@[email protected]

* igt@gem_linear_blits@normal:
- shard-apl: [PASS][11] -> [INCOMPLETE][12] ([fdo#103927]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-apl7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-apl4/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-hsw: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-hsw8/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-hsw8/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [PASS][15] -> [FAIL][16] ([fdo#105363])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl9/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#103167]) +6 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-apl5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-apl5/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb7/igt@kms_psr@psr2_no_drrs.html

* igt@kms_setmode@basic:
- shard-skl: [PASS][23] -> [FAIL][24] ([fdo#99912])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl8/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl3/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_switch@vcs0-heavy-queue:
- shard-apl: [INCOMPLETE][25] ([fdo#103927]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-apl5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-apl7/igt@[email protected]

* igt@gem_eio@in-flight-contexts-immediate:
- shard-snb: [FAIL][27] ([fdo#111925]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-snb4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-snb1/igt@[email protected]

* igt@gem_exec_schedule@pi-ringfull-bsd:
- shard-iclb: [SKIP][29] ([fdo#111325]) -> [PASS][30] +4 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb6/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-kbl: [FAIL][31] -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-kbl4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-kbl4/igt@[email protected]

* igt@gem_pwrite@small-cpu-fbr:
- shard-iclb: [INCOMPLETE][33] ([fdo#107713]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb2/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-snb: [DMESG-WARN][35] ([fdo#111870]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-snb7/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-snb7/igt@[email protected]
- shard-hsw: [DMESG-WARN][37] ([fdo#111870]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-hsw6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-hsw8/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-skl: [INCOMPLETE][39] ([fdo#104108]) -> [PASS][40] +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl9/igt@[email protected]

* igt@i915_pm_rpm@debugfs-read:
- shard-hsw: [INCOMPLETE][41] ([fdo#103540] / [fdo#107807]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-hsw8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-hsw8/igt@[email protected]

* igt@i915_selftest@live_coherency:
- shard-kbl: [TIMEOUT][43] -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-kbl2/igt@i915_selftest@live_coherency.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-kbl1/igt@i915_selftest@live_coherency.html

* igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding:
- shard-skl: [FAIL][45] ([fdo#103232]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl6/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl8/igt@[email protected]

* igt@kms_flip@plain-flip-fb-recreate:
- shard-skl: [FAIL][47] ([fdo#100368]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl8/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-iclb: [FAIL][49] ([fdo#103167]) -> [PASS][50] +9 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [DMESG-WARN][51] ([fdo#108566]) -> [PASS][52] +5 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-apl6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-apl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-cpu:
- shard-skl: [FAIL][53] ([fdo#103167]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][55] ([fdo#108145] / [fdo#110403]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-skl6/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-skl8/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][57] ([fdo#103166]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb5/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb1/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [SKIP][59] ([fdo#109441]) -> [PASS][60] +2 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb1/igt@kms_psr@psr2_primary_page_flip.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html

* igt@kms_vblank@pipe-d-ts-continuation-dpms-suspend:
- {shard-tglb}: [INCOMPLETE][61] -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-tglb1/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-tglb6/igt@[email protected]

* igt@prime_busy@after-bsd2:
- shard-iclb: [SKIP][63] ([fdo#109276]) -> [PASS][64] +23 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb6/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb4/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [SKIP][65] ([fdo#109276]) -> [FAIL][66] ([fdo#111330])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb5/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb1/igt@[email protected]

* igt@gem_mocs_settings@mocs-reset-bsd2:
- shard-iclb: [FAIL][67] ([fdo#111330]) -> [SKIP][68] ([fdo#109276])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7098/shard-iclb4/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/shard-iclb3/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo# 111852 ]: https://bugs.freedesktop.org/show_bug.cgi?id= 111852 [fdo# 112000 ]: https://bugs.freedesktop.org/show_bug.cgi?id= 112000 [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111646]: https://bugs.freedesktop.org/show_bug.cgi?id=111646
[fdo#111671]: https://bugs.freedesktop.org/show_bug.cgi?id=111671
[fdo#111795 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111795
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111925]: https://bugs.freedesktop.org/show_bug.cgi?id=111925
[fdo#112001]: https://bugs.freedesktop.org/show_bug.cgi?id=112001
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (12 -> 11)
------------------------------

Missing (1): pig-snb-2600

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7098 -> Patchwork_14813

CI-20190529: 20190529
CI_DRM_7098: 4e4fe1f2e2ff11f066e3ea4706dec0dded6925e5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5231: e293051f8f99c72cb01d21e4b73a5928ea351eb3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14813: 1ba095d989c6b9bafaa393f4701024e3046e2be5 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14813/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Ville Syrjala
Quoted 64 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Unlike other planes the cursor currently handles 180 degree rotation adjustment during the hardware programming phase. Let's move that stuff into intel_cursor_check_surface() to match how we do things with other plane types.

And while at we'll plop in the final src x/y coordinates (which will actually always be zero) into the src rect and color_plane[0].x/y, just for some extra consistency.

---
  drivers/gpu/drm/i915/display/intel_display.c | 31 ++++++++++++++------
  1 file changed, 22 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +16 -9
index 7d7d1859775a..6a105dc6e168 100644
@@ -10524,15 +10524,7 @@ static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
  	else
  		base = intel_plane_ggtt_offset(plane_state);
 
-	base += plane_state->color_plane[0].offset;
-
-	/* ILK+ do this automagically */
-	if (HAS_GMCH(dev_priv) &&
-	    plane_state->base.rotation & DRM_MODE_ROTATE_180)
-		base += (drm_rect_height(&plane_state->base.dst) *
-			 drm_rect_width(&plane_state->base.dst) - 1) * fb->format->cpp[0];
-
-	return base;
+	return base + plane_state->color_plane[0].offset;
  }
 
  static u32 intel_cursor_position(const struct intel_plane_state *plane_state)
@@ -10569,6 +10561,9 @@ static bool intel_cursor_size_ok(const struct intel_plane_state *plane_state)
 
  static int intel_cursor_check_surface(struct intel_plane_state *plane_state)
  {
+	struct drm_i915_private *dev_priv =
+		to_i915(plane_state->base.plane->dev);
+	unsigned int rotation = plane_state->base.rotation;
  	int src_x, src_y;
  	u32 offset;
  	int ret;
@@ -10592,7 +10587,25 @@ static int intel_cursor_check_surface(struct intel_plane_state *plane_state)
  		return -EINVAL;
  	}
 
+	/*
+	 * Put the final coordinates back so that the src
+	 * coordinate checks will see the right values.
+	 */
+	drm_rect_translate_to(&plane_state->base.src,
+			      src_x << 16, src_y << 16);
+
+	/* ILK+ do this automagically in hardware */
+	if (HAS_GMCH(dev_priv) && rotation & DRM_MODE_ROTATE_180) {
+		const struct drm_framebuffer *fb = plane_state->base.fb;
+		int src_w = drm_rect_width(&plane_state->base.src) >> 16;
+		int src_h = drm_rect_height(&plane_state->base.src) >> 16;

drivers/gpu/drm/i915/display/intel_display.c static int intel_cursor_check_surface(struct intel_plane_state *plane_state) · line 10611

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +6 -0
+
+		offset += (src_h * src_w - 1) * fb->format->cpp[0];
+	}
+
  	plane_state->color_plane[0].offset = offset;
+	plane_state->color_plane[0].x = src_x;
+	plane_state->color_plane[0].y = src_y;
 
  	return 0;
  }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx