drm/i915: Dump watermark info in i915_display_info.
Subsystems (2)
PATCH 1/1 drm/i915: Dump watermark info in i915_display_info.
This will make it easier to debug whether the hardware watermarks match what's calculated for intermediate and optimal watermarks.
--- drivers/gpu/drm/i915/i915_debugfs.c | 153 ++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +153 -0
@@ -3170,6 +3170,158 @@ static void intel_scaler_info(struct seq_file *m, struct intel_crtc *intel_crtc) } } +static void intel_watermark_info (struct seq_file *m, +struct drm_i915_private *dev_priv, +struct intel_crtc *crtc) +{ +struct intel_crtc_state *crtc_state = +to_intel_crtc_state (crtc->base.state); +int i, j; +const char *names[3 ] = { +"hardware" , +"intermediate" , +"optimal" + }; + +if (INTEL_GEN (dev_priv) >=9 ) { +struct skl_pipe_wm *wm = &crtc_state->wm.skl.optimal; +struct skl_ddb_entry *entry = &crtc_state->wm.skl.ddb; +struct skl_ddb_allocation *ddb = &dev_priv->wm.skl_hw.ddb; + +seq_printf (m,"\tDDB allocation: start %u end %u, size %u\n" , + entry->start, entry->end,skl_ddb_entry_size (entry)); +for (i =0 ; i <ARRAY_SIZE (ddb->plane[crtc->pipe]); i++) { + entry = &ddb->plane[crtc->pipe][i]; + +if (!skl_ddb_entry_size (entry)) +continue ; + +seq_printf (m,"\t\tplane %d%c DDB allocation: start %u end %u, size %u, " , + i,pipe_name (crtc->pipe), entry->start, entry->end, +skl_ddb_entry_size (entry)); + + entry = &ddb->y_plane[crtc->pipe][i]; +if (!skl_ddb_entry_size (entry)) +continue ; + +seq_printf (m,"\t\tplane %d%c DDB Y allocation: start %u end %u, size %u, " , + i,pipe_name (crtc->pipe), entry->start, entry->end, +skl_ddb_entry_size (entry)); + } + +seq_printf (m,"\tLinetime: %u\n" , wm->linetime); + +for (i =0 ; i <ARRAY_SIZE (wm->planes); i++) { +struct skl_plane_wm *pwm = &wm->planes[i]; + +seq_printf (m,"\tplane %d%c, wm enabled: %s" , + i,pipe_name (crtc->pipe), +enableddisabled (pwm->wm[0 ].plane_en)); +if (!pwm->wm[0 ].plane_en) +continue ; + +seq_printf (m,"\t\tTransition wm: %s, lines %u, blocks %u" , +enableddisabled (pwm->trans_wm.plane_en), + pwm->trans_wm.plane_res_b, pwm->trans_wm.plane_res_l); + +for (j =0 ; j <ARRAY_SIZE (pwm->wm); j++) { +if (!pwm->wm[j].plane_en) +break ; + +seq_printf (m,"\t\tLevel[%u]: lines %u, blocks %u" , + j, pwm->trans_wm.plane_res_b, + pwm->trans_wm.plane_res_l); + } + } + }else if (HAS_PCH_SPLIT (dev_priv)) { +struct intel_pipe_wm *wm; +struct intel_pipe_wm *wms[3 ] = { + &crtc->wm.active.ilk, + &crtc_state->wm.ilk.intermediate, + &crtc_state->wm.ilk.optimal }; + +for (j =0 , wm = *wms; j <3 ; j++, wm = wms[j]) { +seq_printf (m,"\tDumping %s watermarks, post vbl update: %s\n" , + names[j],yesno (crtc_state->wm.need_postvbl_update)); + +for (i =0 ; i <ARRAY_SIZE (wm->wm); i++) { +struct intel_wm_level *lvl = &wm->wm[i]; + +seq_printf (m,"\t\twm level[%i], enabled: %s, vals: %u, %u, %u, %u\n" , + i,yesno (lvl->enable), lvl->pri_val, + lvl->spr_val, lvl->cur_val, lvl->fbc_val); + } + +seq_printf (m,"\tLinetime: %u\n" , wm->linetime); +seq_printf (m,"\tfbc wm enabled: %s, pipe: %s, sprites enabled: %s, scaled: %s\n" , +yesno (wm->fbc_wm_enabled),yesno (wm->pipe_enabled), +yesno (wm->sprites_enabled),yesno (wm->sprites_scaled)); + } + }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) { +struct vlv_wm_state *wm; +struct vlv_wm_state *wms[3 ] = { + &crtc->wm.active.vlv, + &crtc_state->wm.vlv.intermediate, + &crtc_state->wm.vlv.optimal }; + +for (j =0 , wm = *wms; j <3 ; j++, wm = wms[j]) { +seq_printf (m,"\tDumping %s watermarks, CxSR: %s, num levels: %u\n" , + names[j],yesno (wm->cxsr), wm->num_levels); + +for (i =0 ; i < wm->num_levels; i++) { +struct g4x_pipe_wm *pwm = &wm->wm[i]; +struct g4x_sr_wm *sr = &wm->sr[i]; +int k; + +seq_printf (m,"\tLevel %u allocations:\n" , i); +for (k =0 ; k <ARRAY_SIZE (pwm->plane); k++) +seq_printf (m,"\t\tPlane %u: %u\n" , k, pwm->plane[k]); +seq_printf (m,"\t\tFBC: %u\n" , pwm->fbc); + +if (!wm->cxsr) +continue ; + +seq_printf (m,"\t\tSR: plane %u, cursor %u, FBC %u\n" , + sr->plane, sr->cursor, sr->fbc); + } + } + }else if (IS_G4X (dev_priv)) { +struct g4x_wm_state *wm; +struct g4x_wm_state *wms[3 ] = { + &crtc->wm.active.g4x, + &crtc_state->wm.g4x.intermediate, + &crtc_state->wm.g4x.optimal }; + +for (j =0 , wm = *wms; j <3 ; j++, wm = wms[j]) { +struct g4x_pipe_wm *pwm = &wm->wm; +struct g4x_sr_wm *sr = &wm->sr; +struct g4x_sr_wm *hpll = &wm->hpll; + +seq_printf (m,"\tDumping %s watermarks, CxSR: %s, HPLL: %s, fbc: %s\n" , + names[j],yesno (wm->cxsr),yesno (wm->hpll_en), +yesno (wm->fbc_en)); + +for (i =0 ; i <ARRAY_SIZE (pwm->plane); i++) +seq_printf (m,"\t\tPlane %u: %u\n" , i, pwm->plane[i]); + +if (wm->fbc_en) +seq_printf (m,"\t\tFBC: %u\n" , pwm->fbc); + +if (wm->cxsr) +seq_printf (m,"\t\tSR: plane %u, cursor %u, FBC %u\n" , + sr->plane, sr->cursor, sr->fbc); + +if (wm->hpll_en) +seq_printf (m,"\t\tHPLL: plane %u, cursor %u, FBC %u\n" , + hpll->plane, hpll->cursor, hpll->fbc); + } + } + +if (dev_priv->display.optimize_watermarks) +seq_printf (m,"\tNeed post vblank update: %s\n" , +yesno (crtc_state->wm.need_postvbl_update)); +} +static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);
@@ -3208,6 +3360,7 @@ static int i915_display_info(struct seq_file *m, void *unused) cursor->cursor.base);intel_scaler_info (m, crtc);intel_plane_info (m, crtc); +intel_watermark_info (m, dev_priv, crtc); } seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s \n",
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Dump watermark info in i915_display_info.
== Series Details ==
== Series Details ==
Series: drm/i915: Dump watermark info in i915_display_info.
URL : https://patchwork.freedesktop.org/series/32532/
State : failure
== Summary ==
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CHK kernel/config_data.h
CC [M] drivers/gpu/drm/i915/i915_debugfs.o
drivers/gpu/drm/i915/i915_debugfs.c: In function ‘intel_watermark_info’:
drivers/gpu/drm/i915/i915_debugfs.c:3243:41: error: iteration 2 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
~~~^~~~~~~~drivers/gpu/drm/i915/i915_debugfs.c:3243:3: note: within this loop
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
^~~drivers/gpu/drm/i915/i915_debugfs.c:3267:41: error: iteration 2 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
~~~^~~~~~~~drivers/gpu/drm/i915/i915_debugfs.c:3267:3: note: within this loop
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
^~~drivers/gpu/drm/i915/i915_debugfs.c:3295:41: error: iteration 2 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
~~~^~~~~~~~drivers/gpu/drm/i915/i915_debugfs.c:3295:3: note: within this loop
for (j = 0, wm = *wms; j < 3; j++, wm = wms[j]) {
^~~
cc1: all warnings being treated as errorsscripts/Makefile.build:313: recipe for target 'drivers/gpu/drm/i915/i915_debugfs.o' failed make[4]: *** [drivers/gpu/drm/i915/i915_debugfs.o] Error 1 scripts/Makefile.build:572: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:572: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:572: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1023: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Dump watermark info in i915_display_info, v2.
In reply to Maarten LankhorstDumping watermark info will make it easier to debug whether the hardware watermarks match what's calculated for intermediate and optimal watermarks. This has made it easier to debug certain SNB underruns, so I've extended it from a hack to something that will print all atomic watermarks.
Changes since v1:
- Fix WM assignment compiler warning.
--- drivers/gpu/drm/i915/i915_debugfs.c | 155 ++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +155 -0
@@ -3170,6 +3170,160 @@ static void intel_scaler_info(struct seq_file *m, struct intel_crtc *intel_crtc) } } +static void intel_watermark_info (struct seq_file *m, +struct drm_i915_private *dev_priv, +struct intel_crtc *crtc) +{ +struct intel_crtc_state *crtc_state = +to_intel_crtc_state (crtc->base.state); +int i, j; +const char *names[3 ] = { +"hardware" , +"intermediate" , +"optimal" + }; + +if (INTEL_GEN (dev_priv) >=9 ) { +struct skl_pipe_wm *wm = &crtc_state->wm.skl.optimal; +struct skl_ddb_entry *entry = &crtc_state->wm.skl.ddb; +struct skl_ddb_allocation *ddb = &dev_priv->wm.skl_hw.ddb; + +seq_printf (m,"\tDDB allocation: start %u end %u, size %u\n" , + entry->start, entry->end,skl_ddb_entry_size (entry)); +for (i =0 ; i <ARRAY_SIZE (ddb->plane[crtc->pipe]); i++) { + entry = &ddb->plane[crtc->pipe][i]; + +if (!skl_ddb_entry_size (entry)) +continue ; + +seq_printf (m,"\t\tplane %d%c DDB allocation: start %u end %u, size %u, " , + i,pipe_name (crtc->pipe), entry->start, entry->end, +skl_ddb_entry_size (entry)); + + entry = &ddb->y_plane[crtc->pipe][i]; +if (!skl_ddb_entry_size (entry)) +continue ; + +seq_printf (m,"\t\tplane %d%c DDB Y allocation: start %u end %u, size %u, " , + i,pipe_name (crtc->pipe), entry->start, entry->end, +skl_ddb_entry_size (entry)); + } + +seq_printf (m,"\tLinetime: %u\n" , wm->linetime); + +for (i =0 ; i <ARRAY_SIZE (wm->planes); i++) { +struct skl_plane_wm *pwm = &wm->planes[i]; + +seq_printf (m,"\tplane %d%c, wm enabled: %s" , + i,pipe_name (crtc->pipe), +enableddisabled (pwm->wm[0 ].plane_en)); +if (!pwm->wm[0 ].plane_en) +continue ; + +seq_printf (m,"\t\tTransition wm: %s, lines %u, blocks %u" , +enableddisabled (pwm->trans_wm.plane_en), + pwm->trans_wm.plane_res_b, pwm->trans_wm.plane_res_l); + +for (j =0 ; j <ARRAY_SIZE (pwm->wm); j++) { +if (!pwm->wm[j].plane_en) +break ; + +seq_printf (m,"\t\tLevel[%u]: lines %u, blocks %u" , + j, pwm->trans_wm.plane_res_b, + pwm->trans_wm.plane_res_l); + } + } + }else if (HAS_PCH_SPLIT (dev_priv)) { +struct intel_pipe_wm *wms[3 ] = { + &crtc->wm.active.ilk, + &crtc_state->wm.ilk.intermediate, + &crtc_state->wm.ilk.optimal }; + +for (j =0 ; j <3 ; j++) { +struct intel_pipe_wm *wm = wms[j]; + +seq_printf (m,"\tDumping %s watermarks, post vbl update: %s\n" , + names[j],yesno (crtc_state->wm.need_postvbl_update)); + +for (i =0 ; i <ARRAY_SIZE (wm->wm); i++) { +struct intel_wm_level *lvl = &wm->wm[i]; + +seq_printf (m,"\t\twm level[%i], enabled: %s, vals: %u, %u, %u, %u\n" , + i,yesno (lvl->enable), lvl->pri_val, + lvl->spr_val, lvl->cur_val, lvl->fbc_val); + } + +seq_printf (m,"\tLinetime: %u\n" , wm->linetime); +seq_printf (m,"\tfbc wm enabled: %s, pipe: %s, sprites enabled: %s, scaled: %s\n" , +yesno (wm->fbc_wm_enabled),yesno (wm->pipe_enabled), +yesno (wm->sprites_enabled),yesno (wm->sprites_scaled)); + } + }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) { +struct vlv_wm_state *wms[3 ] = { + &crtc->wm.active.vlv, + &crtc_state->wm.vlv.intermediate, + &crtc_state->wm.vlv.optimal }; + +for (j =0 ; j <3 ; j++) { +struct vlv_wm_state *wm = wms[j]; + +seq_printf (m,"\tDumping %s watermarks, CxSR: %s, num levels: %u\n" , + names[j],yesno (wm->cxsr), wm->num_levels); + +for (i =0 ; i < wm->num_levels; i++) { +struct g4x_pipe_wm *pwm = &wm->wm[i]; +struct g4x_sr_wm *sr = &wm->sr[i]; +int k; + +seq_printf (m,"\tLevel %u allocations:\n" , i); +for (k =0 ; k <ARRAY_SIZE (pwm->plane); k++) +seq_printf (m,"\t\tPlane %u: %u\n" , k, pwm->plane[k]); +seq_printf (m,"\t\tFBC: %u\n" , pwm->fbc); + +if (!wm->cxsr) +continue ; + +seq_printf (m,"\t\tSR: plane %u, cursor %u, FBC %u\n" , + sr->plane, sr->cursor, sr->fbc); + } + } + }else if (IS_G4X (dev_priv)) { +struct g4x_wm_state *wms[3 ] = { + &crtc->wm.active.g4x, + &crtc_state->wm.g4x.intermediate, + &crtc_state->wm.g4x.optimal }; + +for (j =0 ; j <3 ; j++) { +struct g4x_wm_state *wm = wms[j]; +struct g4x_pipe_wm *pwm = &wm->wm; +struct g4x_sr_wm *sr = &wm->sr; +struct g4x_sr_wm *hpll = &wm->hpll; + +seq_printf (m,"\tDumping %s watermarks, CxSR: %s, HPLL: %s, fbc: %s\n" , + names[j],yesno (wm->cxsr),yesno (wm->hpll_en), +yesno (wm->fbc_en)); + +for (i =0 ; i <ARRAY_SIZE (pwm->plane); i++) +seq_printf (m,"\t\tPlane %u: %u\n" , i, pwm->plane[i]); + +if (wm->fbc_en) +seq_printf (m,"\t\tFBC: %u\n" , pwm->fbc); + +if (wm->cxsr) +seq_printf (m,"\t\tSR: plane %u, cursor %u, FBC %u\n" , + sr->plane, sr->cursor, sr->fbc); + +if (wm->hpll_en) +seq_printf (m,"\t\tHPLL: plane %u, cursor %u, FBC %u\n" , + hpll->plane, hpll->cursor, hpll->fbc); + } + } + +if (dev_priv->display.optimize_watermarks) +seq_printf (m,"\tNeed post vblank update: %s\n" , +yesno (crtc_state->wm.need_postvbl_update)); +} +static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);
@@ -3208,6 +3362,7 @@ static int i915_display_info(struct seq_file *m, void *unused) cursor->cursor.base);intel_scaler_info (m, crtc);intel_plane_info (m, crtc); +intel_watermark_info (m, dev_priv, crtc); } seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s \n",
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Dump watermark info in i915_display_info. (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/i915: Dump watermark info in i915_display_info. (rev2)
URL : https://patchwork.freedesktop.org/series/32532/
State : failure
== Summary ==
Series 32532v2 drm/i915: Dump watermark info in i915_display_info.
https://patchwork.freedesktop.org/api/1.0/series/32532/revisions/2/mbox/
Test gem_exec_flush:
Subgroup basic-wb-rw-default:
pass -> INCOMPLETE (fi-cnl-y)
Test pm_backlight:
Subgroup basic-brightness:
pass -> INCOMPLETE (fi-skl-6700hq)fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:444s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:449s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:372s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:526s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:497s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:496s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:494s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:476s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:553s fi-cnl-y total:73 pass:56 dwarn:0 dfail:0 fail:0 skip:16 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:415s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:250s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:580s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:486s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:437s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:427s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:440s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:493s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:454s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:497s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:571s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:477s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:582s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:545s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:456s fi-skl-6700hq total:251 pass:226 dwarn:0 dfail:0 fail:0 skip:24 fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:521s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:496s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:454s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:561s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:422s
5c82a37eff83ab4e60e760fbaf03db5ba0563497 drm-tip: 2017y-10m-23d-18h-06m-28s UTC integration manifest a6fc83ce39c5 drm/i915: Dump watermark info in i915_display_info, v2.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6161/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx