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 66D11CCD1A5 for ; Fri, 24 Oct 2025 11:04:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB99610E134; Fri, 24 Oct 2025 11:04:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="VGuJ1Pi5"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9388810E134 for ; Fri, 24 Oct 2025 11:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761303886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UjE1Mjg91W4Uf0DMyiKLEw8GyhTeW/8xz6YJnQFglsI=; b=VGuJ1Pi5M/rVV42pxjJgawtQyghDPuOiQKaGuCdpaoEpGXHvz1wEKPlY3iJHJ5yw2CsPhu Y67dyFcme7FxdbBqn6ek7oR5fsFhc2OJAdtc2ZCbGgRVMv4gPFQuxnjkku3omYF4vCEXiF nTB6SmX67rzC1hc9VbnuOX5x+du9618= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-gKdzyQggPCyGjxNqVMscBA-1; Fri, 24 Oct 2025 07:04:43 -0400 X-MC-Unique: gKdzyQggPCyGjxNqVMscBA-1 X-Mimecast-MFC-AGG-ID: gKdzyQggPCyGjxNqVMscBA_1761303881 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4C5E41956052; Fri, 24 Oct 2025 11:04:41 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.45.225.133]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E93DA19560B5; Fri, 24 Oct 2025 11:04:36 +0000 (UTC) From: Jocelyn Falempe To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Christian Brauner , Andi Shyti , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Jocelyn Falempe Subject: [PATCH] drm/i915/dmabuf: Flush the cache in vmap Date: Fri, 24 Oct 2025 13:04:15 +0200 Message-ID: <20251024110432.1313391-1-jfalempe@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: dVmWP_0KD4AlEpsb8w-cszU-w9QPYytFIlGl4x9VSlg_1761303881 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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" On a lenovo se100 server, when using i915 GPU for rendering, and the ast driver for display, the graphic output is corrupted, and almost unusable. Adding a clflush call in the vmap function fixes this issue completely. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c index f4f1c979d1b9..f6a8c1cbe4d1 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c @@ -77,6 +77,7 @@ static int i915_gem_dmabuf_vmap(struct dma_buf *dma_buf, return PTR_ERR(vaddr); iosys_map_set_vaddr(map, vaddr); + drm_clflush_virt_range(vaddr, dma_buf->size); return 0; } base-commit: 0790925dadad0997580df6e32cdccd54316807f2 -- 2.51.0