Skip to contentSkip to conversation

drm/i915/csr: keep firmware name and required version together

PATCH Superseded Jani Nikula 2 participants 7 messages Sep 6, 2018 – Sep 7, 2018

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 drm/i915/csr: keep firmware name and required version together

Having two separate if ladders gets increasingly hard to maintain. Put them together.

---
 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_csr.c | 54 ++++++++++++++++------------------------
 2 files changed, 23 insertions(+), 32 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 767615ecdea5..368066010f94 100644
@@ -464,6 +464,7 @@ struct drm_i915_display_funcs {
 struct intel_csr {
 	struct work_struct work;
 	const char *fw_path;
+	uint32_t required_version;
 	uint32_t *dmc_payload;
 	uint32_t dmc_fw_size;
 	uint32_t version;
drivers/gpu/drm/i915/intel_csr.c +22 -32

83 lines not on this page · raw message

Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH v2 2/3 drm/i915/csr: keep max firmware size together with firmare name and version

Move max firmware size to the same if ladder with firmware name and required version. This allows us to detect the missing max size for a platform without actually loading the firmware, and makes the whole thing easier to maintain.

We need to move the power get earlier to allow for early return in the missing platform case. While at it, extend the comment on why we return with the reference held on errors.

We also need to move the module parameter override later to reuse the max firmware size, which is independent of the override. Note how this works with gen 11+ which don't have a specified firmware blob yet, but do have a maximum size.

v2: Add comment on why we leak the wakeref on errors (Chris)

---
 drivers/gpu/drm/i915/i915_drv.h  |  3 ++-
 drivers/gpu/drm/i915/intel_csr.c | 45 +++++++++++++++++++++++-----------------
 2 files changed, 28 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -1
index 368066010f94..62444f4c3c8e 100644
@@ -465,8 +465,9 @@ struct intel_csr {
 	struct work_struct work;
 	const char *fw_path;
 	uint32_t required_version;
+	uint32_t max_fw_size; /* bytes */
 	uint32_t *dmc_payload;
-	uint32_t dmc_fw_size;
+	uint32_t dmc_fw_size; /* dwords */
 	uint32_t version;
 	uint32_t mmio_count;
 	i915_reg_t mmioaddr[8];
drivers/gpu/drm/i915/intel_csr.c +26 -19

80 lines not on this page · raw message

Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH v2 3/3 drm/i915/csr: bypass firmware request on i915.dmc_firmware_path=""

In reply to Jani Nikula

With i915.dmc_firmware_path="" it's obvious the intention is to disable CSR firmware loading. Bypass the firmware request altogether in this case, with more obvious debug logging.

v2: Use DRM_INFO for logging (Chris)

---
 drivers/gpu/drm/i915/intel_csr.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +6 -0
index f6ad94d8b441..2ce55f68ea2d 100644
@@ -480,6 +480,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)
 	}
 
 	if (i915_modparams.dmc_firmware_path) {
+		if (strlen(i915_modparams.dmc_firmware_path) == 0) {
+			csr->fw_path = NULL;
+			DRM_INFO("Disabling CSR firmare and runtime PM\n");
+			return;
+		}
+
 		csr->fw_path = i915_modparams.dmc_firmware_path;
 		/* Bypass version check for firmware override. */
 		csr->required_version = 0;
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

✗ Fi.CI.SPARSE: warning for series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together
URL : https://patchwork.freedesktop.org/series/49269/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/csr: keep firmware name and required version together
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3688:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3689:16: warning: expression using sizeof(void)

Commit: drm/i915/csr: keep max firmware size together with firmare name and version -drivers/gpu/drm/i915/selftests/../i915_drv.h:3689:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3690:16: warning: expression using sizeof(void)

Commit: drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" Okay!

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✗ Fi.CI.BAT: failure for series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together
URL : https://patchwork.freedesktop.org/series/49269/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4782 -> Patchwork_10109 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_10109 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10109, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49269/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10109:

=== IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_hangcheck:
      fi-icl-u:           PASS -> INCOMPLETE

== Known issues ==

Here are the changes found in Patchwork_10109 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@read-crc-pipe-a:
      fi-ilk-650:         PASS -> DMESG-WARN (fdo#106387) +2

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@amdgpu/amd_cs_nop@sync-fork-gfx0:
      fi-kbl-8809g:       DMESG-WARN (fdo#107762) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-kbl-7560u:       FAIL (fdo#107336) -> PASS

    
    ==== Warnings ====

    igt@amdgpu/amd_prime@amd-to-i915:
      fi-kbl-8809g:       DMESG-FAIL (fdo#107762) -> FAIL (fdo#107341)

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106387 https://bugs.freedesktop.org/show_bug.cgi?id=106387
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
fdo#107762 https://bugs.freedesktop.org/show_bug.cgi?id=107762

== Participating hosts (52 -> 49) ==

Additional (2): fi-byt-j1900 fi-gdg-551
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4782 -> Patchwork_10109

CI_DRM_4782: 60edf94611d2374821fbe2a824cebcb425ce7b0d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4632: 94b4e204473a7d9f49e536c8877a4a5636e0d1b2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10109: 2507eb176574e43548bfe6a046126b80cc1f0046 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2507eb176574 drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" 227e00472dc5 drm/i915/csr: keep max firmware size together with firmare name and version 7d5b2b0a80f1 drm/i915/csr: keep firmware name and required version together

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10109/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together
URL : https://patchwork.freedesktop.org/series/49269/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4786 -> Patchwork_10126 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49269/revisions/1/mbox/

== Known issues ==

Here are the changes found in Patchwork_10126 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-kbl-r:           FAIL (fdo#107336) -> PASS

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718

== Participating hosts (54 -> 48) ==

Missing (6): fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-ctg-p8600

== Build changes ==

* Linux: CI_DRM_4786 -> Patchwork_10126

CI_DRM_4786: d28dcb05a3c33df6fcb0828d81fa0bb6591a97be @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4634: 7d89cc39dde3b4881d85ace45d504cc098fa3684 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10126: 8ad14e2e5b1fdea88dfc32e1825314d767aebf58 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

8ad14e2e5b1f drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" dfaef5add127 drm/i915/csr: keep max firmware size together with firmare name and version e5309b975cf4 drm/i915/csr: keep firmware name and required version together

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10126/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/csr: keep firmware name and required version together
URL : https://patchwork.freedesktop.org/series/49269/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4786_full -> Patchwork_10126_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_10126_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10126_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10126_full:

=== IGT changes ===

    ==== Warnings ====

    igt@kms_cursor_legacy@cursora-vs-flipb-toggle:
      shard-hsw:          SKIP -> PASS

== Known issues ==

Here are the changes found in Patchwork_10126_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_workarounds@suspend-resume-context:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
      shard-snb:          PASS -> DMESG-WARN (fdo#102365)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
      shard-apl:          FAIL (fdo#103167) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4786 -> Patchwork_10126

CI_DRM_4786: d28dcb05a3c33df6fcb0828d81fa0bb6591a97be @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4634: 7d89cc39dde3b4881d85ace45d504cc098fa3684 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10126: 8ad14e2e5b1fdea88dfc32e1825314d767aebf58 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10126/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx