drm/i915: Fix atomic state leak when resetting HDMI link
Subsystems (2)
PATCH 1/3 drm/i915: Fix atomic state leak when resetting HDMI link
Atomic state needs to be put even if the commit was successful.
--- drivers/gpu/drm/i915/intel_ddi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +1 -6
@@ -3984,12 +3984,7 @@ static int modeset_pipe(struct drm_crtc *crtc, goto out; ret =drm_atomic_commit (state); -if (ret) - goto out; - -return 0 ; - - out: +out:drm_atomic_state_put (state);return ret;
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915: Don't manually add connectors and planes state
drm_atomic_commit() call chain already takes care of adding connectors and planes, so lets no add then manually if not changing their states.
drm_atomic_commit()
drm_atomic_check_only()
config->funcs->atomic_check()/intel_atomic_check()
drm_atomic_helper_check()
drm_atomic_helper_check_modeset()
for_each_oldnew_crtc_in_state()
drm_atomic_add_affected_connectors()
drm_atomic_add_affected_planes()--- drivers/gpu/drm/i915/intel_ddi.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +0 -8
@@ -3975,14 +3975,6 @@ static int modeset_pipe(struct drm_crtc *crtc, crtc_state->mode_changed = true; - ret =drm_atomic_add_affected_connectors (state, crtc); -if (ret) - goto out; - - ret =drm_atomic_add_affected_planes (state, crtc); -if (ret) - goto out; - ret =drm_atomic_commit (state); out:drm_atomic_state_put (state);
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915: Forcing a modeset when resetting HDMI link
In reply to José Roberto de SouzaWith fastboot enabled in gen9+ it broke the HDMI reset as just setting mode_changed to true causes a fastset and here we want a full modeset that will disable and then enable the encoder of this HDMI link actually, so setting connectors_changed instead that will cause modeset as desired.
--- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ddi.c +1 -1
@@ -3973,7 +3973,7 @@ static int modeset_pipe(struct drm_crtc *crtc, goto out; } - crtc_state->mode_changed = true; + crtc_state->connectors_changed = true; ret =drm_atomic_commit (state); out:
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Forcing a modeset when resetting HDMI link
Quoted 8 lines · José Roberto de Souza
With fastboot enabled in gen9+ it broke the HDMI reset as just setting
mode_changedto true causes a fastset and here we want a full modeset that will disable and then enable the encoder of this HDMI link actually, so settingconnectors_changedinstead that will cause modeset as desired.Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>
The two other questionable places seem to be:
* intel_digital_connector_atomic_check()
Looks like this is currently broken as we don't do infoframe/audio updates from the .update_pipe() hook yet. Also we have no .update_pipe() for pre-ddi platforms.
* intel_modeset_all_pipes()
Should work because we set the flag after the modeset->fastset downgrade has occurred. Might make sense to change this one as well though, just to avoid copy paste errors in the future.
Quoted 19 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ddi.c +1
-1@@ -3973,7 +3973,7 @@ static int modeset_pipe(struct drm_crtc *crtc, goto out; } - crtc_state->mode_changed = true; + crtc_state->connectors_changed = true; ret =drm_atomic_commit (state); out:Signature · 1 line
2.21.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Forcing a modeset when resetting HDMI link
Quoted 10 lines · Ville Syrjälä
Quoted 8 lines · José Roberto de Souza
With fastboot enabled in gen9+ it broke the HDMI reset as just setting
mode_changedto true causes a fastset and here we want a full
modeset that will disable and then enable the encoder of this HDMI link actually, so settingconnectors_changedinstead that will cause
modeset as desired.
Quoted 4 lines
Quoted 2 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>
Merged this patched to dinq, I will take a look at those places bellow.
Quoted 27 lines
The two other questionable places seem to be:
*
intel_digital_connector_atomic_check()
Looks like this is currently broken as we don't do infoframe/audio updates from the .update_pipe() hook yet. Also we have no .update_pipe() for pre-ddi platforms.*
intel_modeset_all_pipes()
Should work because we set the flag after themodeset->fastsetdowngrade has occurred. Might make sense to change this one as well though, just to avoid copy paste errors in the future.Quoted 14 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3973,7 +3973,7 @@ static int modeset_pipe(struct drm_crtc *crtc, goto out; }
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c +1
-1- crtc_state->mode_changed = true; + crtc_state->connectors_changed = true; ret =drm_atomic_commit (state);out:
Signature · 1 line
2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
URL : https://patchwork.freedesktop.org/series/57452/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
154d2c0bce1b drm/i915: Fix atomic state leak when resetting HDMI link
cc51bea3db6e drm/i915: Don't manually add connectors and planes state
-:19: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#19:
drm_atomic_add_affected_connectors()total: 0 errors, 1 warnings, 0 checks, 14 lines checked 43b6419ddc23 drm/i915: Forcing a modeset when resetting HDMI link
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
URL : https://patchwork.freedesktop.org/series/57452/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5682 -> Patchwork_12350
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/57452/revisions/1/mbox/
Known issues
------------
Here are the changes found in Patchwork_12350 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@memory-alloc:
- fi-ivb-3520m: NOTRUN -> SKIP [fdo#109271] +48
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: FAIL [fdo#103167] -> PASS
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
Participating hosts (42 -> 38)
------------------------------
Additional (1): fi-ivb-3520m
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-gdg-551
Build changes
-------------
* Linux: CI_DRM_5682 -> Patchwork_12350
CI_DRM_5682: e6481defd076c8507c8d5a503b2edd9c7a382ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4866: 189956af183c245eb237b3be4fa22953ec93bbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12350: 43b6419ddc23e2be6a1ac5f5b6e73d24194cd449 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
43b6419ddc23 drm/i915: Forcing a modeset when resetting HDMI link cc51bea3db6e drm/i915: Don't manually add connectors and planes state 154d2c0bce1b drm/i915: Fix atomic state leak when resetting HDMI link
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12350/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Fix atomic state leak when resetting HDMI link
URL : https://patchwork.freedesktop.org/series/57452/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5682_full -> Patchwork_12350_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_12350_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_cs_tlb@bsd2:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +5
* igt@gem_ctx_isolation@bcs0-clean:
- shard-iclb: NOTRUN -> SKIP [fdo#109281] +1
* igt@gem_mocs_settings@mocs-rc6-vebox:
- shard-iclb: NOTRUN -> SKIP [fdo#109287]
* igt@gem_softpin@noreloc-s3:
- shard-kbl: PASS -> DMESG-WARN [fdo#103313]
* igt@gen3_render_mixed_blits:
- shard-iclb: NOTRUN -> SKIP [fdo#109289]
* igt@i915_pm_rpm@basic-pci-d3-state:
- shard-skl: PASS -> INCOMPLETE [fdo#107807] +1
* igt@i915_pm_rpm@basic-rte:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724] +4
* igt@i915_pm_rpm@modeset-lpsp-stress:
- shard-iclb: PASS -> DMESG-WARN [fdo#108654]
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-iclb: PASS -> INCOMPLETE [fdo#107713] +1
* igt@kms_atomic_transition@5x-modeset-transitions-nonblocking:
- shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_busy@extended-modeset-hang-newfb-render-d:
- shard-iclb: NOTRUN -> SKIP [fdo#109278]
* igt@kms_chamelium@dp-hpd-storm:
- shard-iclb: NOTRUN -> SKIP [fdo#109284] +1
* igt@kms_color@pipe-c-ctm-max:
- shard-skl: NOTRUN -> FAIL [fdo#108147]
* igt@kms_color@pipe-c-degamma:
- shard-apl: PASS -> FAIL [fdo#104782]
* igt@kms_cursor_crc@cursor-128x128-sliding:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-256x85-offscreen:
- shard-skl: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-512x170-sliding:
- shard-iclb: NOTRUN -> SKIP [fdo#109279]
* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +2
* igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-legacy:
- shard-skl: PASS -> FAIL [fdo#102670]
* igt@kms_flip@2x-wf_vblank-ts-check:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +31
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: PASS -> FAIL [fdo#105363]
* igt@kms_flip_tiling@flip-changes-tiling:
- shard-skl: PASS -> FAIL [fdo#108303]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-apl: PASS -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-skl: NOTRUN -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-render:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +8
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-fullscreen:
- shard-iclb: PASS -> FAIL [fdo#103167] +3
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-indfb-msflip-blt:
- shard-glk: NOTRUN -> SKIP [fdo#109271]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- shard-skl: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: PASS -> FAIL [fdo#108145] +1
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2
- shard-skl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-iclb: NOTRUN -> FAIL [fdo#103166]
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> FAIL [fdo#109016]
* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]
* igt@kms_sysfs_edid_timing:
- shard-iclb: PASS -> FAIL [fdo#100047]
* igt@kms_universal_plane@universal-plane-pipe-b-functional:
- shard-apl: PASS -> FAIL [fdo#103166]
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-snb: PASS -> INCOMPLETE [fdo#105411]
* igt@kms_vrr@flip-suspend:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +32
* igt@prime_vgem@fence-write-hang:
- shard-iclb: NOTRUN -> SKIP [fdo#109295]
#### Possible fixes ####
* igt@gem_eio@reset-stress:
- shard-snb: FAIL [fdo#109661] -> PASS
* igt@gem_eio@suspend:
- shard-glk: INCOMPLETE [fdo#103359] / [k.org#198133] -> PASS
* igt@i915_pm_rpm@gem-execbuf:
- shard-skl: INCOMPLETE [fdo#107803] / [fdo#107807] -> PASS
* igt@i915_pm_rpm@legacy-planes-dpms:
- shard-iclb: DMESG-WARN [fdo#107724] -> PASS +1
* igt@i915_pm_rpm@modeset-lpsp-stress:
- shard-skl: INCOMPLETE [fdo#107807] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-iclb: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-apl: FAIL [fdo#106510] / [fdo#108145] -> PASS
* igt@kms_cursor_crc@cursor-128x128-dpms:
- shard-apl: FAIL [fdo#103232] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +6
- shard-apl: FAIL [fdo#103167] -> PASS +1
* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-apl: FAIL [fdo#103166] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
- shard-iclb: FAIL [fdo#103166] -> PASS
* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: FAIL [fdo#103166] -> PASS
* igt@kms_psr@no_drrs:
- shard-iclb: FAIL [fdo#108341] -> PASS
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
#### Warnings ####
* igt@i915_pm_backlight@fade_with_suspend:
- shard-iclb: INCOMPLETE [fdo#107713] / [fdo#107820] -> FAIL [fdo#107847]
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
[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#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#106510]: https://bugs.freedesktop.org/show_bug.cgi?id=106510
[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#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#107820]: https://bugs.freedesktop.org/show_bug.cgi?id=107820
[fdo#107847]: https://bugs.freedesktop.org/show_bug.cgi?id=107847
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108303]: https://bugs.freedesktop.org/show_bug.cgi?id=108303
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108654]: https://bugs.freedesktop.org/show_bug.cgi?id=108654
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[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#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#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[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 (7 -> 7)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_5682 -> Patchwork_12350
CI_DRM_5682: e6481defd076c8507c8d5a503b2edd9c7a382ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4866: 189956af183c245eb237b3be4fa22953ec93bbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12350: 43b6419ddc23e2be6a1ac5f5b6e73d24194cd449 @ 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_12350/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Does this patch/any of the other patches in this series need pushing?
Quoted 31 lines · José Roberto de Souza
Atomic state needs to be put even if the commit was successful.
Fixes dba14b27dd3c ("drm/i915: Reinitialize sink scrambling/TMDS clockratio on HPD")
Reviewed-by Ville Syrjälä <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Lyude Paul <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +1
-6@@ -3984,12 +3984,7 @@ static int modeset_pipe(struct drm_crtc *crtc, goto out; ret =drm_atomic_commit (state); -if (ret) - goto out; - -return 0 ; - - out: +out:drm_atomic_state_put (state);return ret;
Signature · 7 lines
Cheers, Lyude Paul _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx