Reclassify messages from GuC loader/submission
Subsystems (3)
v5 cover Reclassify messages from GuC loader/submission
Various downgrading, upgrading, or general reorganisation of the messages emitted by the GuC code. As general principles:
* "can't happen" cases (inconsistencies/misconfiguration) are ERRORs
* recoverable (ignored) errors are downgraded to WARNINGs
* important auxiliary messages about failure or mode change are NOTICEs
* anything else (messages for developer rather than sysadmin) is DEBUG
v4:
Resend with added cover letter
v5:
Drop most of patch 1 (superseded by upstream changes).
Dave Gordon (4):
drm: two more (drm_)printk() wrapper macros drm/i915/guc: downgrade some DRM_ERROR() messages to DRM_WARN() drm/i915/guc: revisit GuC loader message levels drm/i915/guc: next version of GuC firmware is 8.11
drivers/gpu/drm/i915/i915_guc_submission.c | 18 ++++++-------- drivers/gpu/drm/i915/i915_params.c | 4 ++-- drivers/gpu/drm/i915/intel_guc_loader.c | 38 +++++++++++++++--------------- include/drm/drmP.h | 9 +++++-- 4 files changed, 35 insertions(+), 34 deletions(-)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 1/4 drm: two more (drm_)printk() wrapper macros
We had only DRM_INFO() and DRM_ERROR(), whereas the underlying printk() provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing simple macros for the additional levels. We don't provide _DEV_ or _ONCE or RATELIMITED versions yet as it seems unlikely that they'll be as useful.
v2:
Fix whitespace, missing ## (Eric Engestrom)
v5:
Much simplified after underlying functions were reworked.
--- include/drm/drmP.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
include/drm/drmP.h +7 -2
@@ -168,6 +168,13 @@ void drm_printk(const char *level, unsigned int category,/** \name Macros to make printk easier */ /*@{*/ +#define DRM_INFO (fmt, ...) \ + drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_NOTE (fmt, ...) \ + drm_printk(KERN_NOTICE, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_WARN (fmt, ...) \ + drm_printk(KERN_WARNING, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +/** * Error output. *
@@ -202,8 +209,6 @@ void drm_printk(const char *level, unsigned int category,#define DRM_DEV_INFO (dev, fmt, ...) \ drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", fmt, \ ##__VA_ARGS__) -#define DRM_INFO (fmt, ...) \ - drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)#define DRM_DEV_INFO_ONCE (dev, fmt, ...) \ ({ \
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v5 1/4] drm: two more (drm_)printk() wrapper macros
Quoted 11 lines · Dave Gordon
We had only
DRM_INFO()andDRM_ERROR(), whereas the underlyingprintk()provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing simple macros for the additional levels. We don't provide _DEV_ or_ONCEor RATELIMITED versions yet as it seems unlikely that they'll be as useful.v2:
Fix whitespace, missing ## (Eric Engestrom)
v5:
Much simplified after underlying functions were reworked.
Quoted 4 lines
Signed-off-by Dave Gordon <[email protected]>Previously-Reviewed-by Eric Engestrom <[email protected]> (v2)Cc Eric Engestrom <[email protected]>
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v5 1/4] drm: two more (drm_)printk() wrapper macros
In reply to Dave GordonQuoted 6 lines · Dave Gordon
We had only
DRM_INFO()andDRM_ERROR(), whereas the underlyingprintk()provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing simple macros for the additional levels. We don't provide _DEV_ or_ONCEor RATELIMITED versions yet as it seems unlikely that they'll be as useful.
Quoted 7 lines
v2:
Fix whitespace, missing ## (Eric Engestrom)
v5:
Much simplified after underlying functions were reworked.Signed-off-by Dave Gordon <[email protected]>Previously-Reviewed-by Eric Engestrom <[email protected]> (v2)
My r-b still stands on the v5 (and I really like the simplification!) Thanks for CC'ing me on the updates :)
Cheers,
Eric
Quoted 36 lines
Cc Eric Engestrom <[email protected]>--- include/drm/drmP.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)include/drm/drmP.h +7
-2@@ -168,6 +168,13 @@ void drm_printk(const char *level, unsigned int category,/** \name Macros to make printk easier */ /*@{*/ +#define DRM_INFO (fmt, ...) \ + drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_NOTE (fmt, ...) \ + drm_printk(KERN_NOTICE, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_WARN (fmt, ...) \ + drm_printk(KERN_WARNING, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +/** * Error output. * @@ -202,8 +209,6 @@ void drm_printk(const char *level, unsigned int category,#define DRM_DEV_INFO (dev, fmt, ...) \ drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", fmt, \ ##__VA_ARGS__) -#define DRM_INFO (fmt, ...) \ - drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)#define DRM_DEV_INFO_ONCE (dev, fmt, ...) \ ({ \Signature · 1 line
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v5 1/4] drm: two more (drm_)printk() wrapper macros
In reply to Dave GordonQuoted 24 lines · Dave Gordon
We had only
DRM_INFO()andDRM_ERROR(), whereas the underlyingprintk()provides several other useful intermediate levels such as NOTICE and WARNING. So this patch fills out the set by providing simple macros for the additional levels. We don't provide _DEV_ or_ONCEor RATELIMITED versions yet as it seems unlikely that they'll be as useful.v2:
Fix whitespace, missing ## (Eric Engestrom)
v5:
Much simplified after underlying functions were reworked.Signed-off-by Dave Gordon <[email protected]>Previously-Reviewed-by Eric Engestrom <[email protected]> (v2)Cc Eric Engestrom <[email protected]>--- include/drm/drmP.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)include/drm/drmP.h +0
-0
include/drm/drmP.h void drm_printk(const char *level, unsigned int category, · line 176
Quoted 9 lines
include/drm/drmP.h +6
-0@@ -168,6 +168,13 @@ void drm_printk(const char *level, unsigned int category,/** \name Macros to make printk easier */ /*@{*/ +#define DRM_INFO (fmt, ...) \ + drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_NOTE (fmt, ...) \ + drm_printk(KERN_NOTICE, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__) +#define DRM_WARN (fmt, ...) \ + drm_printk(KERN_WARNING, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)
I think you should add the _DEV_ variants of these (and once this is done, perhaps DRM_INFO should go back where it came from).
Sean
Quoted 16 lines
include/drm/drmP.h +1
-3+/** * Error output. * @@ -202,8 +209,6 @@ void drm_printk(const char *level, unsigned int category,#define DRM_DEV_INFO (dev, fmt, ...) \ drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", fmt, \ ##__VA_ARGS__) -#define DRM_INFO (fmt, ...) \ - drm_printk(KERN_INFO, DRM_UT_NONE, __func__, "", fmt, ##__VA_ARGS__)#define DRM_DEV_INFO_ONCE (dev, fmt, ...) \ ({ \ --1.9.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/4 drm/i915/guc: downgrade some DRM_ERROR() messages to DRM_WARN()
In reply to Dave GordonWhere we're going to continue regardless of the problem, rather than fail, then the message should be a WARNing rather than an ERROR.
--- drivers/gpu/drm/i915/i915_guc_submission.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_guc_submission.c +7 -11
@@ -114,10 +114,8 @@ static int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)if (ret != -ETIMEDOUT ) ret = -EIO ; -DRM_ERROR ("GUC: host2guc action 0x%X failed. ret=%d " -"status=0x%08X response=0x%08X\n" , - data[0 ], ret, status, -I915_READ (SOFT_SCRATCH (15 ))); +DRM_WARN ("Action 0x%X failed; ret=%d status=0x%08X response=0x%08X\n" , + data[0 ], ret, status,I915_READ (SOFT_SCRATCH (15 ))); dev_priv->guc.action_fail +=1 ; dev_priv->guc.action_err = ret;
@@ -551,8 +549,8 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)if (db_ret.db_status ==GUC_DOORBELL_DISABLED )break ; -DRM_ERROR ("Cookie mismatch. Expected %d, returned %d\n" , - db_cmp.cookie, db_ret.cookie); +DRM_WARN ("Cookie mismatch. Expected %d, found %d\n" , + db_cmp.cookie, db_ret.cookie);/* update the cookie to newly read cookie from GuC */ db_cmp.cookie = db_ret.cookie;
@@ -733,8 +731,8 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)/* Restore to original value */ err =guc_update_doorbell_id (guc, client, db_id);if (err) -DRM_ERROR ("Failed to restore doorbell to %d, err %d\n" , - db_id, err); +DRM_WARN ("Failed to restore doorbell to %d, err %d\n" , + db_id, err);/* Read back & verify all doorbell registers */ for (i =0 ; i <GUC_MAX_DOORBELLS ; ++i)
@@ -823,8 +821,6 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)return client; err: -DRM_ERROR ("FAILED to create priority %u GuC client!\n" , priority); -guc_client_free (dev_priv, client);return NULL ; }
@@ -1004,7 +1000,7 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)GUC_CTX_PRIORITY_KMD_NORMAL , dev_priv->kernel_context);if (!client) { -DRM_ERROR ("Failed to create execbuf guc_client\n" ); +DRM_ERROR ("Failed to create normal GuC client!\n" );return -ENOMEM ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 3/4 drm/i915/guc: revisit GuC loader message levels
In reply to Dave GordonSome downgraded from DRM_ERROR() to DRM_WARN() or DRM_NOTE(), a few upgraded from DRM_INFO() to DRM_NOTE() or DRM_WARN(), and one eliminated completely.
v2: different permutation of levels :)
v3: convert a couple of "this shouldn't happen" messages to WARN()
--- drivers/gpu/drm/i915/intel_guc_loader.c | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/intel_guc_loader.c +17 -17
@@ -152,12 +152,14 @@ static u32 get_gttype(struct drm_i915_private *dev_priv)static u32 get_core_family (struct drm_i915_private *dev_priv) { -switch (INTEL_INFO (dev_priv)->gen) { +u32 gen =INTEL_GEN (dev_priv); + +switch (gen) {case 9 :return GFXCORE_FAMILY_GEN9 ;default : -DRM_ERROR ("GUC: unsupported core family\n" ); +WARN (1 ,"GEN%d does not support GuC operation!\n" , gen);return GFXCORE_FAMILY_UNKNOWN ; } }
@@ -447,7 +449,7 @@ int intel_guc_setup(struct drm_device *dev) goto fail; }else if (*fw_path =='\0' ) {/* Device has a GuC but we don't know what f/w to load? */ -DRM_INFO ("No GuC firmware known for this platform\n" ); +WARN (1 ,"No GuC firmware known for this platform!\n" ); err = -ENODEV ; goto fail; }
@@ -485,10 +487,8 @@ int intel_guc_setup(struct drm_device *dev)* that the state and timing are fairly predictable */ err =i915_reset_guc (dev_priv); -if (err) { -DRM_ERROR ("GuC reset failed: %d\n" , err); +if (err) goto fail; - } err =guc_ucode_xfer (dev_priv);if (!err)
@@ -546,15 +546,15 @@ int intel_guc_setup(struct drm_device *dev)else if (err ==0 )DRM_INFO ("GuC firmware load skipped\n" );else if (ret != -EIO ) -DRM_INFO ("GuC firmware load failed: %d\n" , err); +DRM_NOTE ("GuC firmware load failed: %d\n" , err);else -DRM_ERROR ("GuC firmware load failed: %d\n" , err); +DRM_WARN ("GuC firmware load failed: %d\n" , err);if (i915.enable_guc_submission) {if (fw_path ==NULL )DRM_INFO ("GuC submission without firmware not supported\n" );if (ret ==0 ) -DRM_INFO ("Falling back from GuC submission to execlist mode\n" ); +DRM_NOTE ("Falling back from GuC submission to execlist mode\n" );else DRM_ERROR ("GuC init failed: %d\n" , ret); }
@@ -586,7 +586,7 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)/* Check the size of the blob before examining buffer contents */ if (fw->size <sizeof (struct guc_css_header )) { -DRM_ERROR ("Firmware header is missing\n" ); +DRM_NOTE ("Firmware header is missing\n" ); goto fail; }
@@ -598,7 +598,7 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw) css->key_size_dw - css->exponent_size_dw) * sizeof(u32);if (guc_fw->header_size !=sizeof (struct guc_css_header )) { -DRM_ERROR ("CSS header definition mismatch\n" ); +DRM_NOTE ("CSS header definition mismatch\n" ); goto fail; }
@@ -608,7 +608,7 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)/* now RSA */ if (css->key_size_dw !=UOS_RSA_SCRATCH_MAX_COUNT ) { -DRM_ERROR ("RSA key size is bad\n" ); +DRM_NOTE ("RSA key size is bad\n" ); goto fail; } guc_fw->rsa_offset = guc_fw->ucode_offset + guc_fw->ucode_size;
@@ -617,14 +617,14 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)/* At least, it should have header, uCode and RSA. Size of all three. */ size = guc_fw->header_size + guc_fw->ucode_size + guc_fw->rsa_size;if (fw->size < size) { -DRM_ERROR ("Missing firmware components\n" ); +DRM_NOTE ("Missing firmware components\n" ); goto fail; }/* Header and uCode will be loaded to WOPCM. Size of the two. */ size = guc_fw->header_size + guc_fw->ucode_size;if (size >guc_wopcm_size (to_i915 (dev))) { -DRM_ERROR ("Firmware is too large to fit in WOPCM\n" ); +DRM_NOTE ("Firmware is too large to fit in WOPCM\n" ); goto fail; }
@@ -639,7 +639,7 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)if (guc_fw->guc_fw_major_found != guc_fw->guc_fw_major_wanted || guc_fw->guc_fw_minor_found < guc_fw->guc_fw_minor_wanted) { -DRM_ERROR ("GuC firmware version %d.%d, required %d.%d\n" , +DRM_NOTE ("GuC firmware version %d.%d, required %d.%d\n" , guc_fw->guc_fw_major_found, guc_fw->guc_fw_minor_found, guc_fw->guc_fw_major_wanted, guc_fw->guc_fw_minor_wanted); err = -ENOEXEC ;
@@ -669,10 +669,10 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)return ; fail: +DRM_WARN ("Failed to fetch valid GuC firmware from %s (error %d)\n" , + guc_fw->guc_fw_path, err);DRM_DEBUG_DRIVER ("GuC fw fetch status FAIL; err %d, fw %p, obj %p\n" , err, fw, guc_fw->guc_fw_obj); -DRM_ERROR ("Failed to fetch GuC firmware from %s (error %d)\n" , - guc_fw->guc_fw_path, err);mutex_lock (&dev->struct_mutex); obj = guc_fw->guc_fw_obj;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 4/4 NOMERGE: next version of GuC firmware is 8.11
In reply to Dave GordonUpdate GuC firmware version to 8.11, and re-enable GuC loading and submission by default on suitable platforms, since it's Intel's Plan of Record that GuC submission shall be used where available.
--- drivers/gpu/drm/i915/i915_params.c | 4 ++-- drivers/gpu/drm/i915/intel_guc_loader.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_params.c +2 -2
@@ -55,8 +55,8 @@ struct i915_params i915 __read_mostly = { .verbose_state_checks = 1, .nuclear_pageflip = 0, .edp_vswing = 0, - .enable_guc_loading = 0, - .enable_guc_submission = 0, + .enable_guc_loading = -1, + .enable_guc_submission = -1, .guc_log_level = -1, .enable_dp_mst = true, .inject_load_failure = 0,
drivers/gpu/drm/i915/intel_guc_loader.c +2 -2
@@ -59,8 +59,8 @@* */ -#define SKL_FW_MAJOR 6 -#define SKL_FW_MINOR 1 +#define SKL_FW_MAJOR 8 +#define SKL_FW_MINOR 11#define BXT_FW_MAJOR 8#define BXT_FW_MINOR 7
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for Reclassify messages from GuC loader/submission (rev5)
In reply to Dave Gordon== Series Details ==
== Series Details ==
Series: Reclassify messages from GuC loader/submission (rev5)
URL : https://patchwork.freedesktop.org/series/10918/
State : warning
== Summary ==
Series 10918v5 Reclassify messages from GuC loader/submission
http://patchwork.freedesktop.org/api/1.0/series/10918/revisions/5/mbox/
Test drv_hangman:
Subgroup error-state-basic:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Test drv_module_reload_basic:
skip -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Test gem_ringfill:
Subgroup basic-default-hang:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Test kms_cursor_legacy:
Subgroup basic-cursor-vs-flip-legacy:
fail -> PASS (fi-bsw-n3050)
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup hang-read-crc-pipe-b:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup hang-read-crc-pipe-c:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6700k)fi-bdw-5557u total:252 pass:235 dwarn:0 dfail:0 fail:2 skip:15 fi-bsw-n3050 total:252 pass:205 dwarn:0 dfail:0 fail:1 skip:46 fi-byt-n2820 total:252 pass:207 dwarn:0 dfail:0 fail:3 skip:42 fi-hsw-4770k total:252 pass:228 dwarn:0 dfail:0 fail:2 skip:22 fi-hsw-4770r total:252 pass:224 dwarn:0 dfail:0 fail:2 skip:26 fi-ivb-3520m total:252 pass:220 dwarn:0 dfail:0 fail:1 skip:31 fi-skl-6260u total:252 pass:226 dwarn:10 dfail:0 fail:2 skip:14 fi-skl-6700k total:252 pass:212 dwarn:10 dfail:0 fail:2 skip:28 fi-snb-2520m total:252 pass:207 dwarn:0 dfail:0 fail:2 skip:43 fi-snb-2600 total:252 pass:207 dwarn:0 dfail:0 fail:2 skip:43
Results at /archive/results/CI_IGT_test/Patchwork_2436/
cdc87252779fbb627d0bb05a2690f4abfa7d8160 drm-intel-nightly: 2016y-08m-26d-17h-15m-21s UTC integration manifest 3b0807c NOMERGE: next version of GuC firmware is 8.11
cccf148 drm/i915/guc: revisit GuC loader message levels
0b74e81 drm/i915/guc: downgrade some DRM_ERROR() messages to DRM_WARN()
ff5d073 drm: two more (drm_)printk() wrapper macros
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx