Skip to contentSkip to conversation

drm/i915: Avoid initializing framebuffer without pipes

PATCH In review Mika Kuoppala 4 participants 6 messages Oct 19, 2018 – Oct 22, 2018

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

PATCH 1/1 drm/i915: Avoid initializing framebuffer without pipes

If we try to initialize a framebuffer without pipes, we get oops as we fail to get valid crtc for a PIPE A, on trying to find pitch limits. This is easily demonstrated by trying to init framebuffer with displays disabled by 'i915.disable_display=1' kernel cmdline.

Fix this by omitting framebuffer init early if there are no pipes.

Testcase: igt/kms_addfb_basic

---
 drivers/gpu/drm/i915/intel_display.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_display.c +3 -0
index fc7e3b0bd95c..c1685395c67c 100644
@@ -14312,6 +14312,9 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 	stride = i915_gem_object_get_stride(obj);
 	i915_gem_object_unlock(obj);
 
+	if (INTEL_INFO(dev_priv)->num_pipes == 0)
+		goto err;
+
 	if (mode_cmd->flags & DRM_MODE_FB_MODIFIERS) {
 		/*
 		 * If there's a fence, enforce that
Signature · 6 lines
2.17.1

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

Quoting Mika Kuoppala (2018-10-19 13:30:37)

Quoted 11 lines

If we try to initialize a framebuffer without pipes, we get oops as we fail to get valid crtc for a PIPE A, on trying to find pitch limits. This is easily demonstrated by trying to init framebuffer with displays disabled by 'i915.disable_display=1' kernel cmdline.

Fix this by omitting framebuffer init early if there are no pipes.

Testcase: igt/kms_addfb_basic

To which Ville previously replied with the suggestion of preventing the ioctl from even getting this far, to whit

if (!INTEL_INFO(dev_priv)->num_pipes)

	i915->drm.driver_features &= ~DRIVER_MODESET

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

maintainer
#2 lore raw
Quoted 13 lines · Chris Wilson

Quoting Mika Kuoppala (2018-10-19 13:30:37)

Quoted 11 lines

If we try to initialize a framebuffer without pipes, we get oops as we fail to get valid crtc for a PIPE A, on trying to find pitch limits. This is easily demonstrated by trying to init framebuffer with displays disabled by 'i915.disable_display=1' kernel cmdline.

Fix this by omitting framebuffer init early if there are no pipes.

Testcase: igt/kms_addfb_basic

Quoted 7 lines

To which Ville previously replied with the suggestion of preventing the ioctl from even getting this far, to whit

if (!INTEL_INFO(dev_priv)->num_pipes)

	i915->drm.driver_features &= ~DRIVER_MODESET

See https://patchwork.freedesktop.org/series/51000/

As well as https://patchwork.freedesktop.org/series/50962/

BR,
Jani.

Quoted 5 lines

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

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Quoting Jani Nikula (2018-10-22 15:09:06)

Quoted 17 lines · Chris Wilson
Quoted 16 lines

Quoting Mika Kuoppala (2018-10-19 13:30:37)

Quoted 11 lines

If we try to initialize a framebuffer without pipes, we get oops as we fail to get valid crtc for a PIPE A, on trying to find pitch limits. This is easily demonstrated by trying to init framebuffer with displays disabled by 'i915.disable_display=1' kernel cmdline.

Fix this by omitting framebuffer init early if there are no pipes.

Testcase: igt/kms_addfb_basic

To which Ville previously replied with the suggestion of preventing the ioctl from even getting this far, to whit

Quoted 6 lines
Quoted 4 lines

if (!INTEL_INFO(dev_priv)->num_pipes)

      i915->drm.driver_features &= ~DRIVER_MODESET

See https://patchwork.freedesktop.org/series/51000/

As well as https://patchwork.freedesktop.org/series/50962/

That doesn't seem to fix this particular or similar oopses. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.BAT: success for series starting with [1/1] drm/i915: Avoid initializing framebuffer without pipes

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/1] drm/i915: Avoid initializing framebuffer without pipes
URL : https://patchwork.freedesktop.org/series/51252/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5015 -> Patchwork_10515 =

== Summary - SUCCESS ==

No regressions found.

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

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

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

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

    
    ==== Possible fixes ====

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

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

    igt@kms_pipe_crc_basic@read-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#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718

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

Missing (8): fi-ilk-m540 fi-icl-u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 fi-cfl-8109u fi-kbl-7560u

== Build changes ==

* Linux: CI_DRM_5015 -> Patchwork_10515

CI_DRM_5015: ec78bedc9006e9e56067eb6524bbd3064475a055 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4685: 78619fde4008424c472906041edb1d204e014f7c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10515: fa0be49a44523b6de0f302752dc0c18b30e7edbe @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

fa0be49a4452 drm/i915: Avoid initializing framebuffer without pipes

== Logs ==

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

#5 lore raw

✗ Fi.CI.IGT: failure for series starting with [1/1] drm/i915: Avoid initializing framebuffer without pipes

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/1] drm/i915: Avoid initializing framebuffer without pipes
URL : https://patchwork.freedesktop.org/series/51252/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5015_full -> Patchwork_10515_full =

== Summary - FAILURE ==

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

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@pm_rps@reset:
      shard-skl:          PASS -> FAIL

    
    ==== Warnings ====

    igt@kms_frontbuffer_tracking@fbc-2p-indfb-fliptrack:
      shard-hsw:          SKIP -> PASS

    igt@perf_pmu@rc6:
      shard-kbl:          SKIP -> PASS

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@sysfs-reader:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103313)

    igt@gem_ctx_isolation@vcs0-s3:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106023, fdo#103665)

    igt@kms_atomic_transition@plane-all-modeset-transition:
      shard-glk:          PASS -> INCOMPLETE (fdo#103359, k.org#198133)

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

    igt@kms_color@pipe-a-legacy-gamma:
      shard-skl:          PASS -> FAIL (fdo#108145, fdo#104782)

    igt@kms_cursor_crc@cursor-size-change:
      shard-glk:          PASS -> FAIL (fdo#103232)

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

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

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

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-gtt:
      shard-skl:          PASS -> FAIL (fdo#105682) +1

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

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
      shard-glk:          PASS -> FAIL (fdo#103167) +5

    igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-render:
      shard-skl:          PASS -> FAIL (fdo#103167) +1

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
      shard-skl:          PASS -> FAIL (fdo#103166)

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

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

    igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
      shard-skl:          NOTRUN -> FAIL (fdo#108145)

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

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

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

    
    ==== Possible fixes ====

    igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
      shard-glk:          FAIL (fdo#108145) -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-glk:          FAIL (fdo#103232) -> PASS +1

    igt@kms_cursor_crc@cursor-256x256-dpms:
      shard-apl:          FAIL (fdo#103232) -> PASS +1

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

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          FAIL (fdo#103166) -> PASS +1

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

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

    igt@pm_rps@reset:
      shard-apl:          FAIL (fdo#102250) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102250 https://bugs.freedesktop.org/show_bug.cgi?id=102250
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

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

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_5015 -> Patchwork_10515

CI_DRM_5015: ec78bedc9006e9e56067eb6524bbd3064475a055 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4685: 78619fde4008424c472906041edb1d204e014f7c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10515: fa0be49a44523b6de0f302752dc0c18b30e7edbe @ 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_10515/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx