drm/i915/fbc: enable FBC by default on HSW and BDW
Subsystems (2)
PATCH 1/1 drm/i915/fbc: enable FBC by default on HSW and BDW
These platforms should be fine now.
FBC can allow very significant power savings for screen-on idle systems, but it is worth mentioning that a lot of people won't get significant power savings by enabling this feature because they may have something else preventing the system from getting into the deepest sleep states. Examples may include a hungry wifi device or a max_performance SATA link power management policy. You can check your PC state residencies on the powertop "Idle stats" tab. I recommend trying to run "sudo powertop --auto-tune" and then seeing if the residencies improve.
Oh, and in case you - the person reading this commit message - found this commit through git bisect, please do the following:
- Check your dmesg and see if there are error messages mentioning underruns around the time your problem started happening.
- Download intel-gpu-tools, compile it, and run:
$ sudo ./tests/kms_frontbuffer_tracking --run-subtest '*fbc-*' 2>&1 | tee fbc.txt Then send us the fbc.txt file, especially if you get a failure. This will really maximize your chances of getting the bug fixed quickly. - Try to find a reliable way to reproduce the problem, and tell us. - Boot with drm.debug=0xe, reproduce the problem, then send us the dmesg file.
v2: Don't enable by default on SKL.
--- drivers/gpu/drm/i915/intel_fbc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_fbc.c +3 -1
@@ -823,13 +823,15 @@ static bool intel_fbc_can_choose(struct intel_crtc *crtc) {struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;struct intel_fbc *fbc = &dev_priv->fbc; +bool enable_by_default =IS_HASWELL (dev_priv) || +IS_BROADWELL (dev_priv);if (intel_vgpu_active (dev_priv->dev)) { fbc->no_fbc_reason ="VGPU is active" ;return false; } -if (i915.enable_fbc <0 ) { +if (i915.enable_fbc <0 && !enable_by_default) { fbc->no_fbc_reason ="disabled per chip default" ;return false; }
Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 kms_frontbuffer_tracking: don't fail fbc-farfromfence on SKL
SKL doesn't do the same dspaddr_offset magic as the older gens, so FBC may not be enabled on fbc-farfromfence. This is not a bug since FBC is just disabled, and this is the expected case of the current Kernel, so let's not fail the test.
If/once we land the proper infrastructure to fix this in the Kernel we may revert this commit.
--- tests/kms_frontbuffer_tracking.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
tests/kms_frontbuffer_tracking.c +11 -4
@@ -2822,9 +2822,10 @@ static void farfromfence_subtest(const struct test_mode *t)struct modeset_params *params =pick_params (t);struct draw_pattern_info *pattern = &pattern1;struct fb_region *target; -int max_height; +int max_height, assertions =0 ; +int gen =intel_gen (intel_get_drm_devid (drm.fd)); -switch (intel_gen (intel_get_drm_devid (drm.fd))) { +switch (gen) {case 2 : max_height =2048 ;break ;
@@ -2836,6 +2837,11 @@ static void farfromfence_subtest(const struct test_mode *t)break ; } +/* Gen 9 doesn't do the same dspaddr_offset magic as the older +* gens, so FBC may not be enabled there. */ +if (gen >=9 ) + assertions |=DONT_ASSERT_FEATURE_STATUS ; +prepare_subtest (t, pattern); target =pick_target (t, params);
@@ -2848,13 +2854,14 @@ static void farfromfence_subtest(const struct test_mode *t) params->fb.x =0 ; params->fb.y = max_height - params->mode->vdisplay;set_mode_for_params (params); -do_assertions (0 ); +do_assertions (assertions);for (r =0 ; r < pattern->n_rects; r++) {draw_rect (pattern, target, t->method, r);update_wanted_crc (t, &pattern->crcs[t->format][r]); +/* GTT draws disable PSR. */ -do_assertions (ASSERT_PSR_DISABLED ); +do_assertions (assertions |ASSERT_PSR_DISABLED ); }igt_remove_fb (drm.fd, &tall_fb);
Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 kms_frontbuffer_tracking: add basic subtest
In reply to Paulo ZanoniThis test executes one of each of the very basic operations with whatever features are enabled by default in the Kernel, without checking their statuses: we only care about the CRCs. Although it's completely redundant, it will be ran by the CI so we can spot regressions both in the specific features and in the frontbuffer tracking subsystem.
We're not checking sink CRCs since they're still unreliable and we don't want false negatives in the CI.
It takes 5 seconds to run this test on my machines.
--- tests/kms_frontbuffer_tracking.c | 83 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-)
tests/kms_frontbuffer_tracking.c +80 -3
@@ -97,12 +97,15 @@ struct test_mode {FBS_COUNT , } fbs; -/* Which features are we going to test now? This is a mask! */ +/* Which features are we going to test now? This is a mask! +* FEATURE_DEFAULT is a special value which instruct the test to just +* keep what's already enabled by default in the Kernel. */ enum {FEATURE_NONE =0 ,FEATURE_FBC =1 ,FEATURE_PSR =2 ,FEATURE_COUNT =4 , +FEATURE_DEFAULT =4 , } feature;/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
@@ -1103,8 +1106,11 @@ static void unset_all_crtcs(void) } } -static void disable_features (void ) +static void disable_features (const struct test_mode *t) { +if (t->feature ==FEATURE_DEFAULT ) +return ; +fbc_disable ();psr_disable (); }
@@ -1727,6 +1733,9 @@ static void set_sprite_for_test(const struct test_mode *t,static void enable_features_for_test (const struct test_mode *t) { +if (t->feature ==FEATURE_DEFAULT ) +return ; +if (t->feature &FEATURE_FBC )fbc_enable ();if (t->feature &FEATURE_PSR )
@@ -1806,7 +1815,7 @@ static void prepare_subtest_data(const struct test_mode *t,stop_busy_thread (); -disable_features (); +disable_features (t);set_crtc_fbs (t);if (t->screen ==SCREEN_OFFSCREEN )
@@ -3063,6 +3072,64 @@ static void tilingchange_subtest(const struct test_mode *t) } } +/* +* basic - do some basic operations regardless of which features are enabled +* +* METHOD +* This subtest does page flips and draw operations and checks the CRCs of the +* results. The big difference between this and the others is that here we +* don't enable/disable any features such as FBC or PSR: we go with whatever +* the Kernel has enabled by default for us. This subtest only does things +* that are exercised by the other subtests and in a less exhaustive way: it's +* completely redundant. On the other hand, it is very quick and was created +* with the CI system in mind: it's a quick way to detect regressions, so if +* it fails, then we can run the other subtests to find out why. +* +* EXPECTED RESULTS +* Passed CRC assertions. +* +* FAILURES +* If you get a failure here, you should run the more specific draw and flip +* subtests of each feature in order to discover what exactly is failing and +* why. +* +* TODO: do sink CRC assertions in case sink_crc.supported. Only do this after +* our sink CRC code gets 100% reliable, in order to avoid CI false negatives. +*/ +static void basic_subtest (const struct test_mode *t) +{ +struct draw_pattern_info *pattern = &pattern1; +struct modeset_params *params =pick_params (t); +enum igt_draw_method method; +struct igt_fb *fb1, fb2; +int r; +int assertions =DONT_ASSERT_FEATURE_STATUS ; + +prepare_subtest (t, pattern); + +create_fb (t->format, params->fb.fb->width, params->fb.fb->height, +LOCAL_I915_FORMAT_MOD_X_TILED , t->plane, &fb2); + fb1 = params->fb.fb; + +for (r =0 , method =0 ; method <IGT_DRAW_METHOD_COUNT ; method++, r++) { +if (r == pattern->n_rects) { + params->fb.fb = (params->fb.fb == fb1) ? &fb2 : fb1; + +fill_fb_region (¶ms->fb,COLOR_PRIM_BG ); +update_wanted_crc (t, &blue_crcs[t->format].crc); + +page_flip_for_params (params, t->flip); +do_assertions (assertions); + + r =0 ; + } + +draw_rect (pattern, ¶ms->fb, method, r); +update_wanted_crc (t, &pattern->crcs[t->format][r]); +do_assertions (assertions); + } +} +static int opt_handler (int option,int option_index,void *data) {switch (option) {
@@ -3466,6 +3533,16 @@ if (0)suspend_subtest (&t);TEST_MODE_ITER_END + t.pipes = PIPE_SINGLE; + t.screen =SCREEN_PRIM ; + t.plane =PLANE_PRI ; + t.fbs =FBS_INDIVIDUAL ; + t.feature =FEATURE_DEFAULT ; + t.format =FORMAT_DEFAULT ; + t.flip =FLIP_PAGEFLIP ; + igt_subtest("basic") +basic_subtest (&t); +igt_fixture teardown_environment ();
Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915/fbc: enable FBC by default on HSW and BDW
In reply to Paulo Zanoni== Summary ==
== Summary ==
Series 3500v1 drm/i915/fbc: enable FBC by default on HSW and BDW
http://patchwork.freedesktop.org/api/1.0/series/3500/revisions/1/mbox/
Test pm_rpm:
Subgroup basic-pci-d3-state:
pass -> DMESG-WARN (bsw-nuc-2)
Subgroup basic-rte:
dmesg-warn -> PASS (bsw-nuc-2)bsw-nuc-2 total:165 pass:134 dwarn:2 dfail:0 fail:0 skip:29 byt-nuc total:165 pass:140 dwarn:1 dfail:0 fail:0 skip:24 ilk-hp8440p total:165 pass:116 dwarn:0 dfail:0 fail:1 skip:48
Results at /archive/results/CI_IGT_test/Patchwork_1419/
bd0b1a9aa8b7fdb2e06a5cbf1756ef93de2fa3fd drm-intel-nightly: 2016y-02m-16d-17h-53m-05s UTC integration manifest d6b61af1225d72afe8e72e8faf1140435266f8e7 drm/i915/fbc: enable FBC by default on HSW and BDW
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for drm/i915/fbc: enable FBC by default on HSW and BDW
Em Qua, 2016-02-17 às 08:40 +0000, Patchwork escreveu:
Quoted 9 lines
== Summary ==
Series 3500v1 drm/i915/fbc: enable FBC by default on HSW and BDW
http://patchwork.freedesktop.org/api/1.0/series/3500/revisions/1/mbox
/Test
pm_rpm:
Subgroup basic-pci-d3-state:
pass -> DMESG-WARN (bsw-nuc-2)
https://bugs.freedesktop.org/show_bug.cgi?id=94163
I asked Daniel if this needed additional acks/reviews due to potential controversy, but he said I can merge the patch.
Patch merged. Thanks for all the reviews leading to this :)
Quoted 19 lines
Subgroup basic-rte:
dmesg-warn -> PASS (bsw-nuc-2)bsw-nuc-
2 total:165 pass:134 dwarn:2 dfail:0 fail:0 skip:29 byt-
nuc total:165 pass:140 dwarn:1 dfail:0 fail:0 skip:2 4
ilk-
hp8440p total:165 pass:116 dwarn:0 dfail:0 fail:1 skip:4 8Results at /archive/results/CI_IGT_test/Patchwork_1419/
bd0b1a9aa8b7fdb2e06a5cbf1756ef93de2fa3fddrm-intel-nightly: 2016y- 02m-16d-17h-53m-05s UTC integration manifestd6b61af1225d72afe8e72e8faf1140435266f8e7drm/i915/fbc: enable FBC by default on HSW and BDW
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Paulo Zanoni
These platforms should be fine now.
FBC can allow very significant power savings for screen-on idle systems, but it is worth mentioning that a lot of people won't get significant power savings by enabling this feature because they may have something else preventing the system from getting into the deepest sleep states. Examples may include a hungry wifi device or a
max_performanceSATA link power management policy. You can check your PC state residencies on the powertop "Idle stats" tab. I recommend trying to run "sudo powertop --auto-tune" and then seeing if the residencies improve.Oh, and in case you - the person reading this commit message - found this commit through git bisect, please do the following:
- Check your dmesg and see if there are error messages mentioning underruns around the time your problem started happening.
- Download intel-gpu-tools, compile it, and run:$ sudo ./tests/kms_frontbuffer_tracking --run-subtest '*fbc-*' 2>&1 | tee fbc.txt Then send us the fbc.txt file, especially if you get a failure. This will really maximize your chances of getting the bug fixed quickly. - Try to find a reliable way to reproduce the problem, and tell us. - Boot with drm.debug=0xe, reproduce the problem, then send us the dmesg file.
Quoted 3 lines
v2: Don't enable by default on SKL.
Signed-off-by Paulo Zanoni <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/i915/intel_fbc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_fbc.c +3
-1@@ -823,13 +823,15 @@ static bool intel_fbc_can_choose(struct intel_crtc *crtc) {struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;struct intel_fbc *fbc = &dev_priv->fbc; +bool enable_by_default =IS_HASWELL (dev_priv) || +IS_BROADWELL (dev_priv);if (intel_vgpu_active (dev_priv->dev)) { fbc->no_fbc_reason ="VGPU is active" ;return false; } -if (i915.enable_fbc <0 ) { +if (i915.enable_fbc <0 && !enable_by_default) { fbc->no_fbc_reason ="disabled per chip default" ;return false; }Signature · 6 lines
2.7.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx