drm/i915: Unifying debugfs return codes for unsupported features
Subsystems (2)
PATCH v2 1/1 drm/i915: Unifying debugfs return codes for unsupported features
Instead of trying different seq_puts messages, lets use common -ENODEV error code to indicate missing/unsupported feature.
v2: don't forget about guc_log_control fops (Sagar)
--- drivers/gpu/drm/i915/i915_debugfs.c | 76 +++++++++++++++---------------------- 1 file changed, 31 insertions(+), 45 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +31 -45
@@ -1602,10 +1602,8 @@ static int i915_fbc_status(struct seq_file *m, void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -if (!HAS_FBC (dev_priv)) { -seq_puts (m,"FBC unsupported on this chipset\n" ); -return 0 ; - } +if (!HAS_FBC (dev_priv)) +return -ENODEV ;intel_runtime_pm_get (dev_priv);mutex_lock (&dev_priv->fbc.lock);
@@ -1681,10 +1679,8 @@ static int i915_ips_status(struct seq_file *m, void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -if (!HAS_IPS (dev_priv)) { -seq_puts (m,"not supported\n" ); -return 0 ; - } +if (!HAS_IPS (dev_priv)) +return -ENODEV ;intel_runtime_pm_get (dev_priv);
@@ -1770,10 +1766,8 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)int gpu_freq, ia_freq;unsigned int max_gpu_freq, min_gpu_freq; -if (!HAS_LLC (dev_priv)) { -seq_puts (m,"unsupported on this chipset\n" ); -return 0 ; - } +if (!HAS_LLC (dev_priv)) +return -ENODEV ;intel_runtime_pm_get (dev_priv);
@@ -2253,8 +2247,8 @@ static int i915_huc_load_status_info(struct seq_file *m, void *data)struct drm_i915_private *dev_priv =node_to_i915 (m->private);struct drm_printer p; -if (!HAS_HUC_UCODE (dev_priv)) -return 0 ; +if (!HAS_HUC (dev_priv)) +return -ENODEV ; p =drm_seq_file_printer (m);intel_uc_fw_dump (&dev_priv->huc.fw, &p);
@@ -2272,8 +2266,8 @@ static int i915_guc_load_status_info(struct seq_file *m, void *data)struct drm_printer p;u32 tmp, i; -if (!HAS_GUC_UCODE (dev_priv)) -return 0 ; +if (!HAS_GUC (dev_priv)) +return -ENODEV ; p =drm_seq_file_printer (m);intel_uc_fw_dump (&dev_priv->guc.fw, &p);
@@ -2346,29 +2340,16 @@ static void i915_guc_client_info(struct seq_file *m,seq_printf (m,"\tTotal: %llu\n" , tot); } -static bool check_guc_submission (struct seq_file *m) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -const struct intel_guc *guc = &dev_priv->guc; - -if (!guc->execbuf_client) { -seq_printf (m,"GuC submission %s\n" , -HAS_GUC_SCHED (dev_priv) ? -"disabled" : -"not supported" ); -return false; - } - -return true; -} -static int i915_guc_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);const struct intel_guc *guc = &dev_priv->guc; -if (!check_guc_submission (m)) -return 0 ; +if (!USES_GUC_SUBMISSION (dev_priv)) +return -ENODEV ; + +GEM_BUG_ON (!guc->execbuf_client); +GEM_BUG_ON (!guc->preempt_client);seq_printf (m,"Doorbell map:\n" );seq_printf (m,"\t%*pb\n" ,GUC_NUM_DOORBELLS , guc->doorbell_bitmap);
@@ -2395,8 +2376,8 @@ static int i915_guc_stage_pool(struct seq_file *m, void *data)unsigned int tmp;int index; -if (!check_guc_submission (m)) -return 0 ; +if (!USES_GUC_SUBMISSION (dev_priv)) +return -ENODEV ;for (index =0 ; index <GUC_MAX_STAGE_DESCRIPTORS ; index++, desc++) {struct intel_engine_cs *engine;
@@ -2449,6 +2430,9 @@ static int i915_guc_log_dump(struct seq_file *m, void *data)u32 *log;int i =0 ; +if (!HAS_GUC (dev_priv)) +return -ENODEV ; +if (dump_load_err) obj = dev_priv->guc.load_err_log;else if (dev_priv->guc.log.vma)
@@ -2480,6 +2464,9 @@ static int i915_guc_log_control_get(void *data, u64 *val) {struct drm_i915_private *dev_priv = data; +if (!HAS_GUC (dev_priv)) +return -ENODEV ; +if (!dev_priv->guc.log.vma)return -EINVAL ;
@@ -2493,6 +2480,9 @@ static int i915_guc_log_control_set(void *data, u64 val)struct drm_i915_private *dev_priv = data;int ret; +if (!HAS_GUC (dev_priv)) +return -ENODEV ; +if (!dev_priv->guc.log.vma)return -EINVAL ;
@@ -2543,10 +2533,8 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)enum pipe pipe;bool enabled = false; -if (!HAS_PSR (dev_priv)) { -seq_puts (m,"PSR not supported\n" ); -return 0 ; - } +if (!HAS_PSR (dev_priv)) +return -ENODEV ;intel_runtime_pm_get (dev_priv);
@@ -2785,10 +2773,8 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);struct intel_csr *csr; -if (!HAS_CSR (dev_priv)) { -seq_puts (m,"not supported\n" ); -return 0 ; - } +if (!HAS_CSR (dev_priv)) +return -ENODEV ; csr = &dev_priv->csr;
@@ -3324,7 +3310,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)int plane;if (INTEL_GEN (dev_priv) <9 ) -return 0 ; +return -ENODEV ;drm_modeset_lock_all (dev);
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: success for drm/i915: Unifying debugfs return codes for unsupported features (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915: Unifying debugfs return codes for unsupported features (rev2)
URL : https://patchwork.freedesktop.org/series/34552/
State : success
== Summary ==
Series 34552v2 drm/i915: Unifying debugfs return codes for unsupported features
https://patchwork.freedesktop.org/api/1.0/series/34552/revisions/2/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass -> DMESG-WARN (fi-skl-6700hq) fdo#101144fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:432s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:439s fi-blb-e6850 total:288 pass:222 dwarn:1 dfail:0 fail:1 skip:64 time:394s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:501s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:277s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:495s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:501s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:479s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:470s fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:1 dfail:0 fail:0 skip:108 time:265s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:533s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:409s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:417s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:393s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:475s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:429s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:478s fi-kbl-7560u total:288 pass:268 dwarn:1 dfail:0 fail:0 skip:19 time:519s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:464s fi-pnv-d510 total:288 pass:221 dwarn:1 dfail:0 fail:1 skip:65 time:588s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:449s fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:525s fi-skl-6700hq total:288 pass:261 dwarn:1 dfail:0 fail:0 skip:26 time:555s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:487s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:444s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:548s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:416s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:599s fi-cnl-y total:215 pass:194 dwarn:0 dfail:0 fail:0 skip:20 fi-glk-dsi total:288 pass:185 dwarn:1 dfail:4 fail:0 skip:98 time:392s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:508s
d2a96c2d31af5cf964f9bb9b9c2cb453f6194954 drm-tip: 2017y-12m-15d-13h-58m-44s UTC integration manifest be07869991fb drm/i915: Unifying debugfs return codes for unsupported features
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7507/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for drm/i915: Unifying debugfs return codes for unsupported features (rev2)
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915: Unifying debugfs return codes for unsupported features (rev2)
URL : https://patchwork.freedesktop.org/series/34552/
State : failure
== Summary ==
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS (shard-hsw) fdo#103540
Test kms_fbcon_fbt:
Subgroup fbc-suspend:
pass -> INCOMPLETE (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail -> PASS (shard-snb) fdo#101623
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS (shard-snb) fdo#104058
Test kms_flip:
Subgroup vblank-vs-dpms-suspend-interruptible:
pass -> SKIP (shard-snb) fdo#102365fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
shard-hsw total:2664 pass:1508 dwarn:1 dfail:0 fail:10 skip:1144 time:9073s shard-snb total:2712 pass:1307 dwarn:1 dfail:0 fail:12 skip:1392 time:7953s Blacklisted hosts: shard-apl total:2712 pass:1685 dwarn:1 dfail:0 fail:24 skip:1001 time:13875s shard-kbl total:2712 pass:1805 dwarn:1 dfail:0 fail:26 skip:880 time:11145s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7507/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2017-12-15 14:36:35)
Quoted 11 lines
Instead of trying different
seq_putsmessages, lets use common-ENODEVerror code to indicate missing/unsupported feature.v2: don't forget about
guc_log_controlfops (Sagar)Suggested-by Chris Wilson <[email protected]>Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Sagar Arun Kamble <[email protected]>Cc Sujaritha Sundaresan <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Chris Wilson (2017-12-17 18:04:08)
Quoted 6 lines
Quoting Michal Wajdeczko (2017-12-15 14:36:35)
Quoted 5 lines
Instead of trying different
seq_putsmessages, lets use common-ENODEVerror code to indicate missing/unsupported feature.v2: don't forget about
guc_log_controlfops (Sagar)
Quoted 7 lines
Quoted 6 lines
Suggested-by Chris Wilson <[email protected]>Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Sagar Arun Kamble <[email protected]>Cc Sujaritha Sundaresan <[email protected]>Reviewed-by Chris Wilson <[email protected]>
And pushed, thanks for the patch and matching igt improvements. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx