* [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
@ 2019-01-09 12:09 ` Ville Syrjala
0 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjala @ 2019-01-09 12:09 UTC (permalink / raw)
To: intel-gfx; +Cc: stable, Daniel Kamil Kozar
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
which misprograms the hardware badly when encountering a suitably
high resolution display. The programmed pipe timings are somewhat
bonkers and the DPLL is totally misprogrammed (P divider == 0).
That will result in atomic commit timeouts as apparently the pipe
is sufficiently stuck to not signal vblank interrupts.
IIRC something like this was also observed on some other SNB
machine years ago (might have been a Dell XPS 8300) but a BIOS
update cured it. Sadly looks like this was never fixed for the
ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
broken.
The quickest way to deal with this seems to be to shut down
the pipe+ports+DPLL. Unfortunately doing this during the
normal sanitization phase isn't quite soon enough as we
already spew several WARNs about the bogus hardware state.
But it's better than hanging the boot for a few dozen seconds.
Since this is limited to a few old machines it doesn't seem
entirely worthwile to try and rework the readout+sanitization
code to handle it more gracefully.
Cc: stable@vger.kernel.org # v4.20+
Cc: Daniel Kamil Kozar <dkk089@gmail.com>
Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++++++++++----
1 file changed, 45 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 696e6f5680df..ea2e09d36b4d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15435,16 +15435,46 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
}
}
+static bool has_bogus_dpll_config(struct intel_crtc_state *crtc_state)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
+
+ /*
+ * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
+ * the hardware when a high res displays plugged in. DPLL P
+ * divider is zero, and the pipe timings are bonkers. We'll
+ * try to disable everything in that case.
+ *
+ * FIXME would be nice to be able to sanitize this state
+ * without several WARNs, but for now let's take the easy
+ * road.
+ */
+ return IS_GEN(dev_priv, 6) &&
+ crtc_state &&
+ crtc_state->base.active &&
+ crtc_state->shared_dpll &&
+ crtc_state->port_clock == 0;
+}
+
static void intel_sanitize_encoder(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_connector *connector;
+ struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
+ struct intel_crtc_state *crtc_state = crtc ?
+ to_intel_crtc_state(crtc->base.state) : NULL;
/* We need to check both for a crtc link (meaning that the
* encoder is active and trying to read from a pipe) and the
* pipe itself being active. */
- bool has_active_crtc = encoder->base.crtc &&
- to_intel_crtc(encoder->base.crtc)->active;
+ bool has_active_crtc = crtc_state &&
+ crtc_state->base.active;
+
+ if (has_bogus_dpll_config(crtc_state)) {
+ DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
+ pipe_name(crtc->pipe));
+ has_active_crtc = false;
+ }
connector = intel_encoder_find_connector(encoder);
if (connector && !has_active_crtc) {
@@ -15455,16 +15485,25 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
/* Connector is active, but has no active pipe. This is
* fallout from our resume register restoring. Disable
* the encoder manually again. */
- if (encoder->base.crtc) {
- struct drm_crtc_state *crtc_state = encoder->base.crtc->state;
+ if (crtc_state) {
+ struct drm_encoder *best_encoder;
DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
encoder->base.base.id,
encoder->base.name);
+
+ /* avoid oopsing in case the hooks consult best_encoder */
+ best_encoder = connector->base.state->best_encoder;
+ connector->base.state->best_encoder = &encoder->base;
+
if (encoder->disable)
- encoder->disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->disable(encoder, crtc_state,
+ connector->base.state);
if (encoder->post_disable)
- encoder->post_disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->post_disable(encoder, crtc_state,
+ connector->base.state);
+
+ connector->base.state->best_encoder = best_encoder;
}
encoder->base.crtc = NULL;
--
2.19.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
@ 2019-01-09 12:09 ` Ville Syrjala
0 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjala @ 2019-01-09 12:09 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Kamil Kozar, stable
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
which misprograms the hardware badly when encountering a suitably
high resolution display. The programmed pipe timings are somewhat
bonkers and the DPLL is totally misprogrammed (P divider == 0).
That will result in atomic commit timeouts as apparently the pipe
is sufficiently stuck to not signal vblank interrupts.
IIRC something like this was also observed on some other SNB
machine years ago (might have been a Dell XPS 8300) but a BIOS
update cured it. Sadly looks like this was never fixed for the
ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
broken.
The quickest way to deal with this seems to be to shut down
the pipe+ports+DPLL. Unfortunately doing this during the
normal sanitization phase isn't quite soon enough as we
already spew several WARNs about the bogus hardware state.
But it's better than hanging the boot for a few dozen seconds.
Since this is limited to a few old machines it doesn't seem
entirely worthwile to try and rework the readout+sanitization
code to handle it more gracefully.
Cc: stable@vger.kernel.org # v4.20+
Cc: Daniel Kamil Kozar <dkk089@gmail.com>
Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++++++++++----
1 file changed, 45 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 696e6f5680df..ea2e09d36b4d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15435,16 +15435,46 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
}
}
+static bool has_bogus_dpll_config(struct intel_crtc_state *crtc_state)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
+
+ /*
+ * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
+ * the hardware when a high res displays plugged in. DPLL P
+ * divider is zero, and the pipe timings are bonkers. We'll
+ * try to disable everything in that case.
+ *
+ * FIXME would be nice to be able to sanitize this state
+ * without several WARNs, but for now let's take the easy
+ * road.
+ */
+ return IS_GEN(dev_priv, 6) &&
+ crtc_state &&
+ crtc_state->base.active &&
+ crtc_state->shared_dpll &&
+ crtc_state->port_clock == 0;
+}
+
static void intel_sanitize_encoder(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_connector *connector;
+ struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
+ struct intel_crtc_state *crtc_state = crtc ?
+ to_intel_crtc_state(crtc->base.state) : NULL;
/* We need to check both for a crtc link (meaning that the
* encoder is active and trying to read from a pipe) and the
* pipe itself being active. */
- bool has_active_crtc = encoder->base.crtc &&
- to_intel_crtc(encoder->base.crtc)->active;
+ bool has_active_crtc = crtc_state &&
+ crtc_state->base.active;
+
+ if (has_bogus_dpll_config(crtc_state)) {
+ DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
+ pipe_name(crtc->pipe));
+ has_active_crtc = false;
+ }
connector = intel_encoder_find_connector(encoder);
if (connector && !has_active_crtc) {
@@ -15455,16 +15485,25 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
/* Connector is active, but has no active pipe. This is
* fallout from our resume register restoring. Disable
* the encoder manually again. */
- if (encoder->base.crtc) {
- struct drm_crtc_state *crtc_state = encoder->base.crtc->state;
+ if (crtc_state) {
+ struct drm_encoder *best_encoder;
DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
encoder->base.base.id,
encoder->base.name);
+
+ /* avoid oopsing in case the hooks consult best_encoder */
+ best_encoder = connector->base.state->best_encoder;
+ connector->base.state->best_encoder = &encoder->base;
+
if (encoder->disable)
- encoder->disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->disable(encoder, crtc_state,
+ connector->base.state);
if (encoder->post_disable)
- encoder->post_disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->post_disable(encoder, crtc_state,
+ connector->base.state);
+
+ connector->base.state->best_encoder = best_encoder;
}
encoder->base.crtc = NULL;
--
2.19.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-09 12:09 ` Ville Syrjala
(?)
@ 2019-01-09 13:52 ` Patchwork
-1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-01-09 13:52 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
URL : https://patchwork.freedesktop.org/series/54942/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5383 -> Patchwork_11262
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with Patchwork_11262 need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_11262, 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/54942/revisions/1/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_11262:
### IGT changes ###
#### Warnings ####
* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: SKIP -> PASS +2
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
- fi-kbl-7567u: PASS -> SKIP +27
Known issues
------------
Here are the changes found in Patchwork_11262 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: PASS -> DMESG-FAIL [fdo#105079]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#107362]
* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +2
#### Possible fixes ####
* igt@debugfs_test@read_all_entries:
- fi-kbl-7567u: DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS
* igt@gem_exec_suspend@basic-s3:
- fi-kbl-7567u: DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602] -> PASS
* igt@kms_chamelium@hdmi-edid-read:
- fi-kbl-7567u: FAIL [fdo#108767] -> PASS +2
* igt@kms_flip@basic-flip-vs-modeset:
- fi-skl-6700hq: DMESG-WARN [fdo#105998] -> PASS
* igt@kms_flip@basic-flip-vs-wf_vblank:
- fi-bsw-n3050: FAIL [fdo#100368] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-kbl-7567u: DMESG-FAIL [fdo#105079] -> SKIP
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
Participating hosts (48 -> 42)
------------------------------
Additional (1): fi-pnv-d510
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u3
Build changes
-------------
* Linux: CI_DRM_5383 -> Patchwork_11262
CI_DRM_5383: f0835c765f5520b13d032a1904a2f90a44297b3b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4757: 738f43a54d626f08e250c926a5aeec53458fbd3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11262: 977d8938ef909aec415512a6ac0ee5899ee45276 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
977d8938ef90 drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11262/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-09 12:09 ` Ville Syrjala
(?)
(?)
@ 2019-01-09 16:08 ` Patchwork
-1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-01-09 16:08 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
URL : https://patchwork.freedesktop.org/series/54942/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5383_full -> Patchwork_11262_full
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with Patchwork_11262_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_11262_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_11262_full:
### IGT changes ###
#### Warnings ####
* igt@perf_pmu@rc6:
- shard-kbl: SKIP -> PASS
* igt@pm_rpm@gem-mmap-gtt:
- shard-apl: PASS -> SKIP
Known issues
------------
Here are the changes found in Patchwork_11262_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_atomic_transition@plane-all-transition-fencing:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] / [fdo#109225]
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#107956] +1
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-snb: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-hsw: NOTRUN -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
- shard-iclb: NOTRUN -> DMESG-WARN [fdo#107956] +1
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-glk: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-snb: PASS -> FAIL [fdo#103375]
* igt@kms_cursor_crc@cursor-128x42-onscreen:
- shard-iclb: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-glk: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
- shard-iclb: PASS -> FAIL [fdo#103355]
* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled:
- shard-iclb: PASS -> WARN [fdo#108336] +1
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-iclb: PASS -> DMESG-FAIL [fdo#105681] / [fdo#107724]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: PASS -> FAIL [fdo#105363]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-apl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-2p-rte:
- shard-glk: PASS -> FAIL [fdo#103167] / [fdo#105682]
* igt@kms_frontbuffer_tracking@fbc-modesetfrombusy:
- shard-iclb: PASS -> DMESG-FAIL [fdo#107724] +1
* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-skl: NOTRUN -> FAIL [fdo#105683]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] / [fdo#108336] +11
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
- shard-iclb: PASS -> FAIL [fdo#103167]
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-apl: PASS -> FAIL [fdo#108948]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-skl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-glk: PASS -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +2
- shard-apl: PASS -> FAIL [fdo#103166] +1
- shard-iclb: PASS -> FAIL [fdo#103166]
* igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
- shard-iclb: NOTRUN -> DMESG-WARN [fdo#107724]
* igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
- shard-apl: PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +5
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]
* igt@kms_vblank@pipe-c-wait-forked:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] +20
* igt@pm_rpm@dpms-mode-unset-non-lpsp:
- shard-skl: SKIP -> INCOMPLETE [fdo#107807]
* igt@pm_rpm@legacy-planes:
- shard-iclb: NOTRUN -> DMESG-WARN [fdo#108654]
* igt@pm_rpm@universal-planes:
- shard-iclb: PASS -> INCOMPLETE [fdo#108840]
#### Possible fixes ####
* igt@kms_atomic_transition@1x-modeset-transitions-fencing:
- shard-skl: FAIL [fdo#107815] / [fdo#108470] -> PASS
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-iclb: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_color@pipe-b-ctm-negative:
- shard-skl: FAIL [fdo#107361] -> PASS
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-glk: FAIL [fdo#103232] -> PASS +1
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw: FAIL [fdo#105767] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-ytiled:
- shard-iclb: WARN [fdo#108336] -> PASS +2
* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-ytiled:
- shard-skl: FAIL [fdo#108222] -> PASS
* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: FAIL [fdo#102887] / [fdo#105363] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
- shard-apl: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt:
- shard-skl: FAIL [fdo#105682] -> PASS
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-iclb: INCOMPLETE [fdo#107713] -> PASS +1
* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-hsw: INCOMPLETE [fdo#103540] -> SKIP
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-iclb: DMESG-FAIL [fdo#107724] -> PASS +1
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-fullscreen:
- shard-iclb: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbcpsr-farfromfence:
- shard-skl: FAIL [fdo#103167] -> PASS +2
* igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
- shard-iclb: FAIL [fdo#105683] / [fdo#108040] -> PASS
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> PASS +4
* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- shard-skl: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-apl: FAIL [fdo#108145] -> PASS
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: FAIL [fdo#107815] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-iclb: FAIL [fdo#103166] -> PASS +2
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: FAIL [fdo#103166] -> PASS +1
* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- shard-skl: INCOMPLETE [fdo#104108] -> PASS
* igt@kms_vblank@pipe-c-wait-forked-busy:
- shard-iclb: DMESG-WARN [fdo#107724] -> PASS +6
* igt@pm_rpm@gem-execbuf-stress:
- shard-skl: INCOMPLETE [fdo#107803] / [fdo#107807] -> PASS
* igt@pm_rpm@reg-read-ioctl:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS
* igt@pm_rpm@system-suspend-execbuf:
- shard-iclb: INCOMPLETE [fdo#107713] / [fdo#108840] -> PASS
#### Warnings ####
* igt@i915_suspend@shrink:
- shard-apl: DMESG-WARN [fdo#107886] / [fdo#109244] -> INCOMPLETE [fdo#103927] / [fdo#106886]
* igt@kms_ccs@pipe-a-crc-primary-rotation-180:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#107725]
* igt@kms_ccs@pipe-b-crc-primary-basic:
- shard-iclb: FAIL [fdo#107725] -> DMESG-WARN [fdo#107724] / [fdo#108336]
* igt@kms_cursor_crc@cursor-128x42-sliding:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-64x64-random:
- shard-iclb: FAIL [fdo#103232] -> DMESG-WARN [fdo#107724] / [fdo#108336] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> DMESG-FAIL [fdo#107724] +2
* igt@kms_plane_multiple@atomic-pipe-a-tiling-none:
- shard-apl: FAIL [fdo#103166] -> DMESG-FAIL [fdo#103166] / [fdo#103558] / [fdo#105602]
* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-iclb: FAIL [fdo#103166] -> DMESG-WARN [fdo#107724] / [fdo#108336] +1
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: DMESG-WARN [fdo#105604] -> DMESG-FAIL [fdo#108950]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105604]: https://bugs.freedesktop.org/show_bug.cgi?id=105604
[fdo#105681]: https://bugs.freedesktop.org/show_bug.cgi?id=105681
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107361]: https://bugs.freedesktop.org/show_bug.cgi?id=107361
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[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#107886]: https://bugs.freedesktop.org/show_bug.cgi?id=107886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108222]: https://bugs.freedesktop.org/show_bug.cgi?id=108222
[fdo#108336]: https://bugs.freedesktop.org/show_bug.cgi?id=108336
[fdo#108470]: https://bugs.freedesktop.org/show_bug.cgi?id=108470
[fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
[fdo#108756]: https://bugs.freedesktop.org/show_bug.cgi?id=108756
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
[fdo#109225]: https://bugs.freedesktop.org/show_bug.cgi?id=109225
[fdo#109241]: https://bugs.freedesktop.org/show_bug.cgi?id=109241
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
Participating hosts (7 -> 7)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_5383 -> Patchwork_11262
CI_DRM_5383: f0835c765f5520b13d032a1904a2f90a44297b3b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4757: 738f43a54d626f08e250c926a5aeec53458fbd3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11262: 977d8938ef909aec415512a6ac0ee5899ee45276 @ 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_11262/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-09 12:09 ` Ville Syrjala
@ 2019-01-10 19:41 ` kbuild test robot
-1 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2019-01-10 19:41 UTC (permalink / raw)
To: kbuild, Ville Syrjala
Cc: Dan Carpenter, kbuild-all, intel-gfx, Daniel Kamil Kozar, stable
Hi Ville,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-i915-Try-to-sanitize-bogus-DPLL-state-left-over-by-broken-SNB-BIOSen/20190109-222838
base: git://anongit.freedesktop.org/drm-intel for-linux-next
New smatch warnings:
drivers/gpu/drm/i915/intel_display.c:15452 has_bogus_dpll_config() warn: variable dereferenced before check 'crtc_state' (see line 15439)
drivers/gpu/drm/i915/intel_display.c:15472 intel_sanitize_encoder() error: we previously assumed 'crtc_state' could be null (see line 15469)
drivers/gpu/drm/i915/intel_display.c:15487 intel_sanitize_encoder() warn: variable dereferenced before check 'crtc_state' (see line 15472)
# https://github.com/0day-ci/linux/commit/5a0056f774727561e522ccde5fe7fe78d343d25f
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 5a0056f774727561e522ccde5fe7fe78d343d25f
vim +/crtc_state +15452 drivers/gpu/drm/i915/intel_display.c
249293524 Daniel Vetter 2012-07-02 15436
5a0056f77 Ville Syrjälä 2019-01-09 15437 static bool has_bogus_dpll_config(struct intel_crtc_state *crtc_state)
5a0056f77 Ville Syrjälä 2019-01-09 15438 {
5a0056f77 Ville Syrjälä 2019-01-09 @15439 struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
5a0056f77 Ville Syrjälä 2019-01-09 15440
5a0056f77 Ville Syrjälä 2019-01-09 15441 /*
5a0056f77 Ville Syrjälä 2019-01-09 15442 * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
5a0056f77 Ville Syrjälä 2019-01-09 15443 * the hardware when a high res displays plugged in. DPLL P
5a0056f77 Ville Syrjälä 2019-01-09 15444 * divider is zero, and the pipe timings are bonkers. We'll
5a0056f77 Ville Syrjälä 2019-01-09 15445 * try to disable everything in that case.
5a0056f77 Ville Syrjälä 2019-01-09 15446 *
5a0056f77 Ville Syrjälä 2019-01-09 15447 * FIXME would be nice to be able to sanitize this state
5a0056f77 Ville Syrjälä 2019-01-09 15448 * without several WARNs, but for now let's take the easy
5a0056f77 Ville Syrjälä 2019-01-09 15449 * road.
5a0056f77 Ville Syrjälä 2019-01-09 15450 */
5a0056f77 Ville Syrjälä 2019-01-09 15451 return IS_GEN(dev_priv, 6) &&
5a0056f77 Ville Syrjälä 2019-01-09 @15452 crtc_state &&
5a0056f77 Ville Syrjälä 2019-01-09 15453 crtc_state->base.active &&
5a0056f77 Ville Syrjälä 2019-01-09 15454 crtc_state->shared_dpll &&
5a0056f77 Ville Syrjälä 2019-01-09 15455 crtc_state->port_clock == 0;
5a0056f77 Ville Syrjälä 2019-01-09 15456 }
5a0056f77 Ville Syrjälä 2019-01-09 15457
249293524 Daniel Vetter 2012-07-02 15458 static void intel_sanitize_encoder(struct intel_encoder *encoder)
249293524 Daniel Vetter 2012-07-02 15459 {
70332ac53 Imre Deak 2018-11-01 15460 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
249293524 Daniel Vetter 2012-07-02 15461 struct intel_connector *connector;
5a0056f77 Ville Syrjälä 2019-01-09 15462 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
5a0056f77 Ville Syrjälä 2019-01-09 15463 struct intel_crtc_state *crtc_state = crtc ?
5a0056f77 Ville Syrjälä 2019-01-09 15464 to_intel_crtc_state(crtc->base.state) : NULL;
249293524 Daniel Vetter 2012-07-02 15465
249293524 Daniel Vetter 2012-07-02 15466 /* We need to check both for a crtc link (meaning that the
249293524 Daniel Vetter 2012-07-02 15467 * encoder is active and trying to read from a pipe) and the
249293524 Daniel Vetter 2012-07-02 15468 * pipe itself being active. */
5a0056f77 Ville Syrjälä 2019-01-09 @15469 bool has_active_crtc = crtc_state &&
5a0056f77 Ville Syrjälä 2019-01-09 15470 crtc_state->base.active;
5a0056f77 Ville Syrjälä 2019-01-09 15471
5a0056f77 Ville Syrjälä 2019-01-09 @15472 if (has_bogus_dpll_config(crtc_state)) {
5a0056f77 Ville Syrjälä 2019-01-09 15473 DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
5a0056f77 Ville Syrjälä 2019-01-09 15474 pipe_name(crtc->pipe));
5a0056f77 Ville Syrjälä 2019-01-09 15475 has_active_crtc = false;
5a0056f77 Ville Syrjälä 2019-01-09 15476 }
249293524 Daniel Vetter 2012-07-02 15477
496b0fc37 Maarten Lankhorst 2016-08-23 15478 connector = intel_encoder_find_connector(encoder);
496b0fc37 Maarten Lankhorst 2016-08-23 15479 if (connector && !has_active_crtc) {
249293524 Daniel Vetter 2012-07-02 15480 DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n",
249293524 Daniel Vetter 2012-07-02 15481 encoder->base.base.id,
8e329a039 Jani Nikula 2014-06-03 15482 encoder->base.name);
249293524 Daniel Vetter 2012-07-02 15483
249293524 Daniel Vetter 2012-07-02 15484 /* Connector is active, but has no active pipe. This is
249293524 Daniel Vetter 2012-07-02 15485 * fallout from our resume register restoring. Disable
249293524 Daniel Vetter 2012-07-02 15486 * the encoder manually again. */
5a0056f77 Ville Syrjälä 2019-01-09 @15487 if (crtc_state) {
5a0056f77 Ville Syrjälä 2019-01-09 15488 struct drm_encoder *best_encoder;
fd6bbda9c Maarten Lankhorst 2016-08-09 15489
249293524 Daniel Vetter 2012-07-02 15490 DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
249293524 Daniel Vetter 2012-07-02 15491 encoder->base.base.id,
8e329a039 Jani Nikula 2014-06-03 15492 encoder->base.name);
5a0056f77 Ville Syrjälä 2019-01-09 15493
5a0056f77 Ville Syrjälä 2019-01-09 15494 /* avoid oopsing in case the hooks consult best_encoder */
5a0056f77 Ville Syrjälä 2019-01-09 15495 best_encoder = connector->base.state->best_encoder;
5a0056f77 Ville Syrjälä 2019-01-09 15496 connector->base.state->best_encoder = &encoder->base;
5a0056f77 Ville Syrjälä 2019-01-09 15497
c84c6fe30 Jani Nikula 2018-10-16 15498 if (encoder->disable)
5a0056f77 Ville Syrjälä 2019-01-09 15499 encoder->disable(encoder, crtc_state,
5a0056f77 Ville Syrjälä 2019-01-09 15500 connector->base.state);
a62d14975 Ville Syrjälä 2014-06-28 15501 if (encoder->post_disable)
5a0056f77 Ville Syrjälä 2019-01-09 15502 encoder->post_disable(encoder, crtc_state,
5a0056f77 Ville Syrjälä 2019-01-09 15503 connector->base.state);
5a0056f77 Ville Syrjälä 2019-01-09 15504
5a0056f77 Ville Syrjälä 2019-01-09 15505 connector->base.state->best_encoder = best_encoder;
249293524 Daniel Vetter 2012-07-02 15506 }
7f1950fbb Egbert Eich 2014-04-25 15507 encoder->base.crtc = NULL;
249293524 Daniel Vetter 2012-07-02 15508
249293524 Daniel Vetter 2012-07-02 15509 /* Inconsistent output/port/pipe state happens presumably due to
249293524 Daniel Vetter 2012-07-02 15510 * a bug in one of the get_hw_state functions. Or someplace else
249293524 Daniel Vetter 2012-07-02 15511 * in our code, like the register restore mess on resume. Clamp
249293524 Daniel Vetter 2012-07-02 15512 * things to off as a safer default. */
fd6bbda9c Maarten Lankhorst 2016-08-09 15513
7f1950fbb Egbert Eich 2014-04-25 15514 connector->base.dpms = DRM_MODE_DPMS_OFF;
7f1950fbb Egbert Eich 2014-04-25 15515 connector->base.encoder = NULL;
249293524 Daniel Vetter 2012-07-02 15516 }
d6cae4aa3 Maarten Lankhorst 2018-05-16 15517
d6cae4aa3 Maarten Lankhorst 2018-05-16 15518 /* notify opregion of the sanitized encoder state */
d6cae4aa3 Maarten Lankhorst 2018-05-16 15519 intel_opregion_notify_encoder(encoder, connector && has_active_crtc);
70332ac53 Imre Deak 2018-11-01 15520
70332ac53 Imre Deak 2018-11-01 15521 if (INTEL_GEN(dev_priv) >= 11)
70332ac53 Imre Deak 2018-11-01 15522 icl_sanitize_encoder_pll_mapping(encoder);
249293524 Daniel Vetter 2012-07-02 15523 }
249293524 Daniel Vetter 2012-07-02 15524
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
@ 2019-01-10 19:41 ` kbuild test robot
0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2019-01-10 19:41 UTC (permalink / raw)
To: kbuild, Ville Syrjala
Cc: stable, intel-gfx, Daniel Kamil Kozar, kbuild-all, Dan Carpenter
Hi Ville,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-i915-Try-to-sanitize-bogus-DPLL-state-left-over-by-broken-SNB-BIOSen/20190109-222838
base: git://anongit.freedesktop.org/drm-intel for-linux-next
New smatch warnings:
drivers/gpu/drm/i915/intel_display.c:15452 has_bogus_dpll_config() warn: variable dereferenced before check 'crtc_state' (see line 15439)
drivers/gpu/drm/i915/intel_display.c:15472 intel_sanitize_encoder() error: we previously assumed 'crtc_state' could be null (see line 15469)
drivers/gpu/drm/i915/intel_display.c:15487 intel_sanitize_encoder() warn: variable dereferenced before check 'crtc_state' (see line 15472)
# https://github.com/0day-ci/linux/commit/5a0056f774727561e522ccde5fe7fe78d343d25f
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 5a0056f774727561e522ccde5fe7fe78d343d25f
vim +/crtc_state +15452 drivers/gpu/drm/i915/intel_display.c
249293524 Daniel Vetter 2012-07-02 15436
5a0056f77 Ville Syrjälä 2019-01-09 15437 static bool has_bogus_dpll_config(struct intel_crtc_state *crtc_state)
5a0056f77 Ville Syrjälä 2019-01-09 15438 {
5a0056f77 Ville Syrjälä 2019-01-09 @15439 struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
5a0056f77 Ville Syrjälä 2019-01-09 15440
5a0056f77 Ville Syrjälä 2019-01-09 15441 /*
5a0056f77 Ville Syrjälä 2019-01-09 15442 * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
5a0056f77 Ville Syrjälä 2019-01-09 15443 * the hardware when a high res displays plugged in. DPLL P
5a0056f77 Ville Syrjälä 2019-01-09 15444 * divider is zero, and the pipe timings are bonkers. We'll
5a0056f77 Ville Syrjälä 2019-01-09 15445 * try to disable everything in that case.
5a0056f77 Ville Syrjälä 2019-01-09 15446 *
5a0056f77 Ville Syrjälä 2019-01-09 15447 * FIXME would be nice to be able to sanitize this state
5a0056f77 Ville Syrjälä 2019-01-09 15448 * without several WARNs, but for now let's take the easy
5a0056f77 Ville Syrjälä 2019-01-09 15449 * road.
5a0056f77 Ville Syrjälä 2019-01-09 15450 */
5a0056f77 Ville Syrjälä 2019-01-09 15451 return IS_GEN(dev_priv, 6) &&
5a0056f77 Ville Syrjälä 2019-01-09 @15452 crtc_state &&
5a0056f77 Ville Syrjälä 2019-01-09 15453 crtc_state->base.active &&
5a0056f77 Ville Syrjälä 2019-01-09 15454 crtc_state->shared_dpll &&
5a0056f77 Ville Syrjälä 2019-01-09 15455 crtc_state->port_clock == 0;
5a0056f77 Ville Syrjälä 2019-01-09 15456 }
5a0056f77 Ville Syrjälä 2019-01-09 15457
249293524 Daniel Vetter 2012-07-02 15458 static void intel_sanitize_encoder(struct intel_encoder *encoder)
249293524 Daniel Vetter 2012-07-02 15459 {
70332ac53 Imre Deak 2018-11-01 15460 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
249293524 Daniel Vetter 2012-07-02 15461 struct intel_connector *connector;
5a0056f77 Ville Syrjälä 2019-01-09 15462 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
5a0056f77 Ville Syrjälä 2019-01-09 15463 struct intel_crtc_state *crtc_state = crtc ?
5a0056f77 Ville Syrjälä 2019-01-09 15464 to_intel_crtc_state(crtc->base.state) : NULL;
249293524 Daniel Vetter 2012-07-02 15465
249293524 Daniel Vetter 2012-07-02 15466 /* We need to check both for a crtc link (meaning that the
249293524 Daniel Vetter 2012-07-02 15467 * encoder is active and trying to read from a pipe) and the
249293524 Daniel Vetter 2012-07-02 15468 * pipe itself being active. */
5a0056f77 Ville Syrjälä 2019-01-09 @15469 bool has_active_crtc = crtc_state &&
5a0056f77 Ville Syrjälä 2019-01-09 15470 crtc_state->base.active;
5a0056f77 Ville Syrjälä 2019-01-09 15471
5a0056f77 Ville Syrjälä 2019-01-09 @15472 if (has_bogus_dpll_config(crtc_state)) {
5a0056f77 Ville Syrjälä 2019-01-09 15473 DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
5a0056f77 Ville Syrjälä 2019-01-09 15474 pipe_name(crtc->pipe));
5a0056f77 Ville Syrjälä 2019-01-09 15475 has_active_crtc = false;
5a0056f77 Ville Syrjälä 2019-01-09 15476 }
249293524 Daniel Vetter 2012-07-02 15477
496b0fc37 Maarten Lankhorst 2016-08-23 15478 connector = intel_encoder_find_connector(encoder);
496b0fc37 Maarten Lankhorst 2016-08-23 15479 if (connector && !has_active_crtc) {
249293524 Daniel Vetter 2012-07-02 15480 DRM_DEBUG_KMS("[ENCODER:%d:%s] has active connectors but no active pipe!\n",
249293524 Daniel Vetter 2012-07-02 15481 encoder->base.base.id,
8e329a039 Jani Nikula 2014-06-03 15482 encoder->base.name);
249293524 Daniel Vetter 2012-07-02 15483
249293524 Daniel Vetter 2012-07-02 15484 /* Connector is active, but has no active pipe. This is
249293524 Daniel Vetter 2012-07-02 15485 * fallout from our resume register restoring. Disable
249293524 Daniel Vetter 2012-07-02 15486 * the encoder manually again. */
5a0056f77 Ville Syrjälä 2019-01-09 @15487 if (crtc_state) {
5a0056f77 Ville Syrjälä 2019-01-09 15488 struct drm_encoder *best_encoder;
fd6bbda9c Maarten Lankhorst 2016-08-09 15489
249293524 Daniel Vetter 2012-07-02 15490 DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
249293524 Daniel Vetter 2012-07-02 15491 encoder->base.base.id,
8e329a039 Jani Nikula 2014-06-03 15492 encoder->base.name);
5a0056f77 Ville Syrjälä 2019-01-09 15493
5a0056f77 Ville Syrjälä 2019-01-09 15494 /* avoid oopsing in case the hooks consult best_encoder */
5a0056f77 Ville Syrjälä 2019-01-09 15495 best_encoder = connector->base.state->best_encoder;
5a0056f77 Ville Syrjälä 2019-01-09 15496 connector->base.state->best_encoder = &encoder->base;
5a0056f77 Ville Syrjälä 2019-01-09 15497
c84c6fe30 Jani Nikula 2018-10-16 15498 if (encoder->disable)
5a0056f77 Ville Syrjälä 2019-01-09 15499 encoder->disable(encoder, crtc_state,
5a0056f77 Ville Syrjälä 2019-01-09 15500 connector->base.state);
a62d14975 Ville Syrjälä 2014-06-28 15501 if (encoder->post_disable)
5a0056f77 Ville Syrjälä 2019-01-09 15502 encoder->post_disable(encoder, crtc_state,
5a0056f77 Ville Syrjälä 2019-01-09 15503 connector->base.state);
5a0056f77 Ville Syrjälä 2019-01-09 15504
5a0056f77 Ville Syrjälä 2019-01-09 15505 connector->base.state->best_encoder = best_encoder;
249293524 Daniel Vetter 2012-07-02 15506 }
7f1950fbb Egbert Eich 2014-04-25 15507 encoder->base.crtc = NULL;
249293524 Daniel Vetter 2012-07-02 15508
249293524 Daniel Vetter 2012-07-02 15509 /* Inconsistent output/port/pipe state happens presumably due to
249293524 Daniel Vetter 2012-07-02 15510 * a bug in one of the get_hw_state functions. Or someplace else
249293524 Daniel Vetter 2012-07-02 15511 * in our code, like the register restore mess on resume. Clamp
249293524 Daniel Vetter 2012-07-02 15512 * things to off as a safer default. */
fd6bbda9c Maarten Lankhorst 2016-08-09 15513
7f1950fbb Egbert Eich 2014-04-25 15514 connector->base.dpms = DRM_MODE_DPMS_OFF;
7f1950fbb Egbert Eich 2014-04-25 15515 connector->base.encoder = NULL;
249293524 Daniel Vetter 2012-07-02 15516 }
d6cae4aa3 Maarten Lankhorst 2018-05-16 15517
d6cae4aa3 Maarten Lankhorst 2018-05-16 15518 /* notify opregion of the sanitized encoder state */
d6cae4aa3 Maarten Lankhorst 2018-05-16 15519 intel_opregion_notify_encoder(encoder, connector && has_active_crtc);
70332ac53 Imre Deak 2018-11-01 15520
70332ac53 Imre Deak 2018-11-01 15521 if (INTEL_GEN(dev_priv) >= 11)
70332ac53 Imre Deak 2018-11-01 15522 icl_sanitize_encoder_pll_mapping(encoder);
249293524 Daniel Vetter 2012-07-02 15523 }
249293524 Daniel Vetter 2012-07-02 15524
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-09 12:09 ` Ville Syrjala
@ 2019-01-11 17:49 ` Ville Syrjala
-1 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjala @ 2019-01-11 17:49 UTC (permalink / raw)
To: intel-gfx; +Cc: stable, Daniel Kamil Kozar
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
which misprograms the hardware badly when encountering a suitably
high resolution display. The programmed pipe timings are somewhat
bonkers and the DPLL is totally misprogrammed (P divider == 0).
That will result in atomic commit timeouts as apparently the pipe
is sufficiently stuck to not signal vblank interrupts.
IIRC something like this was also observed on some other SNB
machine years ago (might have been a Dell XPS 8300) but a BIOS
update cured it. Sadly looks like this was never fixed for the
ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
broken.
The quickest way to deal with this seems to be to shut down
the pipe+ports+DPLL. Unfortunately doing this during the
normal sanitization phase isn't quite soon enough as we
already spew several WARNs about the bogus hardware state.
But it's better than hanging the boot for a few dozen seconds.
Since this is limited to a few old machines it doesn't seem
entirely worthwile to try and rework the readout+sanitization
code to handle it more gracefully.
v2: Fix potential NULL deref (kbuild test robot)
Constify has_bogus_dpll_config()
Cc: stable@vger.kernel.org # v4.20+
Cc: Daniel Kamil Kozar <dkk089@gmail.com>
Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5dc0de89c49e..6cd6048b4731 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15438,16 +15438,45 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
}
}
+static bool has_bogus_dpll_config(const struct intel_crtc_state *crtc_state)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
+
+ /*
+ * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
+ * the hardware when a high res displays plugged in. DPLL P
+ * divider is zero, and the pipe timings are bonkers. We'll
+ * try to disable everything in that case.
+ *
+ * FIXME would be nice to be able to sanitize this state
+ * without several WARNs, but for now let's take the easy
+ * road.
+ */
+ return IS_GEN(dev_priv, 6) &&
+ crtc_state->base.active &&
+ crtc_state->shared_dpll &&
+ crtc_state->port_clock == 0;
+}
+
static void intel_sanitize_encoder(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_connector *connector;
+ struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
+ struct intel_crtc_state *crtc_state = crtc ?
+ to_intel_crtc_state(crtc->base.state) : NULL;
/* We need to check both for a crtc link (meaning that the
* encoder is active and trying to read from a pipe) and the
* pipe itself being active. */
- bool has_active_crtc = encoder->base.crtc &&
- to_intel_crtc(encoder->base.crtc)->active;
+ bool has_active_crtc = crtc_state &&
+ crtc_state->base.active;
+
+ if (crtc_state && has_bogus_dpll_config(crtc_state)) {
+ DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
+ pipe_name(crtc->pipe));
+ has_active_crtc = false;
+ }
connector = intel_encoder_find_connector(encoder);
if (connector && !has_active_crtc) {
@@ -15458,16 +15487,25 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
/* Connector is active, but has no active pipe. This is
* fallout from our resume register restoring. Disable
* the encoder manually again. */
- if (encoder->base.crtc) {
- struct drm_crtc_state *crtc_state = encoder->base.crtc->state;
+ if (crtc_state) {
+ struct drm_encoder *best_encoder;
DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
encoder->base.base.id,
encoder->base.name);
+
+ /* avoid oopsing in case the hooks consult best_encoder */
+ best_encoder = connector->base.state->best_encoder;
+ connector->base.state->best_encoder = &encoder->base;
+
if (encoder->disable)
- encoder->disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->disable(encoder, crtc_state,
+ connector->base.state);
if (encoder->post_disable)
- encoder->post_disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->post_disable(encoder, crtc_state,
+ connector->base.state);
+
+ connector->base.state->best_encoder = best_encoder;
}
encoder->base.crtc = NULL;
--
2.19.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
@ 2019-01-11 17:49 ` Ville Syrjala
0 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjala @ 2019-01-11 17:49 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Kamil Kozar, stable
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
which misprograms the hardware badly when encountering a suitably
high resolution display. The programmed pipe timings are somewhat
bonkers and the DPLL is totally misprogrammed (P divider == 0).
That will result in atomic commit timeouts as apparently the pipe
is sufficiently stuck to not signal vblank interrupts.
IIRC something like this was also observed on some other SNB
machine years ago (might have been a Dell XPS 8300) but a BIOS
update cured it. Sadly looks like this was never fixed for the
ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
broken.
The quickest way to deal with this seems to be to shut down
the pipe+ports+DPLL. Unfortunately doing this during the
normal sanitization phase isn't quite soon enough as we
already spew several WARNs about the bogus hardware state.
But it's better than hanging the boot for a few dozen seconds.
Since this is limited to a few old machines it doesn't seem
entirely worthwile to try and rework the readout+sanitization
code to handle it more gracefully.
v2: Fix potential NULL deref (kbuild test robot)
Constify has_bogus_dpll_config()
Cc: stable@vger.kernel.org # v4.20+
Cc: Daniel Kamil Kozar <dkk089@gmail.com>
Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup with external display")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5dc0de89c49e..6cd6048b4731 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15438,16 +15438,45 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
}
}
+static bool has_bogus_dpll_config(const struct intel_crtc_state *crtc_state)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev);
+
+ /*
+ * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
+ * the hardware when a high res displays plugged in. DPLL P
+ * divider is zero, and the pipe timings are bonkers. We'll
+ * try to disable everything in that case.
+ *
+ * FIXME would be nice to be able to sanitize this state
+ * without several WARNs, but for now let's take the easy
+ * road.
+ */
+ return IS_GEN(dev_priv, 6) &&
+ crtc_state->base.active &&
+ crtc_state->shared_dpll &&
+ crtc_state->port_clock == 0;
+}
+
static void intel_sanitize_encoder(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_connector *connector;
+ struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
+ struct intel_crtc_state *crtc_state = crtc ?
+ to_intel_crtc_state(crtc->base.state) : NULL;
/* We need to check both for a crtc link (meaning that the
* encoder is active and trying to read from a pipe) and the
* pipe itself being active. */
- bool has_active_crtc = encoder->base.crtc &&
- to_intel_crtc(encoder->base.crtc)->active;
+ bool has_active_crtc = crtc_state &&
+ crtc_state->base.active;
+
+ if (crtc_state && has_bogus_dpll_config(crtc_state)) {
+ DRM_DEBUG_KMS("BIOS has misprogrammed the hardware. Disabling pipe %c\n",
+ pipe_name(crtc->pipe));
+ has_active_crtc = false;
+ }
connector = intel_encoder_find_connector(encoder);
if (connector && !has_active_crtc) {
@@ -15458,16 +15487,25 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
/* Connector is active, but has no active pipe. This is
* fallout from our resume register restoring. Disable
* the encoder manually again. */
- if (encoder->base.crtc) {
- struct drm_crtc_state *crtc_state = encoder->base.crtc->state;
+ if (crtc_state) {
+ struct drm_encoder *best_encoder;
DRM_DEBUG_KMS("[ENCODER:%d:%s] manually disabled\n",
encoder->base.base.id,
encoder->base.name);
+
+ /* avoid oopsing in case the hooks consult best_encoder */
+ best_encoder = connector->base.state->best_encoder;
+ connector->base.state->best_encoder = &encoder->base;
+
if (encoder->disable)
- encoder->disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->disable(encoder, crtc_state,
+ connector->base.state);
if (encoder->post_disable)
- encoder->post_disable(encoder, to_intel_crtc_state(crtc_state), connector->base.state);
+ encoder->post_disable(encoder, crtc_state,
+ connector->base.state);
+
+ connector->base.state->best_encoder = best_encoder;
}
encoder->base.crtc = NULL;
--
2.19.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen (rev2)
2019-01-09 12:09 ` Ville Syrjala
` (4 preceding siblings ...)
(?)
@ 2019-01-11 18:25 ` Patchwork
-1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-01-11 18:25 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen (rev2)
URL : https://patchwork.freedesktop.org/series/54942/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5404 -> Patchwork_11281
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/54942/revisions/2/mbox/
Known issues
------------
Here are the changes found in Patchwork_11281 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_contexts:
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
#### Possible fixes ####
* igt@i915_selftest@live_hangcheck:
- fi-bwr-2160: DMESG-FAIL [fdo#108735] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108735]: https://bugs.freedesktop.org/show_bug.cgi?id=108735
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
Participating hosts (45 -> 42)
------------------------------
Additional (3): fi-byt-j1900 fi-icl-u2 fi-hsw-peppy
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-bdw-samus fi-skl-6600u
Build changes
-------------
* Linux: CI_DRM_5404 -> Patchwork_11281
CI_DRM_5404: c51dc608699b2dcfe6d2f6981773f98d1b9f0c86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4763: 805a99409542d7d72dda3b6dcd284a8869a3de16 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11281: 5bbd1b55d21a134a33ba9ddb833b173b86da23b7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
5bbd1b55d21a drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_11281/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen (rev2)
2019-01-09 12:09 ` Ville Syrjala
` (5 preceding siblings ...)
(?)
@ 2019-01-11 22:45 ` Patchwork
-1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-01-11 22:45 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen (rev2)
URL : https://patchwork.freedesktop.org/series/54942/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5404_full -> Patchwork_11281_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_11281_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_schedule@pi-ringfull-render:
- shard-skl: NOTRUN -> FAIL [fdo#103158] +1
* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-apl: PASS -> FAIL [fdo#106641]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#107956]
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_ccs@pipe-c-bad-pixel-format:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] +15
* igt@kms_chv_cursor_fail@pipe-a-64x64-left-edge:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] / [fdo#108336] +13
* igt@kms_cursor_crc@cursor-128x42-offscreen:
- shard-skl: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-128x42-onscreen:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-glk: PASS -> FAIL [fdo#103232] +1
* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled:
- shard-iclb: PASS -> WARN [fdo#108336] +1
* igt@kms_fbcon_fbt@psr:
- shard-skl: NOTRUN -> FAIL [fdo#107882]
* igt@kms_flip@2x-flip-vs-panning-vs-hang-interruptible:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: PASS -> FAIL [fdo#102887] / [fdo#105363]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-glk: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
- shard-iclb: PASS -> DMESG-FAIL [fdo#107724] +7
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-move:
- shard-iclb: NOTRUN -> FAIL [fdo#103167]
* igt@kms_panel_fitting@legacy:
- shard-skl: NOTRUN -> FAIL [fdo#105456]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-skl: NOTRUN -> INCOMPLETE [fdo#104108] / [fdo#107773]
* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#106885]
- shard-iclb: NOTRUN -> FAIL [fdo#108948]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-skl: NOTRUN -> FAIL [fdo#103166]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-skl: NOTRUN -> FAIL [fdo#108145] +1
* igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
- shard-apl: PASS -> FAIL [fdo#103166] +3
* igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +2
* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-iclb: PASS -> FAIL [fdo#103166] +1
* igt@kms_psr@no_drrs:
- shard-iclb: PASS -> FAIL [fdo#108341]
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-glk: PASS -> DMESG-FAIL [fdo#105763] / [fdo#106538]
#### Possible fixes ####
* igt@gem_ctx_isolation@vecs0-dirty-switch:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-skl: INCOMPLETE [fdo#104108] -> PASS
* igt@kms_cursor_crc@cursor-256x85-random:
- shard-apl: FAIL [fdo#103232] -> PASS +3
- shard-glk: FAIL [fdo#103232] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-xtiled:
- shard-glk: FAIL [fdo#107791] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-apl: FAIL [fdo#103167] -> PASS +2
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +9
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-glk: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-iclb: FAIL [fdo#105683] / [fdo#108040] -> PASS +1
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-skl: INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS
* igt@kms_plane@plane-position-covered-pipe-a-planes:
- shard-iclb: FAIL [fdo#103166] -> PASS +1
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-iclb: DMESG-FAIL [fdo#107724] -> PASS
* igt@pm_rc6_residency@rc6-accuracy:
- shard-snb: {SKIP} [fdo#109271] -> PASS
#### Warnings ####
* igt@kms_ccs@pipe-b-crc-primary-rotation-180:
- shard-iclb: FAIL [fdo#107725] -> DMESG-WARN [fdo#107724] / [fdo#108336]
* igt@kms_cursor_crc@cursor-128x42-random:
- shard-iclb: FAIL [fdo#103232] -> DMESG-WARN [fdo#107724] / [fdo#108336]
* igt@pm_backlight@fade_with_suspend:
- shard-skl: INCOMPLETE [fdo#107773] -> FAIL [fdo#107847]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105456]: https://bugs.freedesktop.org/show_bug.cgi?id=105456
[fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#106885]: https://bugs.freedesktop.org/show_bug.cgi?id=106885
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
[fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
[fdo#107847]: https://bugs.freedesktop.org/show_bug.cgi?id=107847
[fdo#107882]: https://bugs.freedesktop.org/show_bug.cgi?id=107882
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108336]: https://bugs.freedesktop.org/show_bug.cgi?id=108336
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109281]: https://bugs.freedesktop.org/show_bug.cgi?id=109281
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109287]: https://bugs.freedesktop.org/show_bug.cgi?id=109287
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-kbl
Build changes
-------------
* Linux: CI_DRM_5404 -> Patchwork_11281
CI_DRM_5404: c51dc608699b2dcfe6d2f6981773f98d1b9f0c86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4763: 805a99409542d7d72dda3b6dcd284a8869a3de16 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_11281: 5bbd1b55d21a134a33ba9ddb833b173b86da23b7 @ 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_11281/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-11 17:49 ` Ville Syrjala
(?)
@ 2019-01-16 13:35 ` Sasha Levin
-1 siblings, 0 replies; 15+ messages in thread
From: Sasha Levin @ 2019-01-16 13:35 UTC (permalink / raw)
To: Sasha Levin, Ville Syrjala, intel-gfx; +Cc: Daniel Kamil Kozar, stable
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 516a49cc1946 drm/i915: Fix assert_plane() warning on bootup with external display.
The bot has tested the following trees: v4.20.2.
v4.20.2: Failed to apply! Possible dependencies:
c84c6fe30302 ("drm/i915: make encoder enable and disable hooks optional")
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-09 12:09 ` Ville Syrjala
` (6 preceding siblings ...)
(?)
@ 2019-01-16 13:35 ` Sasha Levin
-1 siblings, 0 replies; 15+ messages in thread
From: Sasha Levin @ 2019-01-16 13:35 UTC (permalink / raw)
To: Sasha Levin, Ville Syrjala, intel-gfx; +Cc: Daniel Kamil Kozar, stable
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 516a49cc1946 drm/i915: Fix assert_plane() warning on bootup with external display.
The bot has tested the following trees: v4.20.2.
v4.20.2: Failed to apply! Possible dependencies:
c84c6fe30302 ("drm/i915: make encoder enable and disable hooks optional")
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-11 17:49 ` Ville Syrjala
@ 2019-01-28 9:30 ` Kahola, Mika
-1 siblings, 0 replies; 15+ messages in thread
From: Kahola, Mika @ 2019-01-28 9:30 UTC (permalink / raw)
To: ville.syrjala, intel-gfx; +Cc: dkk089, stable
The patch look ok to me.
On Fri, 2019-01-11 at 19:49 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
> which misprograms the hardware badly when encountering a suitably
> high resolution display. The programmed pipe timings are somewhat
> bonkers and the DPLL is totally misprogrammed (P divider == 0).
> That will result in atomic commit timeouts as apparently the pipe
> is sufficiently stuck to not signal vblank interrupts.
>
> IIRC something like this was also observed on some other SNB
> machine years ago (might have been a Dell XPS 8300) but a BIOS
> update cured it. Sadly looks like this was never fixed for the
> ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
> broken.
>
> The quickest way to deal with this seems to be to shut down
> the pipe+ports+DPLL. Unfortunately doing this during the
> normal sanitization phase isn't quite soon enough as we
> already spew several WARNs about the bogus hardware state.
> But it's better than hanging the boot for a few dozen seconds.
> Since this is limited to a few old machines it doesn't seem
> entirely worthwile to try and rework the readout+sanitization
> code to handle it more gracefully.
>
> v2: Fix potential NULL deref (kbuild test robot)
> Constify has_bogus_dpll_config()
>
> Cc: stable@vger.kernel.org # v4.20+
> Cc: Daniel Kamil Kozar <dkk089@gmail.com>
> Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
> Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
> Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup
> with external display")
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++
> ----
> 1 file changed, 44 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 5dc0de89c49e..6cd6048b4731 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15438,16 +15438,45 @@ static void intel_sanitize_crtc(struct
> intel_crtc *crtc,
> }
> }
>
> +static bool has_bogus_dpll_config(const struct intel_crtc_state
> *crtc_state)
> +{
> + struct drm_i915_private *dev_priv = to_i915(crtc_state-
> >base.crtc->dev);
> +
> + /*
> + * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
> + * the hardware when a high res displays plugged in. DPLL P
> + * divider is zero, and the pipe timings are bonkers. We'll
> + * try to disable everything in that case.
> + *
> + * FIXME would be nice to be able to sanitize this state
> + * without several WARNs, but for now let's take the easy
> + * road.
> + */
> + return IS_GEN(dev_priv, 6) &&
> + crtc_state->base.active &&
> + crtc_state->shared_dpll &&
> + crtc_state->port_clock == 0;
> +}
> +
> static void intel_sanitize_encoder(struct intel_encoder *encoder)
> {
> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> struct intel_connector *connector;
> + struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> + struct intel_crtc_state *crtc_state = crtc ?
> + to_intel_crtc_state(crtc->base.state) : NULL;
>
> /* We need to check both for a crtc link (meaning that the
> * encoder is active and trying to read from a pipe) and the
> * pipe itself being active. */
> - bool has_active_crtc = encoder->base.crtc &&
> - to_intel_crtc(encoder->base.crtc)->active;
> + bool has_active_crtc = crtc_state &&
> + crtc_state->base.active;
> +
> + if (crtc_state && has_bogus_dpll_config(crtc_state)) {
> + DRM_DEBUG_KMS("BIOS has misprogrammed the hardware.
> Disabling pipe %c\n",
> + pipe_name(crtc->pipe));
> + has_active_crtc = false;
> + }
>
> connector = intel_encoder_find_connector(encoder);
> if (connector && !has_active_crtc) {
> @@ -15458,16 +15487,25 @@ static void intel_sanitize_encoder(struct
> intel_encoder *encoder)
> /* Connector is active, but has no active pipe. This is
> * fallout from our resume register restoring. Disable
> * the encoder manually again. */
> - if (encoder->base.crtc) {
> - struct drm_crtc_state *crtc_state = encoder-
> >base.crtc->state;
> + if (crtc_state) {
> + struct drm_encoder *best_encoder;
>
> DRM_DEBUG_KMS("[ENCODER:%d:%s] manually
> disabled\n",
> encoder->base.base.id,
> encoder->base.name);
> +
> + /* avoid oopsing in case the hooks consult
> best_encoder */
> + best_encoder = connector->base.state-
> >best_encoder;
> + connector->base.state->best_encoder = &encoder-
> >base;
> +
> if (encoder->disable)
> - encoder->disable(encoder,
> to_intel_crtc_state(crtc_state), connector->base.state);
> + encoder->disable(encoder, crtc_state,
> + connector-
> >base.state);
> if (encoder->post_disable)
> - encoder->post_disable(encoder,
> to_intel_crtc_state(crtc_state), connector->base.state);
> + encoder->post_disable(encoder,
> crtc_state,
> + connector-
> >base.state);
> +
> + connector->base.state->best_encoder =
> best_encoder;
> }
> encoder->base.crtc = NULL;
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
@ 2019-01-28 9:30 ` Kahola, Mika
0 siblings, 0 replies; 15+ messages in thread
From: Kahola, Mika @ 2019-01-28 9:30 UTC (permalink / raw)
To: ville.syrjala, intel-gfx; +Cc: dkk089, stable
The patch look ok to me.
On Fri, 2019-01-11 at 19:49 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
> which misprograms the hardware badly when encountering a suitably
> high resolution display. The programmed pipe timings are somewhat
> bonkers and the DPLL is totally misprogrammed (P divider == 0).
> That will result in atomic commit timeouts as apparently the pipe
> is sufficiently stuck to not signal vblank interrupts.
>
> IIRC something like this was also observed on some other SNB
> machine years ago (might have been a Dell XPS 8300) but a BIOS
> update cured it. Sadly looks like this was never fixed for the
> ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
> broken.
>
> The quickest way to deal with this seems to be to shut down
> the pipe+ports+DPLL. Unfortunately doing this during the
> normal sanitization phase isn't quite soon enough as we
> already spew several WARNs about the bogus hardware state.
> But it's better than hanging the boot for a few dozen seconds.
> Since this is limited to a few old machines it doesn't seem
> entirely worthwile to try and rework the readout+sanitization
> code to handle it more gracefully.
>
> v2: Fix potential NULL deref (kbuild test robot)
> Constify has_bogus_dpll_config()
>
> Cc: stable@vger.kernel.org # v4.20+
> Cc: Daniel Kamil Kozar <dkk089@gmail.com>
> Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
> Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
> Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup
> with external display")
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++
> ----
> 1 file changed, 44 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 5dc0de89c49e..6cd6048b4731 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15438,16 +15438,45 @@ static void intel_sanitize_crtc(struct
> intel_crtc *crtc,
> }
> }
>
> +static bool has_bogus_dpll_config(const struct intel_crtc_state
> *crtc_state)
> +{
> + struct drm_i915_private *dev_priv = to_i915(crtc_state-
> >base.crtc->dev);
> +
> + /*
> + * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
> + * the hardware when a high res displays plugged in. DPLL P
> + * divider is zero, and the pipe timings are bonkers. We'll
> + * try to disable everything in that case.
> + *
> + * FIXME would be nice to be able to sanitize this state
> + * without several WARNs, but for now let's take the easy
> + * road.
> + */
> + return IS_GEN(dev_priv, 6) &&
> + crtc_state->base.active &&
> + crtc_state->shared_dpll &&
> + crtc_state->port_clock == 0;
> +}
> +
> static void intel_sanitize_encoder(struct intel_encoder *encoder)
> {
> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> struct intel_connector *connector;
> + struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> + struct intel_crtc_state *crtc_state = crtc ?
> + to_intel_crtc_state(crtc->base.state) : NULL;
>
> /* We need to check both for a crtc link (meaning that the
> * encoder is active and trying to read from a pipe) and the
> * pipe itself being active. */
> - bool has_active_crtc = encoder->base.crtc &&
> - to_intel_crtc(encoder->base.crtc)->active;
> + bool has_active_crtc = crtc_state &&
> + crtc_state->base.active;
> +
> + if (crtc_state && has_bogus_dpll_config(crtc_state)) {
> + DRM_DEBUG_KMS("BIOS has misprogrammed the hardware.
> Disabling pipe %c\n",
> + pipe_name(crtc->pipe));
> + has_active_crtc = false;
> + }
>
> connector = intel_encoder_find_connector(encoder);
> if (connector && !has_active_crtc) {
> @@ -15458,16 +15487,25 @@ static void intel_sanitize_encoder(struct
> intel_encoder *encoder)
> /* Connector is active, but has no active pipe. This is
> * fallout from our resume register restoring. Disable
> * the encoder manually again. */
> - if (encoder->base.crtc) {
> - struct drm_crtc_state *crtc_state = encoder-
> >base.crtc->state;
> + if (crtc_state) {
> + struct drm_encoder *best_encoder;
>
> DRM_DEBUG_KMS("[ENCODER:%d:%s] manually
> disabled\n",
> encoder->base.base.id,
> encoder->base.name);
> +
> + /* avoid oopsing in case the hooks consult
> best_encoder */
> + best_encoder = connector->base.state-
> >best_encoder;
> + connector->base.state->best_encoder = &encoder-
> >base;
> +
> if (encoder->disable)
> - encoder->disable(encoder,
> to_intel_crtc_state(crtc_state), connector->base.state);
> + encoder->disable(encoder, crtc_state,
> + connector-
> >base.state);
> if (encoder->post_disable)
> - encoder->post_disable(encoder,
> to_intel_crtc_state(crtc_state), connector->base.state);
> + encoder->post_disable(encoder,
> crtc_state,
> + connector-
> >base.state);
> +
> + connector->base.state->best_encoder =
> best_encoder;
> }
> encoder->base.crtc = NULL;
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Intel-gfx] [PATCH v2] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen
2019-01-28 9:30 ` Kahola, Mika
(?)
@ 2019-01-28 14:01 ` Ville Syrjälä
-1 siblings, 0 replies; 15+ messages in thread
From: Ville Syrjälä @ 2019-01-28 14:01 UTC (permalink / raw)
To: Kahola, Mika; +Cc: intel-gfx, dkk089, stable
On Mon, Jan 28, 2019 at 09:30:35AM +0000, Kahola, Mika wrote:
> The patch look ok to me.
>
> On Fri, 2019-01-11 at 19:49 +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Certain SNB machines (eg. ASUS K53SV) seem to have a broken BIOS
> > which misprograms the hardware badly when encountering a suitably
> > high resolution display. The programmed pipe timings are somewhat
> > bonkers and the DPLL is totally misprogrammed (P divider == 0).
> > That will result in atomic commit timeouts as apparently the pipe
> > is sufficiently stuck to not signal vblank interrupts.
> >
> > IIRC something like this was also observed on some other SNB
> > machine years ago (might have been a Dell XPS 8300) but a BIOS
> > update cured it. Sadly looks like this was never fixed for the
> > ASUS K53SV as the latest BIOS (K53SV.320 11/11/2011) is still
> > broken.
> >
> > The quickest way to deal with this seems to be to shut down
> > the pipe+ports+DPLL. Unfortunately doing this during the
> > normal sanitization phase isn't quite soon enough as we
> > already spew several WARNs about the bogus hardware state.
> > But it's better than hanging the boot for a few dozen seconds.
> > Since this is limited to a few old machines it doesn't seem
> > entirely worthwile to try and rework the readout+sanitization
> > code to handle it more gracefully.
> >
> > v2: Fix potential NULL deref (kbuild test robot)
> > Constify has_bogus_dpll_config()
> >
> > Cc: stable@vger.kernel.org # v4.20+
> > Cc: Daniel Kamil Kozar <dkk089@gmail.com>
> > Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
> > Tested-by: Daniel Kamil Kozar <dkk089@gmail.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109245
> > Fixes: 516a49cc1946 ("drm/i915: Fix assert_plane() warning on bootup
> > with external display")
>
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Thanks. Pushed to dinq.
>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++
> > ----
> > 1 file changed, 44 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 5dc0de89c49e..6cd6048b4731 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -15438,16 +15438,45 @@ static void intel_sanitize_crtc(struct
> > intel_crtc *crtc,
> > }
> > }
> >
> > +static bool has_bogus_dpll_config(const struct intel_crtc_state
> > *crtc_state)
> > +{
> > + struct drm_i915_private *dev_priv = to_i915(crtc_state-
> > >base.crtc->dev);
> > +
> > + /*
> > + * Some SNB BIOSen (eg. ASUS K53SV) are known to misprogram
> > + * the hardware when a high res displays plugged in. DPLL P
> > + * divider is zero, and the pipe timings are bonkers. We'll
> > + * try to disable everything in that case.
> > + *
> > + * FIXME would be nice to be able to sanitize this state
> > + * without several WARNs, but for now let's take the easy
> > + * road.
> > + */
> > + return IS_GEN(dev_priv, 6) &&
> > + crtc_state->base.active &&
> > + crtc_state->shared_dpll &&
> > + crtc_state->port_clock == 0;
> > +}
> > +
> > static void intel_sanitize_encoder(struct intel_encoder *encoder)
> > {
> > struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > struct intel_connector *connector;
> > + struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
> > + struct intel_crtc_state *crtc_state = crtc ?
> > + to_intel_crtc_state(crtc->base.state) : NULL;
> >
> > /* We need to check both for a crtc link (meaning that the
> > * encoder is active and trying to read from a pipe) and the
> > * pipe itself being active. */
> > - bool has_active_crtc = encoder->base.crtc &&
> > - to_intel_crtc(encoder->base.crtc)->active;
> > + bool has_active_crtc = crtc_state &&
> > + crtc_state->base.active;
> > +
> > + if (crtc_state && has_bogus_dpll_config(crtc_state)) {
> > + DRM_DEBUG_KMS("BIOS has misprogrammed the hardware.
> > Disabling pipe %c\n",
> > + pipe_name(crtc->pipe));
> > + has_active_crtc = false;
> > + }
> >
> > connector = intel_encoder_find_connector(encoder);
> > if (connector && !has_active_crtc) {
> > @@ -15458,16 +15487,25 @@ static void intel_sanitize_encoder(struct
> > intel_encoder *encoder)
> > /* Connector is active, but has no active pipe. This is
> > * fallout from our resume register restoring. Disable
> > * the encoder manually again. */
> > - if (encoder->base.crtc) {
> > - struct drm_crtc_state *crtc_state = encoder-
> > >base.crtc->state;
> > + if (crtc_state) {
> > + struct drm_encoder *best_encoder;
> >
> > DRM_DEBUG_KMS("[ENCODER:%d:%s] manually
> > disabled\n",
> > encoder->base.base.id,
> > encoder->base.name);
> > +
> > + /* avoid oopsing in case the hooks consult
> > best_encoder */
> > + best_encoder = connector->base.state-
> > >best_encoder;
> > + connector->base.state->best_encoder = &encoder-
> > >base;
> > +
> > if (encoder->disable)
> > - encoder->disable(encoder,
> > to_intel_crtc_state(crtc_state), connector->base.state);
> > + encoder->disable(encoder, crtc_state,
> > + connector-
> > >base.state);
> > if (encoder->post_disable)
> > - encoder->post_disable(encoder,
> > to_intel_crtc_state(crtc_state), connector->base.state);
> > + encoder->post_disable(encoder,
> > crtc_state,
> > + connector-
> > >base.state);
> > +
> > + connector->base.state->best_encoder =
> > best_encoder;
> > }
> > encoder->base.crtc = NULL;
> >
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-01-28 14:01 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 12:09 [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen Ville Syrjala
2019-01-09 12:09 ` Ville Syrjala
2019-01-09 13:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-01-09 16:08 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-10 19:41 ` [Intel-gfx] [PATCH] " kbuild test robot
2019-01-10 19:41 ` kbuild test robot
2019-01-11 17:49 ` [PATCH v2] " Ville Syrjala
2019-01-11 17:49 ` Ville Syrjala
2019-01-16 13:35 ` Sasha Levin
2019-01-28 9:30 ` [Intel-gfx] " Kahola, Mika
2019-01-28 9:30 ` Kahola, Mika
2019-01-28 14:01 ` [Intel-gfx] " Ville Syrjälä
2019-01-11 18:25 ` ✓ Fi.CI.BAT: success for drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen (rev2) Patchwork
2019-01-11 22:45 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-16 13:35 ` [PATCH] drm/i915: Try to sanitize bogus DPLL state left over by broken SNB BIOSen Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.