From patchwork Tue Mar 5 14:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 13582498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FA81C54E49 for ; Tue, 5 Mar 2024 14:27:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 054F8112B43; Tue, 5 Mar 2024 14:27:15 +0000 (UTC) Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E890112B3F for ; Tue, 5 Mar 2024 14:27:12 +0000 (UTC) From: Maarten Lankhorst To: intel-gfx@lists.freedesktop.org Cc: Maarten Lankhorst Subject: [PATCH v2 0/3] drm/i915: Unpin cursor fb only after vblank. Date: Tue, 5 Mar 2024 15:27:11 +0100 Message-ID: <20240305142714.5298-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Fix legacy cursor updates on xe by enforcing wait between updating registers and unpin. In comparison with previous version, there was a small bug in the atomic unpin path. In intel_plane_cleanup_fb we tried to deference plane_state after calling vblank schedule. Remove plane from atomic state immediately after scheduling to prevent this issue. It's unsafe to deference plane_state as soon as schedule occured. Maarten Lankhorst (2): drm: Add drm_vblank_work_flush_all(). drm/i915: Use the same vblank worker for atomic unpin Ville Syrjälä (1): drm/i915: Use vblank worker to unpin old legacy cursor fb safely drivers/gpu/drm/drm_vblank_work.c | 22 +++++++++++++ .../gpu/drm/i915/display/intel_atomic_plane.c | 13 +++++++- .../gpu/drm/i915/display/intel_atomic_plane.h | 2 ++ drivers/gpu/drm/i915/display/intel_crtc.c | 31 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_cursor.c | 26 ++++++++++++++-- drivers/gpu/drm/i915/display/intel_cursor.h | 3 ++ drivers/gpu/drm/i915/display/intel_display.c | 3 ++ .../drm/i915/display/intel_display_types.h | 3 ++ include/drm/drm_vblank_work.h | 2 ++ 9 files changed, 102 insertions(+), 3 deletions(-)