This is a note to let you know that I've just added the patch titled Revert "drm/i915: Disable DC states for all commits" to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-drm-i915-disable-dc-states-for-all-commits.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a9a14d4ac6e351f7fc39e81fbeb398936a0e0079 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Wed, 9 Aug 2023 11:13:22 +0200 Subject: Revert "drm/i915: Disable DC states for all commits" From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit 0fc6fea41c7122aa5f2088117f50144b507e13d7 which is commit a2b6e99d8a623544f3bdccd28ee35b9c1b00daa5 upstream. It is reported to cause regression issues, so it should be reverted from the 6.1.y tree for now. Reported-by: Thorsten Leemhuis <regressions@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/f0870e8f-0c66-57fd-f95d-18d014a11939@xxxxxxxxxxxxx Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8419 Cc: Manasi Navare <navaremanasi@xxxxxxxxxx> Cc: Drew Davenport <ddavenport@xxxxxxxxxxxx> Cc: Jouni Högander <jouni.hogander@xxxxxxxxx> Cc: Imre Deak <imre.deak@xxxxxxxxx> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Cc: Jani Nikula <jani.nikula@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_display.c | 28 ++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7123,8 +7123,6 @@ static void intel_update_crtc(struct int intel_fbc_update(state, crtc); - drm_WARN_ON(&i915->drm, !intel_display_power_is_enabled(i915, POWER_DOMAIN_DC_OFF)); - if (!modeset && (new_crtc_state->uapi.color_mgmt_changed || new_crtc_state->update_pipe)) @@ -7501,28 +7499,8 @@ static void intel_atomic_commit_tail(str drm_atomic_helper_wait_for_dependencies(&state->base); drm_dp_mst_atomic_wait_for_dependencies(&state->base); - /* - * During full modesets we write a lot of registers, wait - * for PLLs, etc. Doing that while DC states are enabled - * is not a good idea. - * - * During fastsets and other updates we also need to - * disable DC states due to the following scenario: - * 1. DC5 exit and PSR exit happen - * 2. Some or all _noarm() registers are written - * 3. Due to some long delay PSR is re-entered - * 4. DC5 entry -> DMC saves the already written new - * _noarm() registers and the old not yet written - * _arm() registers - * 5. DC5 exit -> DMC restores a mixture of old and - * new register values and arms the update - * 6. PSR exit -> hardware latches a mixture of old and - * new register values -> corrupted frame, or worse - * 7. New _arm() registers are finally written - * 8. Hardware finally latches a complete set of new - * register values, and subsequent frames will be OK again - */ - wakeref = intel_display_power_get(dev_priv, POWER_DOMAIN_DC_OFF); + if (state->modeset) + wakeref = intel_display_power_get(dev_priv, POWER_DOMAIN_MODESET); intel_atomic_prepare_plane_clear_colors(state); @@ -7661,8 +7639,8 @@ static void intel_atomic_commit_tail(str * the culprit. */ intel_uncore_arm_unclaimed_mmio_detection(&dev_priv->uncore); + intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET, wakeref); } - intel_display_power_put(dev_priv, POWER_DOMAIN_DC_OFF, wakeref); intel_runtime_pm_put(&dev_priv->runtime_pm, state->wakeref); /* Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-6.1/fs-protect-reconfiguration-of-sb-read-write-from-racing-writes.patch queue-6.1/drm-ttm-check-null-pointer-before-accessing-when-swapping.patch queue-6.1/exfat-use-kvmalloc_array-kvfree-instead-of-kmalloc_array-kfree.patch queue-6.1/powerpc-ftrace-create-a-dummy-stackframe-to-fix-stack-unwind.patch queue-6.1/io_uring-annotate-offset-timeout-races.patch queue-6.1/bpf-disable-preemption-in-bpf_event_output.patch queue-6.1/scsi-storvsc-limit-max_sectors-for-virtual-fibre-channel-devices.patch queue-6.1/mtd-spinand-toshiba-fix-ecc_get_status.patch queue-6.1/mtd-rawnand-meson-fix-oob-available-bytes-for-ecc.patch queue-6.1/net-tap_open-set-sk_uid-from-current_fsuid.patch queue-6.1/iommu-arm-smmu-v3-add-explicit-feature-for-nesting.patch queue-6.1/drm-i915-gt-cleanup-aux-invalidation-registers.patch queue-6.1/drm-amdgpu-remove-unnecessary-domain-argument.patch queue-6.1/firmware-arm_scmi-drop-of-node-reference-in-the-transport-channel-setup.patch queue-6.1/rust-allocator-prevent-mis-aligned-allocation.patch queue-6.1/arm64-fpsimd-sync-fpsimd-state-with-sve-for-sme-only-systems.patch queue-6.1/debugobjects-recheck-debug_objects_enabled-before-reporting.patch queue-6.1/net-usbnet-fix-warning-in-usbnet_start_xmit-usb_submit_urb.patch queue-6.1/net-tun_chr_open-set-sk_uid-from-current_fsuid.patch queue-6.1/revert-drm-i915-disable-dc-states-for-all-commits.patch queue-6.1/rbd-prevent-busy-loop-when-requesting-exclusive-lock.patch queue-6.1/file-reinstate-f_pos-locking-optimization-for-regular-files.patch queue-6.1/drm-i915-fix-premature-release-of-request-s-reusable-memory.patch queue-6.1/ceph-defer-stopping-mdsc-delayed_work.patch queue-6.1/ext2-drop-fragment-support.patch queue-6.1/arm64-fpsimd-clear-sme-state-in-the-target-task-when-setting-the-vl.patch queue-6.1/libceph-fix-potential-hang-in-ceph_osdc_notify.patch queue-6.1/fs-sysv-null-check-to-prevent-null-ptr-deref-bug.patch queue-6.1/f2fs-fix-to-do-sanity-check-on-direct-node-in-truncate_dnode.patch queue-6.1/drm-amd-display-skip-clear_payload_id_table-if-device-mst_en-is-0.patch queue-6.1/iommu-arm-smmu-v3-document-mmu-700-erratum-2812531.patch queue-6.1/bpf-cpumap-make-sure-kthread-is-running-before-map-update-returns.patch queue-6.1/perf-fix-function-pointer-case.patch queue-6.1/bpf-disable-preemption-in-bpf_perf_event_output.patch queue-6.1/btrfs-remove-bug_on-s-in-add_new_free_space.patch queue-6.1/wifi-mt76-mt7615-do-not-advertise-5-ghz-on-first-phy-of-mt7615d-dbdc.patch queue-6.1/x86-hyperv-disable-ibt-when-hypercall-page-lacks-endbr-instruction.patch queue-6.1/clk-imx93-propagate-correct-error-in-imx93_clocks_probe.patch queue-6.1/iommu-arm-smmu-v3-document-nesting-related-errata.patch queue-6.1/fs-ntfs3-use-__gfp_nowarn-allocation-at-ntfs_load_attr_list.patch queue-6.1/net-ipa-only-reset-hashed-tables-when-supported.patch queue-6.1/arm64-dts-stratix10-fix-incorrect-i2c-property-for-scl-signal.patch queue-6.1/drm-amdgpu-use-apt-name-for-fw-reserved-region.patch queue-6.1/drm-amdgpu-add-vram-reservation-based-on-vram_usagebyfirmware_v2_2.patch queue-6.1/drm-amd-display-ensure-that-planes-are-in-the-same-order.patch queue-6.1/arm64-ptrace-don-t-enable-sve-when-setting-streaming-sve.patch queue-6.1/exfat-release-s_lock-before-calling-dir_emit.patch queue-6.1/io_uring-gate-iowait-schedule-on-having-pending-requests.patch queue-6.1/iommu-arm-smmu-v3-work-around-mmu-600-erratum-1076982.patch queue-6.1/usb-zaurus-add-id-for-a-300-b-500-c-700.patch queue-6.1/mm-kmem-fix-a-null-pointer-dereference-in-obj_stock_flush_required.patch queue-6.1/bluetooth-l2cap-fix-use-after-free-in-l2cap_sock_ready_cb.patch queue-6.1/net-mlx5-free-irqs-only-on-shutdown-callback.patch queue-6.1/open-make-resolve_cached-correctly-test-for-o_tmpfile.patch queue-6.1/scsi-zfcp-defer-fc_rport-blocking-until-after-adisc-response.patch queue-6.1/arm64-fpsimd-sync-and-zero-pad-fpsimd-state-for-streaming-sve.patch