From patchwork Thu Apr 18 16:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 13635140 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 0A94EC4345F for ; Thu, 18 Apr 2024 16:55:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55A9C113E03; Thu, 18 Apr 2024 16:55:12 +0000 (UTC) Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D88041127C2; Thu, 18 Apr 2024 16:55:08 +0000 (UTC) From: Maarten Lankhorst To: intel-xe@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Maarten Lankhorst Subject: [PATCH 0/5] drm/xe: More fb pinning optimizations. Date: Thu, 18 Apr 2024 18:55:14 +0200 Message-ID: <20240418165520.88961-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" This reduces the latency of pinning framebuffers by re-using the previous mapping, if available. Additionally, DPT is preallocated when creating the FB, instead of performing a bo allocation on every pin. Maarten Lankhorst (5): drm/xe/display: Preparations for preallocating dpt bo drm/xe: Use simple xchg to cache DPT drm/xe: Remove safety check from __xe_ttm_stolen_io_mem_reserve_stolen drm/xe/display: Prevent overwriting original GGTT when taking over initial FB. drm/xe/display: Re-use display vmas when possible .../gpu/drm/i915/display/intel_atomic_plane.c | 2 +- drivers/gpu/drm/i915/display/intel_cursor.c | 2 +- drivers/gpu/drm/i915/display/intel_fb_pin.c | 3 +- drivers/gpu/drm/i915/display/intel_fb_pin.h | 3 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 5 + drivers/gpu/drm/i915/display/intel_fbdev.h | 9 + .../gpu/drm/xe/compat-i915-headers/i915_vma.h | 3 + drivers/gpu/drm/xe/display/xe_fb_pin.c | 246 ++++++++++++++---- drivers/gpu/drm/xe/display/xe_fb_pin.h | 20 ++ drivers/gpu/drm/xe/display/xe_plane_initial.c | 15 +- drivers/gpu/drm/xe/xe_ggtt.c | 9 +- drivers/gpu/drm/xe/xe_ggtt.h | 3 +- drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 4 - 13 files changed, 254 insertions(+), 70 deletions(-) create mode 100644 drivers/gpu/drm/xe/display/xe_fb_pin.h