From mboxrd@z Thu Jan 1 00:00:00 1970 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 90BDEC021AA for ; Fri, 21 Feb 2025 10:17:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 441CB10E275; Fri, 21 Feb 2025 10:17:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="GW15J/pE"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9440510E255 for ; Fri, 21 Feb 2025 10:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=20pLK2v1HdBlF/zJqNZxNj2DswPnh0A45Zt2NRFdN/s=; b=GW15J/pEe9x9rWOdoR/ip6OEUw j+wD9Nz1+X8sMnY4+oc2HvERLRfZGsunwnnzp2XKgz13gn9aSR9aW8CVg8Hx8etNuUg0kMzcQaHSp mgiD/yU/EQOSSotlb/hcU55l4FwyUFrtQZppC6fTbh6sznk8/vhYeVE0wPORVanTFd9FXLFzo46c5 3oKZEj7KJ3reiNVzmmZW6KXzkGX9N0fzFFmAY9JgkvaGRo8mn3AiS5HyiJ7sC+XapjtPztu0FvW5j EaH9cXbI2FNkeqvkwSembWMvsFp86U5mo6zdviBw5e2KdjPZvfirFoPgceaMlZOFnev9x3KtnhfqB uQxwLo8g==; Received: from [90.241.98.187] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1tlQ6G-00G2be-1y; Fri, 21 Feb 2025 11:17:45 +0100 From: Tvrtko Ursulin To: intel-xe@lists.freedesktop.org Cc: kernel-dev@igalia.com, Tvrtko Ursulin Subject: [PATCH 09/12] drm/xe: Handle DPT in system memory Date: Fri, 21 Feb 2025 10:17:28 +0000 Message-ID: <20250221101736.78986-10-tvrtko.ursulin@igalia.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: <20250221101736.78986-1-tvrtko.ursulin@igalia.com> References: <20250221101736.78986-1-tvrtko.ursulin@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" If DPT is allocated from system memory it will be created in the default write-back cached mode. This means we need to flush it after populating otherwise nothing works. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/xe/display/xe_fb_pin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index 8f559b19e8ab..a32f3603751a 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -3,6 +3,7 @@ * Copyright © 2021 Intel Corporation */ +#include #include #include "intel_display_types.h" @@ -205,6 +206,8 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb, if (dpt->vmap.is_iomem) ggtt_flush_writes(tile0->mem.ggtt); + else if (!xe_bo_is_vram(dpt) && !xe_bo_is_stolen(dpt)) + drm_clflush_virt_range(dpt->vmap.vaddr, dpt_size); vma->dpt = dpt; vma->node = dpt->ggtt_node[tile0->id]; -- 2.48.0