Skip to contentSkip to conversation

drm/i915/icl: fix icl_unmap/map_plls_to_ports

PATCH In review Lucas De Marchi 3 participants 4 messages May 25, 2018 – Jun 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/icl: fix icl_unmap/map_plls_to_ports

From: Mahesh Kumar <[email protected]>

All connectors may not have best_encoder attached, so don't dereference encoder pointer for each connector.

Fixes c27e917e2bda (drm/i915/icl: add basic support for the ICL clocks)
---
 drivers/gpu/drm/i915/intel_ddi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +4 -2
index 3b8f12883ca7..c33b19705e39 100644
@@ -2444,12 +2444,13 @@ void icl_map_plls_to_ports(struct drm_crtc *crtc,
 	for_each_new_connector_in_state(old_state, conn, conn_state, i) {
 		struct intel_encoder *encoder =
 			to_intel_encoder(conn_state->best_encoder);
-		enum port port = encoder->port;
+		enum port port;
 		uint32_t val;
 
 		if (conn_state->crtc != crtc)
 			continue;
 
+		port = encoder->port;
 		mutex_lock(&dev_priv->dpll_lock);
 
 		val = I915_READ(DPCLKA_CFGCR0_ICL);
@@ -2481,11 +2482,12 @@ void icl_unmap_plls_to_ports(struct drm_crtc *crtc,
 	for_each_old_connector_in_state(old_state, conn, old_conn_state, i) {
 		struct intel_encoder *encoder =
 			to_intel_encoder(old_conn_state->best_encoder);
-		enum port port = encoder->port;
+		enum port port;
 
 		if (old_conn_state->crtc != crtc)
 			continue;
 
+		port = encoder->port;
 		mutex_lock(&dev_priv->dpll_lock);
 		I915_WRITE(DPCLKA_CFGCR0_ICL,
 			   I915_READ(DPCLKA_CFGCR0_ICL) |
Signature · 6 lines
2.17.0

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

✓ Fi.CI.BAT: success for drm/i915/icl: fix icl_unmap/map_plls_to_ports (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915/icl: fix icl_unmap/map_plls_to_ports (rev2)
URL : https://patchwork.freedesktop.org/series/43510/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4242 -> Patchwork_9123 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/43510/revisions/2/mbox/

== Changes ==

No changes found

== Participating hosts (43 -> 39) ==

Additional (1): fi-cnl-y3
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4242 -> Patchwork_9123

CI_DRM_4242: 0364c498cd9a9e584a7080ee8526e9d17a7d4c67 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4499: f560ae5a464331f03f0a669ed46b8c9e56526187 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9123: 5ea233f0d8ba58cee34c41e139aec7839a6f02e3 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

5ea233f0d8ba drm/i915/icl: fix icl_unmap/map_plls_to_ports

== Logs ==

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

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915/icl: fix icl_unmap/map_plls_to_ports (rev2)

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: drm/i915/icl: fix icl_unmap/map_plls_to_ports (rev2)
URL : https://patchwork.freedesktop.org/series/43510/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4242_full -> Patchwork_9123_full =

== Summary - WARNING ==

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9123_full, 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/43510/revisions/2/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-blt:
      shard-kbl:          PASS -> SKIP

    igt@gem_exec_schedule@deep-bsd1:
      shard-kbl:          SKIP -> PASS

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-glk:          PASS -> INCOMPLETE (fdo#103359, k.org#198133)

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
      shard-glk:          PASS -> FAIL (fdo#105703)

    igt@kms_atomic_transition@plane-all-modeset-transition:
      shard-hsw:          PASS -> DMESG-WARN (fdo#102614)

    igt@kms_flip@2x-modeset-vs-vblank-race:
      shard-glk:          PASS -> FAIL (fdo#103060)

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368) +2

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103167)

    
    ==== Possible fixes ====

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_flip@2x-plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#100368) -> PASS

    igt@kms_flip_tiling@flip-to-y-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-pgflip-blt:
      shard-glk:          FAIL (fdo#104724, fdo#103167) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

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

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4242 -> Patchwork_9123

CI_DRM_4242: 0364c498cd9a9e584a7080ee8526e9d17a7d4c67 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4499: f560ae5a464331f03f0a669ed46b8c9e56526187 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9123: 5ea233f0d8ba58cee34c41e139aec7839a6f02e3 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

#3 lore raw
In reply to Lucas De Marchi

Em Sex, 2018-05-25 às 08:52 -0700, Lucas De Marchi escreveu:

Quoted 10 lines

From: Mahesh Kumar <[email protected]>

All connectors may not have best_encoder attached, so don't dereference
encoder pointer for each connector.

Fixes c27e917e2bda (drm/i915/icl: add basic support for the ICL

clocks)

Merged. Thanks for the patch & review.

Quoted 40 lines
---
 drivers/gpu/drm/i915/intel_ddi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +2 -1
index 3b8f12883ca7..c33b19705e39 100644
@@ -2444,12 +2444,13 @@ void icl_map_plls_to_ports(struct drm_crtc
 *crtc,
 	for_each_new_connector_in_state(old_state, conn, conn_state,
 i) {
 		struct intel_encoder *encoder =
 			to_intel_encoder(conn_state->best_encoder);
-		enum port port = encoder->port;
+		enum port port;
 		uint32_t val;
 
 		if (conn_state->crtc != crtc)
 			continue;
 
+		port = encoder->port;
 		mutex_lock(&dev_priv->dpll_lock);
drivers/gpu/drm/i915/intel_ddi.c +2 -1
 		val = I915_READ(DPCLKA_CFGCR0_ICL);
@@ -2481,11 +2482,12 @@ void icl_unmap_plls_to_ports(struct drm_crtc
 *crtc,
 	for_each_old_connector_in_state(old_state, conn,
 old_conn_state, i) {
 		struct intel_encoder *encoder =
 			to_intel_encoder(old_conn_state-
 >best_encoder);
-		enum port port = encoder->port;
+		enum port port;
 
 		if (old_conn_state->crtc != crtc)
 			continue;
 
+		port = encoder->port;

drivers/gpu/drm/i915/intel_ddi.c void icl_unmap_plls_to_ports(struct drm_crtc *crtc, · line 2493

Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +0 -0
 		mutex_lock(&dev_priv->dpll_lock);
 		I915_WRITE(DPCLKA_CFGCR0_ICL,
 			   I915_READ(DPCLKA_CFGCR0_ICL) |

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