Skip to contentSkip to conversation

drm/i915/gen9: Disable FBC on planes which have an unsupported config.

PATCH In review Gwan-gyeong Mun 3 participants 5 messages Jan 29, 2019 – Jan 30, 2019

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

PATCH 1/1 drm/i915/gen9: Disable FBC on planes which have an unsupported config.

Enabling FBC on a plane which has a combination of a 180-degree rotation with having a Height that isn't divisible by 4 causes FIFO underrun, so disable FBC on such a config.

Testcase: igt/kms_rotation_crc/multiplane-rotation-cropping-top
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105604

---
 drivers/gpu/drm/i915/intel_fbc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_fbc.c +12 -0
index ccd5e110a19c..de4b5781922c 100644
@@ -793,6 +793,18 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
 		return false;
 	}
 
+	/*
+	 * Work around a problem on GEN9 HW, where enabling FBC on a plane
+	 * which has a combination of a 180-degree rotation with having a Height
+	 * that isn't divisible by 4 causes FIFO underrun.
+	 */
+	if (IS_GEN(dev_priv, 9) &&
+	    (cache->plane.rotation == DRM_MODE_ROTATE_180) &&
+	    (fbc->state_cache.plane.src_h & 3)) {
+		fbc->no_fbc_reason = "plane has a combination of a 180-degree rotation with a misaligned Height";
+		return false;
+	}
+
 	return true;
 }
 
Signature · 6 lines
2.20.1

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

✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen9: Disable FBC on planes which have an unsupported config.

== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Disable FBC on planes which have an unsupported config.
URL : https://patchwork.freedesktop.org/series/55900/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
b49fb04454cb drm/i915/gen9: Disable FBC on planes which have an unsupported config.
-:29: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cache->plane.rotation == DRM_MODE_ROTATE_180'
#29: FILE: drivers/gpu/drm/i915/intel_fbc.c:803:
+	if (IS_GEN(dev_priv, 9) &&
+	    (cache->plane.rotation == DRM_MODE_ROTATE_180) &&
+	    (fbc->state_cache.plane.src_h & 3)) {

-:32: WARNING:LONG_LINE: line over 100 characters
#32: FILE: drivers/gpu/drm/i915/intel_fbc.c:806:
+ fbc->no_fbc_reason = "plane has a combination of a 180-degree rotation with a misaligned Height";

total: 0 errors, 1 warnings, 1 checks, 18 lines checked

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

#2 lore raw

✓ Fi.CI.BAT: success for drm/i915/gen9: Disable FBC on planes which have an unsupported config.

In reply to Gwan-gyeong Mun
== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Disable FBC on planes which have an unsupported config.
URL : https://patchwork.freedesktop.org/series/55900/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5500 -> Patchwork_12068
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/55900/revisions/1/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: PASS -> WARN [fdo#109380]

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#107362]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS

* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] -> PASS

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: {SKIP} [fdo#109271] / [fdo#109278] -> PASS +2

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: FAIL [fdo#103182] -> PASS

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

[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380

Participating hosts (46 -> 40)
------------------------------

Missing (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600

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

* Linux: CI_DRM_5500 -> Patchwork_12068

CI_DRM_5500: a76602bc7e9c1661ac1328103ef67dbc342a7655 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4798: 998e0a4aedf10fb5f7c271018cd80d874668bf55 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12068: b49fb04454cb2f6cf88fdcb5f9e5c2bc4de390c2 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

b49fb04454cb drm/i915/gen9: Disable FBC on planes which have an unsupported config.

== Logs ==

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

#3 lore raw

✓ Fi.CI.IGT: success for drm/i915/gen9: Disable FBC on planes which have an unsupported config.

In reply to Gwan-gyeong Mun
== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Disable FBC on planes which have an unsupported config.
URL : https://patchwork.freedesktop.org/series/55900/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5500_full -> Patchwork_12068_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_softpin@noreloc-s3:
- shard-apl: PASS -> DMESG-WARN [fdo#108566]

* igt@kms_busy@basic-modeset-b:
- shard-glk: NOTRUN -> FAIL [fdo#109490]

* igt@kms_busy@extended-pageflip-hang-newfb-render-a:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_color@pipe-a-legacy-gamma:
- shard-apl: PASS -> FAIL [fdo#104782] / [fdo#108145]

* igt@kms_color@pipe-b-degamma:
- shard-apl: PASS -> FAIL [fdo#104782]

* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-apl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-glk: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_legacy@cursorb-vs-flipb-varying-size:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]

* igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
- shard-apl: PASS -> FAIL [fdo#108948]

* igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
- shard-glk: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166]
- shard-apl: PASS -> FAIL [fdo#103166]

* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]

#### Possible fixes ####

* igt@kms_color@pipe-b-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS

* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: FAIL [fdo#103232] -> PASS +1

* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS

* igt@kms_cursor_crc@cursor-256x85-random:
- shard-apl: FAIL [fdo#103232] -> PASS +2

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: FAIL [fdo#105363] -> PASS

* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-apl: FAIL [fdo#103166] -> PASS

* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: FAIL [fdo#103166] -> PASS

* igt@kms_setmode@basic:
- shard-hsw: FAIL [fdo#99912] -> PASS

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-kbl: FAIL [fdo#105010] -> PASS

* igt@prime_busy@hang-blt:
- shard-snb: FAIL [fdo#108807] -> PASS

#### Warnings ####

* igt@i915_suspend@shrink:
- shard-snb: DMESG-WARN [fdo#109244] -> INCOMPLETE [fdo#105411] / [fdo#106886]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-render:
- shard-hsw: {SKIP} [fdo#109271] -> INCOMPLETE [fdo#103540]

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

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108807]: https://bugs.freedesktop.org/show_bug.cgi?id=108807
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109490]: https://bugs.freedesktop.org/show_bug.cgi?id=109490
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (6 -> 5)
------------------------------

Missing (1): shard-skl

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

* Linux: CI_DRM_5500 -> Patchwork_12068

CI_DRM_5500: a76602bc7e9c1661ac1328103ef67dbc342a7655 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4798: 998e0a4aedf10fb5f7c271018cd80d874668bf55 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12068: b49fb04454cb2f6cf88fdcb5f9e5c2bc4de390c2 @ 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_12068/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#4 lore raw
In reply to Gwan-gyeong Mun
Quoted 26 lines · Gwan-gyeong Mun

Enabling FBC on a plane which has a combination of a 180-degree rotation with having a Height that isn't divisible by 4 causes FIFO underrun, so disable FBC on such a config.

Testcase: igt/kms_rotation_crc/multiplane-rotation-cropping-top
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105604

---
  drivers/gpu/drm/i915/intel_fbc.c | 12 ++++++++++++
  1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_fbc.c +5 -0
index ccd5e110a19c..de4b5781922c 100644
@@ -793,6 +793,18 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
  		return false;
  	}
 
+	/*
+	 * Work around a problem on GEN9 HW, where enabling FBC on a plane
+	 * which has a combination of a 180-degree rotation with having a Height
+	 * that isn't divisible by 4 causes FIFO underrun.
+	 */

drivers/gpu/drm/i915/intel_fbc.c static bool intel_fbc_can_activate(struct intel_crtc *crtc) · line 810

Quoted 10 lines
drivers/gpu/drm/i915/intel_fbc.c +7 -0
+	if (IS_GEN(dev_priv, 9) &&
+	    (cache->plane.rotation == DRM_MODE_ROTATE_180) &&
+	    (fbc->state_cache.plane.src_h & 3)) {
+		fbc->no_fbc_reason = "plane has a combination of a 180-degree rotation with a misaligned Height";
+		return false;
+	}
+
  	return true;
  }
 

I see there extra parenthesis but it's in line with style used just above this piece of code so I guess it's ok.

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