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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4573DC25B0C for ; Tue, 9 Aug 2022 15:01:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244715AbiHIPBY (ORCPT ); Tue, 9 Aug 2022 11:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235991AbiHIPBS (ORCPT ); Tue, 9 Aug 2022 11:01:18 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E152F1A382; Tue, 9 Aug 2022 08:01:17 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id z145so9759665iof.9; Tue, 09 Aug 2022 08:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=7Z8Gt1kvQ2qMgFvYLX9L5Os/pwoMppPUG/zH/675HiM=; b=JFvhVPx7UTePPnr+5h1qdd0uExGBu1XIZzljf2CKVBl944uYdakgNuSexevzfQy5xJ pNz9YMZnA30DuJFGQEHP/5+VG8/mRg2MVDcqJDNEBT/JvoOQVNQu76BOBQ/+Fc/7eLuk Utx62Z/6+5qeo2PG8U9Qhz4jMTyvANXy631UFqQpb7ATf0v2YmMmgJc22Su5HUAiKiac 2Yf6fIOZlmCqWhBaLDy7QFztAJNpd+QTQPyFDnQMJGUx4UT6YWuobE2sT2V6LqVhblAf djdEHwmyc7jf9U560o0FCAEQ81/OxM67CD3iWQaqR8pYoKGjchIAve2CwolU58DMo9hJ Hggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=7Z8Gt1kvQ2qMgFvYLX9L5Os/pwoMppPUG/zH/675HiM=; b=tQ7lBBo20UdnQ5NvqxKq/ntImrfznecSfxhmlAQfqpP607TwTQ1r9wHv3b2uCIGpI9 VPpixLQCVhuvKCcM8W3e4GSec3VZWQW4HXiydCMWDv5cQwMsr5qbQVjvW+3OEl+fIHPY 60HMaeIlUz0D8XDEouaaZxH2whfs0MCNZiPbHQP2W7r2x9dvFmSM+0rp6AzD9lVzqE5A cJG9BwWhAG97aUr7VmX6dUclGtx+5lKBHjaaASWwm7n/ml31ccpXVfcaw3729v9D2h3n zD07KheP7uQNtRtst9h2m7Sr6p8Y6EdcigZ6RVeaG+GzfigEMwh1wBHML+YErwC9g2Vy OrCw== X-Gm-Message-State: ACgBeo2BPs4DCC+FDgOlbM8uDwUpwob7xtLO6jG1T2LWGMA5SbJFoQrJ nILPnsMZIV0B8lWx1/mD4oBuVpgzupycQfDN3nw= X-Google-Smtp-Source: AA6agR4bp8FvYijrSbc8+bax4hs4cQGMD11ArEow4B4n9Lwp7iHI0dQimsqmJe2io4dmXXYOVXju9V2XDuz49nxUEK4= X-Received: by 2002:a05:6638:1353:b0:342:9bfb:7382 with SMTP id u19-20020a056638135300b003429bfb7382mr10587461jad.129.1660057277054; Tue, 09 Aug 2022 08:01:17 -0700 (PDT) MIME-Version: 1.0 References: <91ff0bbb-ea3a-2663-3453-dea96ccd6dd8@amd.com> In-Reply-To: <91ff0bbb-ea3a-2663-3453-dea96ccd6dd8@amd.com> From: Rob Clark Date: Tue, 9 Aug 2022 08:01:04 -0700 Message-ID: Subject: Re: DMA-buf and uncached system memory To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: linux-media , dri-devel , linaro-mm-sig@lists.linaro.org, lkml , "Sharma, Shashank" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 12:58 AM Christian K=C3=B6nig wrote: > > Hi guys, > > we are currently working an Freesync and direct scan out from system > memory on AMD APUs in A+A laptops. > > On problem we stumbled over is that our display hardware needs to scan > out from uncached system memory and we currently don't have a way to > communicate that through DMA-buf. > > For our specific use case at hand we are going to implement something > driver specific, but the question is should we have something more > generic for this? I'm a bit late to this party (and sorry, I didn't read the entire thread), but it occurs to me that dmabuf mmap_info[1] would also get you what you need, ie. display importing dma-buf could check whether the exporter is mapping cached or not, and reject the import if needed? [1] https://patchwork.freedesktop.org/patch/496069/?series=3D106847&rev=3D2 > After all the system memory access pattern is a PCIe extension and as > such something generic. > > Regards, > Christian. > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 8DB03C19F2D for ; Tue, 9 Aug 2022 15:01:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2A74D9DE3; Tue, 9 Aug 2022 15:01:41 +0000 (UTC) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09105D9D72 for ; Tue, 9 Aug 2022 15:01:18 +0000 (UTC) Received: by mail-io1-xd34.google.com with SMTP id q124so9779324iod.3 for ; Tue, 09 Aug 2022 08:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=7Z8Gt1kvQ2qMgFvYLX9L5Os/pwoMppPUG/zH/675HiM=; b=JFvhVPx7UTePPnr+5h1qdd0uExGBu1XIZzljf2CKVBl944uYdakgNuSexevzfQy5xJ pNz9YMZnA30DuJFGQEHP/5+VG8/mRg2MVDcqJDNEBT/JvoOQVNQu76BOBQ/+Fc/7eLuk Utx62Z/6+5qeo2PG8U9Qhz4jMTyvANXy631UFqQpb7ATf0v2YmMmgJc22Su5HUAiKiac 2Yf6fIOZlmCqWhBaLDy7QFztAJNpd+QTQPyFDnQMJGUx4UT6YWuobE2sT2V6LqVhblAf djdEHwmyc7jf9U560o0FCAEQ81/OxM67CD3iWQaqR8pYoKGjchIAve2CwolU58DMo9hJ Hggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=7Z8Gt1kvQ2qMgFvYLX9L5Os/pwoMppPUG/zH/675HiM=; b=EWyM4sSvlE/326nKmLA8nz6i/nOs9L1hkYpjbNWPCSeZOTHewxfOXqMVHsGDIwDLC6 AmZYrrGm0JEUzEjDDVawfB36z1aT3u96f+pCX61RkPOEskMcv6ZbK3xO1AWsSf+YwEX7 pQeR4WYhfW2zDxNr3Tq2xppjXt8NM8lYCgDsuNkz03b/5/HN+p4o8eLHOyim90SkaGQa r6joNsUuavz+HhXXasQN/ewuR4d5AeaS2ESqmGmtCD7fTJJNgNRv5EW2h/jPca28tu9p KGaQXZow1uC9w0mkaHUo7wE7RqmeCWwPQYHhfFs3abfi9T4MLBnr/8Nrqr4Rb5ev5g0q +nFA== X-Gm-Message-State: ACgBeo3yDxrlmTkbXKPhdH6QhCcWbZmmwhPyZbzGb7bgR2GJ045UZ4P7 CxaD6AeqOs3mksduTalGEdlRTfMBQrMMVSGKd4oMysj7qRw= X-Google-Smtp-Source: AA6agR4bp8FvYijrSbc8+bax4hs4cQGMD11ArEow4B4n9Lwp7iHI0dQimsqmJe2io4dmXXYOVXju9V2XDuz49nxUEK4= X-Received: by 2002:a05:6638:1353:b0:342:9bfb:7382 with SMTP id u19-20020a056638135300b003429bfb7382mr10587461jad.129.1660057277054; Tue, 09 Aug 2022 08:01:17 -0700 (PDT) MIME-Version: 1.0 References: <91ff0bbb-ea3a-2663-3453-dea96ccd6dd8@amd.com> In-Reply-To: <91ff0bbb-ea3a-2663-3453-dea96ccd6dd8@amd.com> From: Rob Clark Date: Tue, 9 Aug 2022 08:01:04 -0700 Message-ID: Subject: Re: DMA-buf and uncached system memory To: =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-mm-sig@lists.linaro.org, "Sharma, Shashank" , lkml , dri-devel , linux-media Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Feb 15, 2021 at 12:58 AM Christian K=C3=B6nig wrote: > > Hi guys, > > we are currently working an Freesync and direct scan out from system > memory on AMD APUs in A+A laptops. > > On problem we stumbled over is that our display hardware needs to scan > out from uncached system memory and we currently don't have a way to > communicate that through DMA-buf. > > For our specific use case at hand we are going to implement something > driver specific, but the question is should we have something more > generic for this? I'm a bit late to this party (and sorry, I didn't read the entire thread), but it occurs to me that dmabuf mmap_info[1] would also get you what you need, ie. display importing dma-buf could check whether the exporter is mapping cached or not, and reject the import if needed? [1] https://patchwork.freedesktop.org/patch/496069/?series=3D106847&rev=3D2 > After all the system memory access pattern is a PCIe extension and as > such something generic. > > Regards, > Christian. > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel