Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1679163ybt; Thu, 2 Jul 2020 11:04:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUg1qu7JK92ED0eP7Gk0iqf/sWEah5ffYlE2VisPDI6mgylWQ9KUI1zaphM2NY4V1fy8Vd X-Received: by 2002:a17:906:2b54:: with SMTP id b20mr28705346ejg.366.1593713059981; Thu, 02 Jul 2020 11:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593713059; cv=none; d=google.com; s=arc-20160816; b=A7qUgIua1UTH/FbU/HZrY7UmT+EBa/qvRUu/XgasNIzVLiNPdllN93rx+Rh5V4smvJ pOnOBQbGP9NAsF0i1Kp/uJ1++b9+D+Nb2ubEa+4ahwkqeAyBZCCIsT4VNaTAj0Q5t/F+ hVsGG3fZlInpX4VGYInRBMgh5FmHBEDTwNkd95OVKj0gNfo0ghQQN9IeDgPBbhxhAYmm w0oYJgIpRLrJTE3yGB7Dzh1fPrsM7iCD1kdy7GW/RB00a2jSoxfy+9faPrUrE3Av/WZD r/tVmok2oJovTI+JcP8MF6HmY0p95zwJedIsMv33h5Tloqsu1t59ymH2TwkxG+DSGuln B8ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=UpAJNr8vpfTKtPQlj/e/glrJ9ulcMqPbKalh3VG00pM=; b=VlD0o6U1KS5riIMB1WckKGD8lHEmNKNrOdbkK3SzuAslyOfX30n3FXg88M/aWp0OZH GZSRCHhxsvl2B9M9yr0NhbYddnbsx/6usTo6x5uOn9JEkjTmaGAoEQ0P8EO0vgfzsO1U xZZ59X15MBbcKWSX8/BrDGaNpq2mK1kLro66zh7ZNi3UIiYzyl7YMDQZYe5kUHsOI10R 8059PXzvSlfyfsmHE/xak/P+Q4sq3vlBK17M7jEIXJLu/7kIuxsmpXXby7htJe3RRD6c iPy1S0wkJCV/KNnfMrn4JMFhtG8GLNGlzoQg4bbj17KkvNhlSk1yKBgLxmI1y7QSq3FC KjDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=SDEAl+v4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si6123430edm.514.2020.07.02.11.03.57; Thu, 02 Jul 2020 11:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=SDEAl+v4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727972AbgGBSDl (ORCPT + 99 others); Thu, 2 Jul 2020 14:03:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbgGBSDl (ORCPT ); Thu, 2 Jul 2020 14:03:41 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86C2C08C5C1 for ; Thu, 2 Jul 2020 11:03:40 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f7so26557151wrw.1 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=gtpx6ujZN34640/APzfJvr/4mj4kLml1U7rSmDJdF64iSMAbfB7k9JjH/GFs3YDtjP ciqUOwtD/e4VzG/bn6lGnhsaZpJJsFw5aF0abirkBe278JkjDVK8T3DyeZZWu+gB8Mrx gi7ypBbcSaOtZc5M40ph5X9Jz4BPN6UpQGFt9v7pJ1sh/uhpxgBTeYPfPpSEyQ1huEiN Wc4tiW0tOgNjLPeQMwx/beO3DsNh4ScuHvwqw9i+MlK+5bsHq83K5TKq2ZhN873hXQPW j9+/hgXh7XrpDYEHoN4dIWYH284rR3CJ5Ujrs6Ipjr9Pv8wORevEX8vlO10y/r4357Em NlFQ== X-Gm-Message-State: AOAM53257Cp8wRtdw02226+Xgq6T2Ovg6kpao951wqeYtgjbhU9U8lUp S4ByRiamlmN8blHmy4BKnLdwIQ== 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 Cc: Daniel Vetter , 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" 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <190ac909-c78b-81e0-35a1-353cd24e9f44@baylibre.com> X-Operating-System: Linux phenom 5.6.0-1-amd64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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