Skip to contentSkip to conversation

drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

PATCH In review Hans de Goede 3 participants 5 messages Nov 2, 2018 – Nov 29, 2018

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

PATCH 1/1 drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

The GOP sometimes initializes the DSI pclk at a (slightly) different freq then the pclk which we pick. intel_pipe_config_compare() allows for this by doing a fuzzy compare on the port_clock.

But the pclk difference not only results in the port_clock and base.adjusted_mode.crtc_clock clocks being a bit different, but also in us picking different dsi_pll register values matching the different pclk.

This commit makes us only do the dsi_pll register compare when the adjust parameter is false, so only from verify_crtc_state(), so that we correctly do a fast modeset at boot avoiding the screen going black for about 1 sec.

---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
index b219d5858160..82fa85df0fba 100644
@@ -11759,8 +11759,10 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
 	PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_bias);
 	PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_tdc_coldst_bias);
 
-	PIPE_CONF_CHECK_X(dsi_pll.ctrl);
-	PIPE_CONF_CHECK_X(dsi_pll.div);
+	if (!adjust) {
+		PIPE_CONF_CHECK_X(dsi_pll.ctrl);
+		PIPE_CONF_CHECK_X(dsi_pll.div);
+	}
 
 	if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5)
 		PIPE_CONF_CHECK_I(pipe_bpp);
Signature · 6 lines
2.19.0

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

✗ Fi.CI.CHECKPATCH: warning for drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

== Series Details ==

== Series Details ==

Series: drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting
URL : https://patchwork.freedesktop.org/series/51934/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
274e7b7c3fd1 drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting
-:37: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Hans de Goede <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 12 lines checked

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

#2 lore raw

✓ Fi.CI.BAT: success for drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting
URL : https://patchwork.freedesktop.org/series/51934/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5078 -> Patchwork_10707 =

== Summary - WARNING ==

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

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

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@drv_selftest@live_guc:
      fi-skl-iommu:       SKIP -> PASS +1

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

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

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

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

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-icl-u:           PASS -> INCOMPLETE (fdo#107713)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-skl-iommu:       INCOMPLETE (fdo#108602) -> PASS

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

    igt@kms_flip@basic-flip-vs-modeset:
      fi-skl-6700hq:      DMESG-WARN (fdo#105998) -> PASS +1

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-WARN (fdo#102614) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107713 https://bugs.freedesktop.org/show_bug.cgi?id=107713
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108602 https://bugs.freedesktop.org/show_bug.cgi?id=108602

== Participating hosts (44 -> 42) ==

Additional (1): fi-pnv-d510
Missing (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan

== Build changes ==

* Linux: CI_DRM_5078 -> Patchwork_10707

CI_DRM_5078: 3309ab4d8894496bb432017ee7cc765edb48a5f3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4704: ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10707: 274e7b7c3fd167132debdcc66f6e6bd5b844d54a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

274e7b7c3fd1 drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

== Logs ==

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

#3 lore raw

✓ Fi.CI.IGT: success for drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: drm/i915: intel_pipe_config_compare: Don't compare DSI PLL regs when adjusting
URL : https://patchwork.freedesktop.org/series/51934/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5078_full -> Patchwork_10707_full =

== Summary - WARNING ==

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10707_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_10707_full:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          SKIP -> PASS

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-skl:          PASS -> INCOMPLETE (fdo#106886)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_cursor_crc@cursor-128x128-sliding:
      shard-apl:          PASS -> FAIL (fdo#103232)

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-apl:          PASS -> FAIL (fdo#103191, fdo#103232)

    igt@kms_cursor_crc@cursor-128x42-sliding:
      shard-skl:          NOTRUN -> FAIL (fdo#103232)

    igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
      shard-glk:          PASS -> DMESG-WARN (fdo#105763, fdo#106538)

    igt@kms_fbcon_fbt@psr-suspend:
      shard-skl:          NOTRUN -> FAIL (fdo#107882)

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#105363)

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

    igt@kms_flip@flip-vs-expired-vblank:
      shard-skl:          NOTRUN -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
      shard-glk:          PASS -> FAIL (fdo#103167) +4

    igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-skl:          NOTRUN -> FAIL (fdo#103167) +1

    igt@kms_panel_fitting@legacy:
      shard-skl:          NOTRUN -> FAIL (fdo#105456)

    igt@kms_plane@plane-position-covered-pipe-c-planes:
      shard-apl:          PASS -> FAIL (fdo#103166) +2

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-skl:          NOTRUN -> FAIL (fdo#108145) +1

    igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
      shard-kbl:          NOTRUN -> FAIL (fdo#108145)

    igt@kms_sysfs_edid_timing:
      shard-skl:          NOTRUN -> FAIL (fdo#100047)

    igt@perf@blocking:
      shard-hsw:          PASS -> FAIL (fdo#102252)

    igt@pm_rpm@gem-execbuf-stress:
      shard-skl:          NOTRUN -> INCOMPLETE (fdo#107807, fdo#107803)

    igt@pm_rpm@modeset-non-lpsp-stress:
      shard-skl:          SKIP -> INCOMPLETE (fdo#107807)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106886) -> PASS

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-glk:          FAIL (fdo#103232) -> PASS +5

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          FAIL (fdo#103232) -> PASS +2

    igt@kms_draw_crc@draw-method-xrgb8888-render-untiled:
      shard-skl:          FAIL (fdo#103184) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-skl:          FAIL (fdo#105363) -> PASS

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

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-glk:          FAIL (fdo#108145) -> PASS

    igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
      shard-skl:          FAIL (fdo#107815) -> PASS

    igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
      shard-glk:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
      shard-apl:          FAIL (fdo#103166) -> PASS

    igt@kms_vblank@pipe-a-ts-continuation-suspend:
      shard-skl:          INCOMPLETE (fdo#107773, fdo#104108) -> PASS

    igt@pm_rpm@legacy-planes-dpms:
      shard-skl:          INCOMPLETE (fdo#107807, fdo#105959) -> PASS

    igt@pm_rpm@system-suspend-devices:
      shard-skl:          INCOMPLETE (fdo#107807) -> PASS

    
    ==== Warnings ====

    igt@syncobj_wait@invalid-multi-wait-all-unsubmitted-submitted:
      shard-snb:          DMESG-WARN (fdo#107469) -> INCOMPLETE (fdo#105411)

fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105456 https://bugs.freedesktop.org/show_bug.cgi?id=105456
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#105959 https://bugs.freedesktop.org/show_bug.cgi?id=105959
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107469 https://bugs.freedesktop.org/show_bug.cgi?id=107469
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107803 https://bugs.freedesktop.org/show_bug.cgi?id=107803
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
fdo#107882 https://bugs.freedesktop.org/show_bug.cgi?id=107882
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145

== Participating hosts (6 -> 6) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_5078 -> Patchwork_10707

CI_DRM_5078: 3309ab4d8894496bb432017ee7cc765edb48a5f3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4704: ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10707: 274e7b7c3fd167132debdcc66f6e6bd5b844d54a @ 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_10707/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Hans de Goede

Hi all,

Quoted 8 lines · Hans de Goede

The GOP sometimes initializes the DSI pclk at a (slightly) different freq then the pclk which we pick. intel_pipe_config_compare() allows for this by doing a fuzzy compare on the port_clock.

But the pclk difference not only results in the port_clock and base.adjusted_mode.crtc_clock clocks being a bit different, but also in us picking different dsi_pll register values matching the different pclk.

Quoted 5 lines

This commit makes us only do the dsi_pll register compare when the adjust parameter is false, so only from verify_crtc_state(), so that we correctly do a fast modeset at boot avoiding the screen going black for about 1 sec.

Self-nack to this patch. This avoids the modeset on boot when booting with fastboot=1 but then on the first commit afterwards we get errors like these:

[    6.330864] [drm:pipe_config_err [i915]] *ERROR* mismatch in dsi_pll.ctrl (expected 0x80040100, found 0x80080100)
[    6.330967] [drm:pipe_config_err [i915]] *ERROR* mismatch in dsi_pll.div (expected 0x000001aa, found 0x0000011a)

Followed by a backtrace caused by the I915_STATE_WARN at the end of verify_crtc_state triggering.

So I will brush of my previous patch to fix this, which reads the pclk picked by the GOP back and uses overrides the VBT one with that if it is close.

I believe I've a solution for not doing hw readback in intel_dsi_vbt.c, which was the largest objection last time I posted that series.

Regards,

Hans

Quoted 12 lines
---
  drivers/gpu/drm/i915/intel_display.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index b219d5858160..82fa85df0fba 100644
@@ -11759,8 +11759,10 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
  	PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_bias);
  	PIPE_CONF_CHECK_X(dpll_hw_state.mg_pll_tdc_coldst_bias);

drivers/gpu/drm/i915/intel_display.c intel_pipe_config_compare(struct drm_i915_private *dev_priv, · line 11768

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4 -2
 
-	PIPE_CONF_CHECK_X(dsi_pll.ctrl);
-	PIPE_CONF_CHECK_X(dsi_pll.div);
+	if (!adjust) {
+		PIPE_CONF_CHECK_X(dsi_pll.ctrl);
+		PIPE_CONF_CHECK_X(dsi_pll.div);
+	}
 
  	if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5)
  		PIPE_CONF_CHECK_I(pipe_bpp);

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