drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
Subsystems (2)
Joonas Lahtinen
maintainerPATCH v2 1/2 drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
Get rid of SEP_SEMICOLON and SEP_BLANK in DEV_INFO_FOR_EACH_FLAG. Consolidate the debug output so that instead of one huge line with "cap1,cap2,capN" each capability is split to own line and displayed as "capN: [yes|no]" to make the dumps more historically informative.
v2:
- Do not break auto-indent by keeping semicolon after macro (Jani)
- Consolidate and use yesno() in all locations (Chris)
--- drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 98 +++++++++++++++----------------- drivers/gpu/drm/i915/i915_gpu_error.c | 4 +- drivers/gpu/drm/i915/intel_device_info.c | 16 ++---- 4 files changed, 54 insertions(+), 68 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -3
@@ -69,10 +69,8 @@ static int i915_capabilities(struct seq_file *m, void *data)seq_printf (m,"gen: %d\n" ,INTEL_GEN (dev_priv));seq_printf (m,"pch: %d\n" ,INTEL_PCH_TYPE (dev_priv));#define PRINT_FLAG (x) seq_printf(m, #x ": %s\n", yesno(info->x)) -#define SEP_SEMICOLON ; -DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG ,SEP_SEMICOLON ); +DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG );#undef PRINT_FLAG -#undef SEP_SEMICOLONreturn 0 ; }
drivers/gpu/drm/i915/i915_drv.h +47 -51
118 lines not on this page · raw message
drivers/gpu/drm/i915/i915_gpu_error.c +1 -3
@@ -356,10 +356,8 @@ static void err_print_capabilities(struct drm_i915_error_state_buf *m, const struct intel_device_info *info) {#define PRINT_FLAG (x) err_printf(m, #x ": %s\n", yesno(info->x)) -#define SEP_SEMICOLON ; -DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG ,SEP_SEMICOLON ); +DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG );#undef PRINT_FLAG -#undef SEP_SEMICOLON } int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
drivers/gpu/drm/i915/intel_device_info.c +5 -11
@@ -28,20 +28,14 @@ void intel_device_info_dump(struct drm_i915_private *dev_priv) {const struct intel_device_info *info = &dev_priv->info; -#define PRINT_S (name) "%s" -#define SEP_EMPTY -#define PRINT_FLAG (name) info->name ? #name "," : "" -#define SEP_COMMA , -DRM_DEBUG_DRIVER ("i915 device info: gen=%i, pciid=0x%04x rev=0x%02x flags=" -DEV_INFO_FOR_EACH_FLAG (PRINT_S ,SEP_EMPTY ), +DRM_DEBUG_DRIVER ("i915 device info: gen=%i, pciid=0x%04x rev=0x%02x" , info->gen, dev_priv->drm.pdev->device, - dev_priv->drm.pdev->revision, -DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG ,SEP_COMMA )); -#undef PRINT_S -#undef SEP_EMPTY + dev_priv->drm.pdev->revision); +#define PRINT_FLAG (name) \ + DRM_DEBUG_DRIVER("i915 device info: " #name ": %s", yesno(info->name)) +DEV_INFO_FOR_EACH_FLAG (PRINT_FLAG );#undef PRINT_FLAG -#undef SEP_COMMA }static void cherryview_sseu_info_init (struct drm_i915_private *dev_priv)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerPATCH v2 2/2 drm/i915: Sort DEV_INFO_FOR_EACH_FLAG
Sort DEV_INFO_FOR_EACH_FLAG to alphabetical order (except is_*).
v2:
- Add comments in the hope of maintaining order (Chris)
--- drivers/gpu/drm/i915/i915_drv.h | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +20 -18
@@ -635,12 +635,12 @@ struct intel_csr { };#define DEV_INFO_FOR_EACH_FLAG (func) \ +/* Keep is_* in chronological order */ \ func(is_mobile); \ func(is_i85x); \ func(is_i915g); \ func(is_i945gm); \ func(is_g33); \ - func(hws_needs_physical); \ func(is_g4x); \ func(is_pineview); \ func(is_broadwater); \
@@ -654,31 +654,33 @@ struct intel_csr {func (is_broxton); \func (is_kabylake); \func (is_preliminary); \ -func (has_fbc); \ -func (has_psr); \ -func (has_runtime_pm); \ +/* Keep has_* in alphabetical order */ \func (has_csr); \ -func (has_resource_streamer); \ -func (has_rc6); \ -func (has_rc6p); \ +func (has_ddi); \func (has_dp_mst); \ +func (has_fbc); \ +func (has_fpga_dbg); \func (has_gmbus_irq); \ -func (has_hw_contexts); \ -func (has_logical_ring_contexts); \ -func (has_l3_dpf); \func (has_gmch_display); \func (has_guc); \ -func (has_pipe_cxsr); \func (has_hotplug); \ -func (cursor_needs_physical); \ -func (has_overlay); \ -func (overlay_needs_physical); \ -func (supports_tv); \ +func (has_hw_contexts); \ +func (has_l3_dpf); \func (has_llc); \ +func (has_logical_ring_contexts); \ +func (has_overlay); \ +func (has_pipe_cxsr); \ +func (has_pooled_eu); \ +func (has_psr); \ +func (has_rc6); \ +func (has_rc6p); \ +func (has_resource_streamer); \ +func (has_runtime_pm); \func (has_snoop); \ -func (has_ddi); \ -func (has_fpga_dbg); \ -func (has_pooled_eu) +func (cursor_needs_physical); \ +func (hws_needs_physical); \ +func (overlay_needs_physical); \ +func (supports_tv) struct sseu_dev_info {u8 slice_mask;
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
In reply to Joonas Lahtinen== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
URL : https://patchwork.freedesktop.org/series/13319/
State : warning
== Summary ==
Series 13319v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/13319/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900)fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:244 pass:214 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:244 pass:210 dwarn:2 dfail:0 fail:1 skip:31 fi-byt-n2820 total:244 pass:208 dwarn:0 dfail:0 fail:1 skip:35 fi-hsw-4770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ilk-650 total:244 pass:182 dwarn:0 dfail:0 fail:2 skip:60 fi-ivb-3520m total:244 pass:219 dwarn:0 dfail:0 fail:0 skip:25 fi-ivb-3770 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:221 dwarn:1 dfail:0 fail:0 skip:22 fi-skl-6700k total:244 pass:218 dwarn:2 dfail:0 fail:0 skip:24 fi-skl-6770hq total:244 pass:228 dwarn:1 dfail:0 fail:1 skip:14 fi-snb-2520m total:244 pass:208 dwarn:0 dfail:0 fail:0 skip:36 fi-snb-2600 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37
Results at /archive/results/CI_IGT_test/Patchwork_2627/
0ff41ae4e5f0bbbb83e3abcc170c1dab648f28b3 drm-intel-nightly: 2016y-10m-05d-09h-47m-15s UTC integration manifest a43cca5 drm/i915: Sort DEV_INFO_FOR_EACH_FLAG
caa639e drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerRe: ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
Quoted 3 lines · Patchwork
Test
kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
pass -> DMESG-WARN (fi-skl-6700k)
[drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Existing bug;
https://bugs.freedesktop.org/show_bug.cgi?id=94605
Quoted 2 lines
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900)
[ 622.590631] [drm:intel_dp_aux_ch [i915]] *ERROR* dp_aux_ch not done status 0x00050000
Opened a new bug at;
https://bugs.freedesktop.org/show_bug.cgi?id=98095
So nothing related to the series, good to merge unless there's a direct Nack. Jani?
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerRe: ✗ Fi.CI.BAT: warning for series starting with [v2,1/2] drm/i915: Reduce trickery in DEV_INFO_FOR_EACH_FLAG
Quoted 3 lines · Joonas Lahtinen
So nothing related to the series, good to merge unless there's a direct
Nack. Jani?
Not-Ncked on IRC, so merged, thanks for the review!
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx