Skip to contentSkip to conversation

drm/i915/overlay: Remove redundant drm_rect_visible() use

PATCH In review Arthur Grillo 3 participants 3 messages Mar 25, 2023 – Mar 4, 2024

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

PATCH v2 1/1 drm/i915/overlay: Remove redundant drm_rect_visible() use

The drm_rect_intersect() already returns if the intersection is visible or not, so the use of drm_rect_visible() is duplicate.

---
v1->v2: https://lore.kernel.org/all/[email protected]/
- Split the if condition.

---
 drivers/gpu/drm/i915/display/intel_overlay.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_overlay.c +4 -3
index c12bdca8da9b..d55153587cae 100644
@@ -966,10 +966,11 @@ static int check_overlay_dst(struct intel_overlay *overlay,
 		      rec->dst_width, rec->dst_height);
 
 	clipped = req;
-	drm_rect_intersect(&clipped, &crtc_state->pipe_src);
 
-	if (!drm_rect_visible(&clipped) ||
-	    !drm_rect_equals(&clipped, &req))
+	if (!drm_rect_intersect(&clipped, &crtc_state->pipe_src))
+		return -EINVAL;
+
+	if (!drm_rect_equals(&clipped, &req))
 		return -EINVAL;
 
 	return 0;
Signature · 1 line
2.39.2
#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/overlay: Remove redundant drm_rect_visible() use (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915/overlay: Remove redundant drm_rect_visible() use (rev2)
URL : https://patchwork.freedesktop.org/series/115605/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12914 -> Patchwork_115605v2
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_115605v2 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_115605v2, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (38 -> 37)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck@pipe-d-dp-1:
- bat-dg2-8: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-cfl-8109u: [PASS][3] -> [DMESG-FAIL][4] ([i915#5334])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/fi-cfl-8109u/igt@i915_selftest@live@gt_heartbeat.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/fi-cfl-8109u/igt@i915_selftest@live@gt_heartbeat.html
- fi-apl-guc: [PASS][5] -> [DMESG-FAIL][6] ([i915#5334])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_lrc:
- bat-dg2-11: [PASS][7] -> [INCOMPLETE][8] ([i915#7609] / [i915#7913])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@requests:
- bat-rpls-1: [PASS][9] -> [ABORT][10] ([i915#4983] / [i915#7911])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/bat-rpls-1/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@read-crc:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#5354])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s0@smem:
- bat-dg1-5: [FAIL][12] ([fdo#103375]) -> [PASS][13] +7 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/bat-dg1-5/igt@gem_exec_suspend@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-dg1-5/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [DMESG-FAIL][14] ([i915#5334] / [i915#7872]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html

#### Warnings ####

* igt@i915_selftest@live@slpc:
- bat-rpls-2: [DMESG-FAIL][16] ([i915#6367] / [i915#7913] / [i915#7996]) -> [DMESG-FAIL][17] ([i915#6997] / [i915#7913])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12914/bat-rpls-2/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/bat-rpls-2/igt@i915_selftest@[email protected]

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996

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

* Linux: CI_DRM_12914 -> Patchwork_115605v2

CI-20190529: 20190529
CI_DRM_12914: 6e5f96153989e454041848f66a5227be9bd0bbc3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7218: 8036123f781059c54a31240756794b17bd3d15dc @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115605v2: 6e5f96153989e454041848f66a5227be9bd0bbc3 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

604a657923ac drm/i915/overlay: Remove redundant drm_rect_visible() use

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115605v2/index.html

#2 lore raw
In reply to Arthur Grillo
Quoted 4 lines · Arthur Grillo

The drm_rect_intersect() already returns if the intersection is visible or not, so the use of drm_rect_visible() is duplicate.

Sorry, looks like I completely missed this.
Now push the drm-intel-next. Thanks.

Quoted 28 lines

---
v1->v2: https://lore.kernel.org/all/[email protected]/
- Split the if condition.

---
 drivers/gpu/drm/i915/display/intel_overlay.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_overlay.c +4 -3
index c12bdca8da9b..d55153587cae 100644
@@ -966,10 +966,11 @@ static int check_overlay_dst(struct intel_overlay *overlay,
 		      rec->dst_width, rec->dst_height);
 
 	clipped = req;
-	drm_rect_intersect(&clipped, &crtc_state->pipe_src);
 
-	if (!drm_rect_visible(&clipped) ||
-	    !drm_rect_equals(&clipped, &req))
+	if (!drm_rect_intersect(&clipped, &crtc_state->pipe_src))
+		return -EINVAL;
+
+	if (!drm_rect_equals(&clipped, &req))
 		return -EINVAL;
 
 	return 0;
Signature · 1 line
2.39.2
Signature · 2 lines
Ville Syrjälä
Intel