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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CACC433DF for ; Thu, 2 Jul 2020 18:04:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38D4E2084C for ; Thu, 2 Jul 2020 18:04:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TKfGdsRO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="SDEAl+v4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38D4E2084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lQ50Zwp5HzN6q/pfJizyzRBlBhQQg/sLY182CIq29dA=; b=TKfGdsROWqvdGURma70iTpW/T UHJXr+7HpMDka4JX/aY1/B0hOa/6dz67WQkPbAshB5OBTQXBVsZCSO9/brMzDsQK1YGLPJMqrFZpg G2GpeuZxxuLL0hivWcA2iOvoQVsV3FfDRarhVZuPVP6WWQ2r/A1w9M8PCFRPxApa5zDTTDomk8EcT 0Ze1kzOuFSf4NtYywz69rA7qpS/uuO1iJDXym21Uz43XH8uMh//eXJH+GpGj6C6wUogQmwB5gPVlt i4DByF1VuqSuFa+XM5v33wca356KBhok1B7KoTQGZIpXVeBJff1aR7C3IpycqWv6NLO01gjZspApJ Dstc/wQ1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3Yn-0007i3-60; Thu, 02 Jul 2020 18:03:45 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3Yi-0007gX-LR for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 18:03:41 +0000 Received: by mail-wr1-x441.google.com with SMTP id b6so29536440wrs.11 for ; Thu, 02 Jul 2020 11:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=UpAJNr8vpfTKtPQlj/e/glrJ9ulcMqPbKalh3VG00pM=; b=SDEAl+v4mwYH2FWXjETOOYOvRfmikj7NShBSNRHJW2UZNJ4YUd+TJJryD9LzQ9QhpA eN1lwTgoQwINeLc3RXJ4cU+Y5hdSlkBU1BmgJDNVMOiGHcpYH6pcgDLK52aLrzVZmv6r PFnkOFxN+vObKR9N+rJ+7S6/i/cxfEcUkp7XI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=UpAJNr8vpfTKtPQlj/e/glrJ9ulcMqPbKalh3VG00pM=; b=PHk3EymwhU0p264h767iaxpVwSEkebMiPLTIVi6BOg1vVd7FIC+UN73WHATqjo7SrM dnWCW7HdIgrVWmH+hPOtPrYAHgh3H+huCozYhi1qjctI0AaZ9oWZTW+VOCL04g83Qq9T i3uKEH9WJBVWU6wjjAiRc2xtENSBRLzYb3d7XKUh2N3Vyp6JIEC2AdJIhKMExCHysMuK R+KbHSYfkC3mgezK0QLJ6K0JOPYHh4hPqOlgEpv34XPfyTT+DIBh/gytAKIxmcKXLkc7 Y2UDzoTB8MrP2GHthqtFWvIAEYMi6JJPCNdMI9guoAvxOeI+ble0NpDgVnodukTfwttJ hqCA== X-Gm-Message-State: AOAM5325JS8MMa2z5uIZLS4OBADBPUp9x9etJeDsS6HcB+OttSwQg/U5 frnaxnTuKCuXX7KLl43JXrZ59w== X-Google-Smtp-Source: ABdhPJwUPiRqviJX4p/wQ4ZlfWVQDt88ex2g1XXDueh/V48dmaVm3xrRzZwLDYoIIaTkFo3VMCW82w== X-Received: by 2002:adf:f104:: with SMTP id r4mr34105603wro.90.1593713019519; Thu, 02 Jul 2020 11:03:39 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n16sm11595673wra.19.2020.07.02.11.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 11:03:38 -0700 (PDT) Date: Thu, 2 Jul 2020 20:03:36 +0200 From: Daniel Vetter To: Neil Armstrong Subject: Re: [PATCH v8 1/6] drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression Message-ID: <20200702180336.GB3278063@phenom.ffwll.local> Mail-Followup-To: Neil Armstrong , Simon Ser , "dri-devel@lists.freedesktop.org" , "jianxin.pan@amlogic.com" , Kevin Hilman , "linux-kernel@vger.kernel.org" , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" References: <20200702074759.32356-1-narmstrong@baylibre.com> <20200702074759.32356-2-narmstrong@baylibre.com> <8cBfZpkc4pHBLhihlvJMD_Hq1DEsNRcSY4Y8JaGwklMWcxiYzUMVEx7wH9f_DuCBMVUhXvOR0PcHVslILtKI2wdw79Nfih0N3VnrxfMQd08=@emersion.fr> <20200702131834.GZ3278063@phenom.ffwll.local> <044964ad-b927-57d7-9361-beda5c8d99a8@baylibre.com> <190ac909-c78b-81e0-35a1-353cd24e9f44@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <190ac909-c78b-81e0-35a1-353cd24e9f44@baylibre.com> X-Operating-System: Linux phenom 5.6.0-1-amd64 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_140340_737622_DE8BC033 X-CRM114-Status: GOOD ( 25.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "jianxin.pan@amlogic.com" , Simon Ser , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Daniel Vetter , Kevin Hilman , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 02, 2020 at 05:11:25PM +0200, Neil Armstrong wrote: > Hi, > > On 02/07/2020 16:15, Daniel Vetter wrote: > > On Thu, Jul 2, 2020 at 3:34 PM Neil Armstrong wrote: > >> > >> On 02/07/2020 15:18, Daniel Vetter wrote: > >>> On Thu, Jul 02, 2020 at 09:23:11AM +0000, Simon Ser wrote: > >>>> On Thursday, July 2, 2020 9:47 AM, Neil Armstrong wrote: > >>>> > >>>>> Finally is also adds the Scatter Memory layout, meaning the header contains IOMMU > >>>>> references to the compressed frames content to optimize memory access > >>>>> and layout. > >>>>> > >>>>> In this mode, only the header memory address is needed, thus the content > >>>>> memory organization is tied to the current producer execution and cannot > >>>>> be saved/dumped neither transferrable between Amlogic SoCs supporting this > >>>>> modifier. > >>>> > >>>> Still not sure how to handle this one, since this breaks fundamental > >>>> assumptions about modifiers. > >>> > >>> I wonder whether we should require special allocations for these, and then > >>> just outright reject mmap on these buffers. mmap on dma-buf isn't a > >>> required feature. > >> > >> Yes, it's the plan to reject mmap on these buffers, but it can't be explained > >> in the modifiers description and it's a requirement of the producer, not the > >> consumer. > > > > Hm I think worth to add that as a note to the modifier. Just to make > > sure. And avoids questions like the one from Simon. > > Something like: > > /* > * Amlogic FBC Scatter Memory layout > * > * Indicates the header contains IOMMU references to the compressed > * frames content to optimize memory access and layout. > * > * In this mode, only the header memory address is needed, thus the > * content memory organization is tied to the current producer > * execution and cannot be saved/dumped neither transferrable between > * Amlogic SoCs supporting this modifier. > + * > + * Due to the nature of the layout, these buffers are not expected to > + * be accessible by the user-space clients but only accessible by the > + * hardware producers and consumers. > + * > + * The user-space clients should expect a failure while trying to mmap > + * the DMA-BUF handle returned by the producer. > */ lgtm, Acked-by: Daniel Vetter > > Thanks, > Neil > > > -Daniel > > > >> > >>> > >>> That would make sure that userspace cannot look at them. > >>> > >>> Also I'm kinda suspecting that there's not unlimited amounts of this magic > >>> invisible storage available anyway. > >>> -Daniel > >>> > >> > >> _______________________________________________ > >> dri-devel mailing list > >> dri-devel@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > > > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel