drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
Subsystems (2)
PATCH 1/1 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
When changing the default values for guc_log_level, we accidentally left the log enabled on non-guc platforms. Let's fix that.
--- drivers/gpu/drm/i915/intel_uc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +8 -5
@@ -69,14 +69,17 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)static int __get_default_guc_log_level (struct drm_i915_private *dev_priv) { -int guc_log_level =1 ;/* non-verbose */ +int guc_log_level; -/* Enable if we're running on platform with GuC and debug config */ -if (HAS_GUC (dev_priv) &&intel_uc_is_using_guc () && - (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || -IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM ))) +if (!HAS_GUC (dev_priv) || !intel_uc_is_using_guc ()) + guc_log_level =0 ;/* disabled */ +else if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || +IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM )) +/* Use full verbosity on platform with GuC and debug config */ guc_log_level =GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); +else + guc_log_level =1 ;/* non-verbose */ /* Any platform specific fine-tuning can be done here */
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michał Winiarski (2018-03-20 00:13:37)
Quoted 25 lines
When changing the default values for
guc_log_level, we accidentally left the log enabled on non-guc platforms. Let's fix that.Fixes 9605d1ce7c6b ("drm/i915/guc: Default to non-verbose GuC logging")Reported-by Chris Wilson <[email protected]>Signed-off-by Michał Winiarski <[email protected]>Cc Chris Wilson <[email protected]>Cc Sagar Arun Kamble <[email protected]>Cc Michal Wajdeczko <[email protected]>--- drivers/gpu/drm/i915/intel_uc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_uc.c +1
-2@@ -69,14 +69,17 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)static int __get_default_guc_log_level (struct drm_i915_private *dev_priv) { -int guc_log_level =1 ;/* non-verbose */ +int guc_log_level; -/* Enable if we're running on platform with GuC and debug config */
drivers/gpu/drm/i915/intel_uc.c static int __get_platform_enable_guc(struct drm_i915_private *dev_priv) · line 80
Quoted 10 lines
drivers/gpu/drm/i915/intel_uc.c +5
-3-if (HAS_GUC (dev_priv) &&intel_uc_is_using_guc () && - (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || -IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM ))) +if (!HAS_GUC (dev_priv) || !intel_uc_is_using_guc ()) + guc_log_level =0 ;/* disabled */ +else if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || +IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM )) +/* Use full verbosity on platform with GuC and debug config */ guc_log_level =GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX );
guc_log_level = GUC_LOG_LEVEL_MAX;
#define GUC_LOG_LEVEL_MAX GUC_VERBOSITY_TO_LOG_LEVEL(GUC_LOG_VERBOSITY_MAX)
in passing?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
URL : https://patchwork.freedesktop.org/series/40239/
State : success
== Summary ==
Series 40239v1 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
https://patchwork.freedesktop.org/api/1.0/series/40239/revisions/1/mbox/
---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> INCOMPLETE (fi-bdw-5557u) fdo#104944fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104944 https://bugs.freedesktop.org/show_bug.cgi?id=104944
fi-bdw-5557u total:241 pass:223 dwarn:0 dfail:0 fail:0 skip:17 fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:439s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:379s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:531s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:296s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:509s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:518s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:515s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:501s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:409s fi-cfl-s2 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:574s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:509s fi-cnl-drrs total:285 pass:254 dwarn:3 dfail:0 fail:0 skip:28 time:533s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:422s fi-gdg-551 total:285 pass:176 dwarn:0 dfail:0 fail:1 skip:108 time:317s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:534s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:408s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:418s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:472s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:428s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:474s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:519s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:659s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:440s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:536s fi-skl-6700hq total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:541s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:506s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:488s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:430s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:446s fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0 fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:400s
141def2a45f4a3ad7c7e9144cd26e97bb1298397 drm-tip: 2018y-03m-19d-23h-48m-43s UTC integration manifest 430e544c2989 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8405/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
URL : https://patchwork.freedesktop.org/series/40239/
State : warning
== Summary ==
---- Possible new issues:
Test kms_atomic_transition:
Subgroup plane-all-modeset-transition-fencing:
pass -> SKIP (shard-snb)
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
skip -> PASS (shard-snb)---- Known issues:
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-atomic:
pass -> FAIL (shard-hsw) fdo#102670
Test kms_flip:
Subgroup dpms-vs-vblank-race:
fail -> PASS (shard-hsw) fdo#103060
Subgroup flip-vs-absolute-wf_vblank:
fail -> PASS (shard-hsw) fdo#100368
Subgroup flip-vs-modeset-vs-hang-interruptible:
pass -> DMESG-WARN (shard-snb) fdo#104311
Test kms_flip_tiling:
Subgroup flip-x-tiled:
fail -> PASS (shard-apl) fdo#103822
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
skip -> PASS (shard-snb) fdo#103375 +2
Test kms_plane:
Subgroup plane-position-hole-pipe-c-planes:
fail -> PASS (shard-apl) fdo#103166
Test kms_vblank:
Subgroup pipe-b-ts-continuation-suspend:
pass -> SKIP (shard-snb) fdo#105411fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104311 https://bugs.freedesktop.org/show_bug.cgi?id=104311
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
shard-apl total:3478 pass:1814 dwarn:1 dfail:0 fail:7 skip:1655 time:12923s shard-hsw total:3385 pass:1723 dwarn:1 dfail:0 fail:2 skip:1656 time:10684s shard-snb total:3478 pass:1355 dwarn:2 dfail:0 fail:2 skip:2119 time:7136s
Blacklisted hosts:
shard-kbl total:3478 pass:1939 dwarn:1 dfail:0 fail:9 skip:1529 time:9867s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8405/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
In reply to Michał WiniarskiWhen changing the default values for guc_log_level, we accidentally left the log enabled on non-guc platforms. Let's fix that.
v2: Define the levels used and remove (now obsolete) comments (Chris)
--- drivers/gpu/drm/i915/intel_guc_log.c | 3 +-- drivers/gpu/drm/i915/intel_guc_log.h | 10 ++++++---- drivers/gpu/drm/i915/intel_uc.c | 21 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/intel_guc_log.c +1 -2
@@ -515,8 +515,7 @@ int intel_guc_log_level_set(struct intel_guc_log *log, u64 val)* GuC is recognizing log levels starting from 0 to max, we're using 0 * as indication that logging should be disabled. */ -if (val <GUC_LOG_LEVEL_DISABLED || - val >GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) +if (val <GUC_LOG_LEVEL_DISABLED || val >GUC_LOG_LEVEL_MAX )return -EINVAL ;mutex_lock (&dev_priv->drm.struct_mutex);
drivers/gpu/drm/i915/intel_guc_log.h +6 -4
@@ -46,14 +46,16 @@ struct intel_guc;* log enabling, and separate bit for default logging - which "conveniently" * ignores the enable bit. */ -#define GUC_LOG_LEVEL_DISABLED 0 -#define GUC_LOG_LEVEL_TO_ENABLED (x) ((x) > 0) -#define GUC_LOG_LEVEL_TO_VERBOSE (x) ((x) > 1) +#define GUC_LOG_LEVEL_DISABLED 0 +#define GUC_LOG_LEVEL_NON_VERBOSE 1 +#define GUC_LOG_LEVEL_TO_ENABLED (x) ((x) > GUC_LOG_LEVEL_DISABLED) +#define GUC_LOG_LEVEL_TO_VERBOSE (x) ((x) > GUC_LOG_LEVEL_NON_VERBOSE)#define GUC_LOG_LEVEL_TO_VERBOSITY (x) ({ \ typeof(x) _x = (x); \ GUC_LOG_LEVEL_TO_VERBOSE(_x) ? _x - 2 : 0; \ }) -#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_LOG_LEVEL_MAX GUC_VERBOSITY_TO_LOG_LEVEL(GUC_LOG_VERBOSITY_MAX)struct intel_guc_log {u32 flags;
drivers/gpu/drm/i915/intel_uc.c +10 -11
@@ -69,14 +69,15 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)static int __get_default_guc_log_level (struct drm_i915_private *dev_priv) { -int guc_log_level =1 ;/* non-verbose */ +int guc_log_level; -/* Enable if we're running on platform with GuC and debug config */ -if (HAS_GUC (dev_priv) &&intel_uc_is_using_guc () && - (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || -IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM ))) - guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); +if (!HAS_GUC (dev_priv) || !intel_uc_is_using_guc ()) + guc_log_level =GUC_LOG_LEVEL_DISABLED ; +else if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || +IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM )) + guc_log_level =GUC_LOG_LEVEL_MAX ; +else + guc_log_level =GUC_LOG_LEVEL_NON_VERBOSE ;/* Any platform specific fine-tuning can be done here */
@@ -143,13 +144,11 @@ static void sanitize_options_early(struct drm_i915_private *dev_priv) i915_modparams.guc_log_level =0 ; } -if (i915_modparams.guc_log_level > -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) { +if (i915_modparams.guc_log_level >GUC_LOG_LEVEL_MAX ) {DRM_WARN ("Incompatible option detected: %s=%d, %s!\n" ,"guc_log_level" , i915_modparams.guc_log_level,"verbosity too high" ); - i915_modparams.guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); + i915_modparams.guc_log_level =GUC_LOG_LEVEL_MAX ; } DRM_DEBUG_DRIVER("guc_log_level=%d (enabled:%s, verbose:%s, verbosity:%d)\n",
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michał Winiarski (2018-03-20 08:49:29)
Quoted 36 lines
When changing the default values for
guc_log_level, we accidentally left the log enabled on non-guc platforms. Let's fix that.v2: Define the levels used and remove (now obsolete) comments (Chris)
Fixes 9605d1ce7c6b ("drm/i915/guc: Default to non-verbose GuC logging")Reported-by Chris Wilson <[email protected]>Signed-off-by Michał Winiarski <[email protected]>Cc Chris Wilson <[email protected]>Cc Sagar Arun Kamble <[email protected]>Cc Michal Wajdeczko <[email protected]>--- drivers/gpu/drm/i915/intel_guc_log.c | 3 +-- drivers/gpu/drm/i915/intel_guc_log.h | 10 ++++++---- drivers/gpu/drm/i915/intel_uc.c | 21 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-)drivers/gpu/drm/i915/intel_guc_log.c +1
-2@@ -515,8 +515,7 @@ int intel_guc_log_level_set(struct intel_guc_log *log, u64 val)* GuC is recognizing log levels starting from 0 to max, we're using 0 * as indication that logging should be disabled. */ -if (val <GUC_LOG_LEVEL_DISABLED || - val >GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) +if (val <GUC_LOG_LEVEL_DISABLED || val >GUC_LOG_LEVEL_MAX )return -EINVAL ;mutex_lock (&dev_priv->drm.struct_mutex);drivers/gpu/drm/i915/intel_guc_log.h +0
-0
drivers/gpu/drm/i915/intel_guc_log.h struct intel_guc; · line 52
Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_log.h +4
-3@@ -46,14 +46,16 @@ struct intel_guc;* log enabling, and separate bit for default logging - which "conveniently" * ignores the enable bit. */ -#define GUC_LOG_LEVEL_DISABLED 0 -#define GUC_LOG_LEVEL_TO_ENABLED (x) ((x) > 0) -#define GUC_LOG_LEVEL_TO_VERBOSE (x) ((x) > 1) +#define GUC_LOG_LEVEL_DISABLED 0 +#define GUC_LOG_LEVEL_NON_VERBOSE 1 +#define GUC_LOG_LEVEL_TO_ENABLED (x) ((x) > GUC_LOG_LEVEL_DISABLED) +#define GUC_LOG_LEVEL_TO_VERBOSE (x) ((x) > GUC_LOG_LEVEL_NON_VERBOSE)
Since this pair is boolean, may is suggest IS_ENABLED, IS_VERBOSE respectively?
drivers/gpu/drm/i915/intel_guc_log.h struct intel_guc; · line 58
Quoted 7 lines
drivers/gpu/drm/i915/intel_guc_log.h +2
-1#define GUC_LOG_LEVEL_TO_VERBOSITY (x) ({ \ typeof(x) _x = (x); \ GUC_LOG_LEVEL_TO_VERBOSE(_x) ? _x - 2 : 0; \ }) -#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_LOG_LEVEL_MAX GUC_VERBOSITY_TO_LOG_LEVEL(GUC_LOG_VERBOSITY_MAX)
Then you have
bool: IS_ENABLED, IS_VERBOSE;
int: TO_VERBOSITY, TO_LOG_LEVEL;
Quoted 12 lines
drivers/gpu/drm/i915/intel_guc_log.h +0
-0struct intel_guc_log {u32 flags;drivers/gpu/drm/i915/intel_uc.c +0
-1@@ -69,14 +69,15 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)static int __get_default_guc_log_level (struct drm_i915_private *dev_priv) { -int guc_log_level =1 ;/* non-verbose */
drivers/gpu/drm/i915/intel_uc.c static int __get_platform_enable_guc(struct drm_i915_private *dev_priv) · line 75
Quoted 10 lines
drivers/gpu/drm/i915/intel_uc.c +3
-6+int guc_log_level; -/* Enable if we're running on platform with GuC and debug config */ -if (HAS_GUC (dev_priv) &&intel_uc_is_using_guc () && - (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || -IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM ))) - guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); +if (!HAS_GUC (dev_priv) || !intel_uc_is_using_guc ()) + guc_log_level =GUC_LOG_LEVEL_DISABLED ;
Ok. That'll quieten down the surprise.
drivers/gpu/drm/i915/intel_uc.c static int __get_platform_enable_guc(struct drm_i915_private *dev_priv) · line 78
Quoted 3 lines
drivers/gpu/drm/i915/intel_uc.c +3
-0+else if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || +IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM )) + guc_log_level =GUC_LOG_LEVEL_MAX ;
Noisy for CI.
drivers/gpu/drm/i915/intel_uc.c static int __get_platform_enable_guc(struct drm_i915_private *dev_priv) · line 80
Quoted 2 lines
drivers/gpu/drm/i915/intel_uc.c +2
-0+else + guc_log_level =GUC_LOG_LEVEL_NON_VERBOSE ;
Otherwise silent until asked.
Quoted 7 lines
drivers/gpu/drm/i915/intel_uc.c +0
-0/* Any platform specific fine-tuning can be done here */ @@ -143,13 +144,11 @@ static void sanitize_options_early(struct drm_i915_private *dev_priv) i915_modparams.guc_log_level =0 ; }
drivers/gpu/drm/i915/intel_uc.c static void sanitize_options_early(struct drm_i915_private *dev_priv) · line 152
Quoted 10 lines
drivers/gpu/drm/i915/intel_uc.c +2
-4-if (i915_modparams.guc_log_level > -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) { +if (i915_modparams.guc_log_level >GUC_LOG_LEVEL_MAX ) {DRM_WARN ("Incompatible option detected: %s=%d, %s!\n" ,"guc_log_level" , i915_modparams.guc_log_level,"verbosity too high" ); - i915_modparams.guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); + i915_modparams.guc_log_level =GUC_LOG_LEVEL_MAX ; }
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 1/1 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
In reply to Michał WiniarskiWhen changing the default values for guc_log_level, we accidentally left the log enabled on non-guc platforms. Let's fix that.
v2: Define the levels used and remove (now obsolete) comments (Chris)
v3: Use "IS" rather than "TO" for booleans (Chris)
--- drivers/gpu/drm/i915/intel_guc.c | 4 ++-- drivers/gpu/drm/i915/intel_guc_log.c | 7 +++---- drivers/gpu/drm/i915/intel_guc_log.h | 12 +++++++----- drivers/gpu/drm/i915/intel_uc.c | 23 +++++++++++------------ 4 files changed, 23 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/intel_guc.c +2 -2
@@ -229,10 +229,10 @@ static u32 get_log_control_flags(void)GEM_BUG_ON (level <0 ); -if (!GUC_LOG_LEVEL_TO_ENABLED (level)) +if (!GUC_LOG_LEVEL_IS_ENABLED (level)) flags |=GUC_LOG_DEFAULT_DISABLED ; -if (!GUC_LOG_LEVEL_TO_VERBOSE (level)) +if (!GUC_LOG_LEVEL_IS_VERBOSE (level)) flags |=GUC_LOG_DISABLED ;else flags |= GUC_LOG_LEVEL_TO_VERBOSITY(level) <<
drivers/gpu/drm/i915/intel_guc_log.c +3 -4
@@ -515,8 +515,7 @@ int intel_guc_log_level_set(struct intel_guc_log *log, u64 val)* GuC is recognizing log levels starting from 0 to max, we're using 0 * as indication that logging should be disabled. */ -if (val <GUC_LOG_LEVEL_DISABLED || - val >GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) +if (val <GUC_LOG_LEVEL_DISABLED || val >GUC_LOG_LEVEL_MAX )return -EINVAL ;mutex_lock (&dev_priv->drm.struct_mutex);
@@ -527,8 +526,8 @@ int intel_guc_log_level_set(struct intel_guc_log *log, u64 val) }intel_runtime_pm_get (dev_priv); - ret =guc_log_control (guc,GUC_LOG_LEVEL_TO_VERBOSE (val), -GUC_LOG_LEVEL_TO_ENABLED (val), + ret =guc_log_control (guc,GUC_LOG_LEVEL_IS_VERBOSE (val), +GUC_LOG_LEVEL_IS_ENABLED (val),GUC_LOG_LEVEL_TO_VERBOSITY (val));intel_runtime_pm_put (dev_priv);if (ret) {
drivers/gpu/drm/i915/intel_guc_log.h +7 -5
@@ -46,14 +46,16 @@ struct intel_guc;* log enabling, and separate bit for default logging - which "conveniently" * ignores the enable bit. */ -#define GUC_LOG_LEVEL_DISABLED 0 -#define GUC_LOG_LEVEL_TO_ENABLED (x) ((x) > 0) -#define GUC_LOG_LEVEL_TO_VERBOSE (x) ((x) > 1) +#define GUC_LOG_LEVEL_DISABLED 0 +#define GUC_LOG_LEVEL_NON_VERBOSE 1 +#define GUC_LOG_LEVEL_IS_ENABLED (x) ((x) > GUC_LOG_LEVEL_DISABLED) +#define GUC_LOG_LEVEL_IS_VERBOSE (x) ((x) > GUC_LOG_LEVEL_NON_VERBOSE)#define GUC_LOG_LEVEL_TO_VERBOSITY (x) ({ \ typeof(x) _x = (x); \ - GUC_LOG_LEVEL_TO_VERBOSE(_x) ? _x - 2 : 0; \ + GUC_LOG_LEVEL_IS_VERBOSE(_x) ? _x - 2 : 0; \ }) -#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_VERBOSITY_TO_LOG_LEVEL (x) ((x) + 2) +#define GUC_LOG_LEVEL_MAX GUC_VERBOSITY_TO_LOG_LEVEL(GUC_LOG_VERBOSITY_MAX)struct intel_guc_log {u32 flags;
drivers/gpu/drm/i915/intel_uc.c +11 -12
@@ -69,14 +69,15 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)static int __get_default_guc_log_level (struct drm_i915_private *dev_priv) { -int guc_log_level =1 ;/* non-verbose */ +int guc_log_level; -/* Enable if we're running on platform with GuC and debug config */ -if (HAS_GUC (dev_priv) &&intel_uc_is_using_guc () && - (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || -IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM ))) - guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); +if (!HAS_GUC (dev_priv) || !intel_uc_is_using_guc ()) + guc_log_level =GUC_LOG_LEVEL_DISABLED ; +else if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ) || +IS_ENABLED (CONFIG_DRM_I915_DEBUG_GEM )) + guc_log_level =GUC_LOG_LEVEL_MAX ; +else + guc_log_level =GUC_LOG_LEVEL_NON_VERBOSE ;/* Any platform specific fine-tuning can be done here */
@@ -143,19 +144,17 @@ static void sanitize_options_early(struct drm_i915_private *dev_priv) i915_modparams.guc_log_level =0 ; } -if (i915_modparams.guc_log_level > -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX )) { +if (i915_modparams.guc_log_level >GUC_LOG_LEVEL_MAX ) {DRM_WARN ("Incompatible option detected: %s=%d, %s!\n" ,"guc_log_level" , i915_modparams.guc_log_level,"verbosity too high" ); - i915_modparams.guc_log_level = -GUC_VERBOSITY_TO_LOG_LEVEL (GUC_LOG_VERBOSITY_MAX ); + i915_modparams.guc_log_level =GUC_LOG_LEVEL_MAX ; }DRM_DEBUG_DRIVER ("guc_log_level=%d (enabled:%s, verbose:%s, verbosity:%d)\n" , i915_modparams.guc_log_level,yesno (i915_modparams.guc_log_level), -yesno (GUC_LOG_LEVEL_TO_VERBOSE (i915_modparams.guc_log_level)), +yesno (GUC_LOG_LEVEL_IS_VERBOSE (i915_modparams.guc_log_level)),GUC_LOG_LEVEL_TO_VERBOSITY (i915_modparams.guc_log_level));/* Make sure that sanitization was done */
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev2)
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev2)
URL : https://patchwork.freedesktop.org/series/40239/
State : success
== Summary ==
Series 40239v2 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
https://patchwork.freedesktop.org/api/1.0/series/40239/revisions/2/mbox/
---- Known issues:
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:431s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:441s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:381s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:535s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:296s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:519s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:513s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:519s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:505s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:407s fi-cfl-s2 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:585s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:510s fi-cnl-drrs total:285 pass:254 dwarn:3 dfail:0 fail:0 skip:28 time:525s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:428s fi-gdg-551 total:285 pass:176 dwarn:0 dfail:0 fail:1 skip:108 time:318s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:541s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:403s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:424s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:461s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:429s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:474s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:513s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:657s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:440s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:533s fi-skl-6700hq total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:541s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:502s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:492s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:428s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:448s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:584s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:400s
141def2a45f4a3ad7c7e9144cd26e97bb1298397 drm-tip: 2018y-03m-19d-23h-48m-43s UTC integration manifest 23023c6aa5d3 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8410/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev2)
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev2)
URL : https://patchwork.freedesktop.org/series/40239/
State : success
== Summary ==
---- Known issues:
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> INCOMPLETE (shard-snb) fdo#104311
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_flip:
Subgroup dpms-vs-vblank-race:
fail -> PASS (shard-hsw) fdo#103060
Subgroup flip-vs-absolute-wf_vblank:
fail -> PASS (shard-hsw) fdo#100368
Test kms_flip_tiling:
Subgroup flip-x-tiled:
fail -> PASS (shard-apl) fdo#103822
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-c-planes:
pass -> INCOMPLETE (shard-hsw) fdo#103375 +1
Subgroup plane-position-hole-pipe-c-planes:
fail -> PASS (shard-apl) fdo#103166
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047fdo#104311 https://bugs.freedesktop.org/show_bug.cgi?id=104311
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:3478 pass:1815 dwarn:1 dfail:0 fail:7 skip:1655 time:12941s shard-hsw total:3385 pass:1724 dwarn:1 dfail:0 fail:1 skip:1656 time:10604s shard-snb total:3409 pass:1329 dwarn:1 dfail:0 fail:2 skip:2076 time:6982s
Blacklisted hosts:
shard-kbl total:3478 pass:1938 dwarn:1 dfail:0 fail:10 skip:1529 time:9883s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8410/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
URL : https://patchwork.freedesktop.org/series/40239/
State : success
== Summary ==
Series 40239v3 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
https://patchwork.freedesktop.org/api/1.0/series/40239/revisions/3/mbox/
---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
incomplete -> PASS (fi-snb-2520m) fdo#103713
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS (fi-skl-6700k2) fdo#104108fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:431s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:438s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:382s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:535s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:298s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:515s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:510s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:516s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:504s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:411s fi-cfl-s2 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:584s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:518s fi-cnl-drrs total:285 pass:254 dwarn:3 dfail:0 fail:0 skip:28 time:520s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:426s fi-gdg-551 total:285 pass:176 dwarn:0 dfail:0 fail:1 skip:108 time:317s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:539s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:401s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:420s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:478s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:429s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:476s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:515s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:655s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:441s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:533s fi-skl-6700hq total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:540s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:505s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:510s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:430s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:444s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:585s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:404s
89008ad5a75e8a1a55db9d6eec9797eb914a6306 drm-tip: 2018y-03m-20d-10h-51m-36s UTC integration manifest 7e9bc12389d8 drm/i915/guc: Don't try to enable GuC logging when we're not using GuC
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8413/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
In reply to Michał Winiarski== Series Details ==
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
URL : https://patchwork.freedesktop.org/series/40239/
State : success
== Summary ==
---- Known issues:
Test kms_flip:
Subgroup flip-vs-expired-vblank-interruptible:
pass -> FAIL (shard-hsw) fdo#102887
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
incomplete -> PASS (shard-hsw) fdo#103375
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-apl total:3478 pass:1815 dwarn:1 dfail:0 fail:7 skip:1655 time:13007s shard-hsw total:3478 pass:1767 dwarn:1 dfail:0 fail:2 skip:1707 time:11713s shard-snb total:3478 pass:1357 dwarn:1 dfail:0 fail:2 skip:2118 time:7143s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8413/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✓ Fi.CI.IGT: success for drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
Quoting Patchwork (2018-03-20 14:52:05)
Quoted 8 lines
== Series Details ==
Series: drm/i915/guc: Don't try to enable GuC logging when we're not using GuC (rev3)
URL : https://patchwork.freedesktop.org/series/40239/
State : success== Summary ==
No more editing, pushed! Thanks,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx