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=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 D3E06C43331 for ; Wed, 25 Mar 2020 13:49:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA28620663 for ; Wed, 25 Mar 2020 13:49:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ue53poOk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727586AbgCYNtf (ORCPT ); Wed, 25 Mar 2020 09:49:35 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36634 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727402AbgCYNtf (ORCPT ); Wed, 25 Mar 2020 09:49:35 -0400 Received: by mail-lj1-f194.google.com with SMTP id g12so2536068ljj.3 for ; Wed, 25 Mar 2020 06:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=ue53poOk145/0Go2c3Fb090mulEi4KObzB4Gg55MF1CvN6x6lHk2Qf8lPZ5p5R3+G2 VP63zmjrCzKb82gf8jqzE7LJCcY3foHxfMdEijJbHSCvcWJLb0An2KtlnlYKqoF8gBtu ZM2ZexiOVhdnZg2Q8ll4+pRAHMR+Ez1aKDwmBNYhe6Nvsy5yNRJPt/igDUFQngqQ230s 7FxB2+dbcgoOMjaWWt/4YXpHnhCdt+5z1W+vDSn3fbKYHcojeMuflvme0hVgs/EFyIqc gbWuWSFjkBuKobaUJ4xQCX8QcyxxNW29g1kVgr4YR3BYFqnKx39KEE+s3zCzKixeZeWO yEpw== 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:in-reply-to :references:mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=mmCd2Td/NrQPno+9N/TWlECIW5tG3+kDSbLNrpHBQqUJ7yHzlYGxfXTHqUOv5FAh6t FEMS9wha6hxrl/kl2yweb26UEdSCDodG1GoiNXOD0bEFMUzTV9mf+SNwv92itMM5Pmk4 iSV4hw4OXbxG7KjOl4I+N93c2h2Wv/+TY005Kqw9rBHLxbzq53+KPQQeJj+TKLK0Vk7X CSLNfbgrCs1+CQDaKWEy4ffuN/7ZuikXApAeCGvAvnJU4IvL8wSk90xKwiXx2b8P4MeS DzTzQ5iV6mcRYW1dMyjpbZmuqgPARPjsJlOsLoS9Y3W6BNzBoR1xOXMQFi1xIoJDenoJ jnxg== X-Gm-Message-State: AGi0PuYUKoKL334aaS4SKBG8C/Ys4gzC6zUqoMUyanIBdOoeuykVq/pp JqA4vrnWFf5dItVWxqqBInc= X-Google-Smtp-Source: APiQypIVWnohCBw6Laxl+KFUeZrUWln3GLJRYstirHtutpXWykkoScXzvviRjE1iqzvOz4cwkSo1ww== X-Received: by 2002:a2e:a362:: with SMTP id i2mr2084950ljn.52.1585144172471; Wed, 25 Mar 2020 06:49:32 -0700 (PDT) Received: from eldfell.localdomain ([194.136.85.206]) by smtp.gmail.com with ESMTPSA id f2sm6420123ljn.101.2020.03.25.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:49:31 -0700 (PDT) Date: Wed, 25 Mar 2020 15:49:21 +0200 From: Pekka Paalanen To: Neil Armstrong Cc: Simon Ser , "mjourdan@baylibre.com" , Kevin Hilman , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v4 7/8] drm/fourcc: amlogic: Add modifier definitions for the Scatter layout Message-ID: <20200325154921.2a87930c@eldfell.localdomain> In-Reply-To: References: <20200325085025.30631-1-narmstrong@baylibre.com> <20200325085025.30631-8-narmstrong@baylibre.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/e3_VDQSNvzbMkOgJtm//89P"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 25 Mar 2020 11:24:15 +0100 Neil Armstrong wrote: > Hi, >=20 > On 25/03/2020 10:04, Simon Ser wrote: > > On Wednesday, March 25, 2020 9:50 AM, Neil Armstrong wrote: > > =20 > >> Amlogic uses a proprietary lossless image compression protocol and for= mat > >> for their hardware video codec accelerators, either video decoders or > >> video input encoders. > >> > >> This introduces the Scatter Memory layout, means the header contains I= OMMU > >> references to the compressed frames content to optimize memory access > >> and layout. > >> > >> In this mode, only the header memory address is needed, thus the conte= nt > >> memory organization is tied to the current producer execution and cann= ot > >> be saved/dumped neither transferrable between Amlogic SoCs supporting = this > >> modifier. =20 > >=20 > > I don't think this is suitable for modifiers. User-space relies on > > being able to copy a buffer from one machine to another over the > > network. It would be pretty annoying for user-space to have a blacklist > > of modifiers that don't work this way. > >=20 > > Example of such user-space: > > https://gitlab.freedesktop.org/mstoeckl/waypipe/ > > =20 >=20 > I really understand your point, but this is one of the use-cases we need = solve. > This is why I split the fourcc patch and added an explicit comment. >=20 > Please point me a way to display such buffer, the HW exists, works like t= hat and > it's a fact and can't change. >=20 > It will be the same for secure zero-copy buffers we can't map from usersp= ace, but > only the HW decoder can read/write and HW display can read. The comparison to secure buffers is a good one. Are buffers with the DRM_FORMAT_MOD_AMLOGIC_FBC_LAYOUT_SCATTER modifier meaningfully mmappable to CPU always / sometimes / never / varies-and-cannot-know? Maybe this type should be handled similar to secure buffers, with the exception that they are not actually secured but only mostly inaccessible. Then again, I haven't looked at any of the secure buffer proposals. Thanks, pq --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAl57YWEACgkQI1/ltBGq qqdFJQ//cD3K85nsCGKhXDmSyQzaQzhmiNbd/rn5U392CpaELlvtHKVFtGggN5zp l5MIb/EjYgZUHG220KklqCiZAzk+RLTmZnQPZmXPAnKobeeJLIGwHhKFBTozKG8t 9NLG8Gp1brFA7xVz63SSmZTUWFw4LP+HnMRIPPEGEpx6J4J3MJ8ikC+Utcvcs8yZ 1Be4E8s6cLRxcJPt4Q8PwhTNXtwdPxBL8aGhYB93Ptu30fGACCmUKCCtNyEo7PN+ qK2+eyZh3kB6Ktujsi+QqWgxtzIWtRH67ezkp3TlrqfFDQ8kH5guzfFfjb6coXW9 evJLwTgHoU/WZaOve3WVajKqfJdCbzzKFqBjaIeeA8RTWyWwHeBDpFA/G859H1OQ zd03sTrUz+uOl/k9ZpyG7dvReAijUA450FQe+c59lDWwWV94tRwbrFbjI3yh7R5q pl1bpuCFj5BVA74GEc8VzSNuqmqnqDltkiVAJ2BDi2heB5+2Pt+xZQlXz4rY4Ynl y9VLeSXlDxS7eJwsYjN9i3ra182eddULpxbdbdxPF7OVhpG2Wdhr7BFzdiNakBCM V7P7YUwFTOoNhiotZEKVpAnCQ7tIQgDxWRD/va+m6EmMhnjh0jDzb7nKz2a9y1FN UTiMucJoHEe0bxz94KaioKsNKAZQf7cNK1aUPkPF5qH+ORGgdVc= =oJGl -----END PGP SIGNATURE----- --Sig_/e3_VDQSNvzbMkOgJtm//89P-- 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=-2.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 149ADC1975A for ; Wed, 25 Mar 2020 13:49:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 730682076A for ; Wed, 25 Mar 2020 13:49:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gYjBHdMe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ue53poOk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 730682076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y4epxRL3a0vYjqMwxBJAyNiAJIJ4ulbLDjBTfDE+Fpk=; b=gYjBHdMem4QHObKJDvCWpP7Am Ly1C82zEY+ZzKG69tiXvP/cEx0lx5eyrv7kwHB5c+TsZLSVjQl95ylkZScYlNHnH8L9uesaMtY3Oi Cqx2F/GfKCRJP3yKFhCs/vGDlYGA2l4VsirWnE1fwM1qFFxQEvourUKNAHEgg63ZtfrqbPa4CcbYC Q4yWeRWHH2QIV7jboUnnjE3SeJIBgxK5zBxrbek6LAYVIQcjX6Q/5GvSx36RBETwRf2Gf1/2YyXDk NMaUfInQcr01+H2wr5+mjhZCjrPERTurqcNanXlYc6Z/dVgtP8w65MOGU670in95TjYuxUrnL/n4E /lJ/hVZLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH6Pc-0005xR-Vk; Wed, 25 Mar 2020 13:49:40 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH6PY-0005vZ-UU; Wed, 25 Mar 2020 13:49:38 +0000 Received: by mail-lj1-x241.google.com with SMTP id k21so2527843ljh.2; Wed, 25 Mar 2020 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=ue53poOk145/0Go2c3Fb090mulEi4KObzB4Gg55MF1CvN6x6lHk2Qf8lPZ5p5R3+G2 VP63zmjrCzKb82gf8jqzE7LJCcY3foHxfMdEijJbHSCvcWJLb0An2KtlnlYKqoF8gBtu ZM2ZexiOVhdnZg2Q8ll4+pRAHMR+Ez1aKDwmBNYhe6Nvsy5yNRJPt/igDUFQngqQ230s 7FxB2+dbcgoOMjaWWt/4YXpHnhCdt+5z1W+vDSn3fbKYHcojeMuflvme0hVgs/EFyIqc gbWuWSFjkBuKobaUJ4xQCX8QcyxxNW29g1kVgr4YR3BYFqnKx39KEE+s3zCzKixeZeWO yEpw== 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:in-reply-to :references:mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=H3qbSFNwwdbKC6yydHD5juzfoUOElFUVBHv6I0aKscq//sv58OsdJ4bN5JF36xB5f+ UqhvAX72IxMWhjWixHu65DjU+WuFR7OfSV/GO93/Ogjx3uGLdlFFBwAH0rIJ04uJ47tx dcu2TUCQZVSq6mEcpDGSW9ojWKlggHRWqXQ2arX8c27BeHbqcPG64CN2q3el2TV5TMnR A+qM0zOsCGcJxxvCPYNLUfzMhQvIMrTHRBmnMtwnVgoieli4wF619TMJtbiF+gu5glKB ct29CIVMMh5NOpstk8KFB+P8anahPSc4g8JRjpSINsYYCPQkRRKbSGvxkASMhQqrxCT4 2WJg== X-Gm-Message-State: AGi0PuZduFMeNug3ekW+YdaVNk0Vy6yEez19P26h2y7R9gVZy7QQbn8Z n8dfGUxffBs9j2Uaf1RfuOM= X-Google-Smtp-Source: APiQypIVWnohCBw6Laxl+KFUeZrUWln3GLJRYstirHtutpXWykkoScXzvviRjE1iqzvOz4cwkSo1ww== X-Received: by 2002:a2e:a362:: with SMTP id i2mr2084950ljn.52.1585144172471; Wed, 25 Mar 2020 06:49:32 -0700 (PDT) Received: from eldfell.localdomain ([194.136.85.206]) by smtp.gmail.com with ESMTPSA id f2sm6420123ljn.101.2020.03.25.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:49:31 -0700 (PDT) Date: Wed, 25 Mar 2020 15:49:21 +0200 From: Pekka Paalanen To: Neil Armstrong Subject: Re: [PATCH v4 7/8] drm/fourcc: amlogic: Add modifier definitions for the Scatter layout Message-ID: <20200325154921.2a87930c@eldfell.localdomain> In-Reply-To: References: <20200325085025.30631-1-narmstrong@baylibre.com> <20200325085025.30631-8-narmstrong@baylibre.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200325_064937_007078_D60DBCEF X-CRM114-Status: GOOD ( 16.51 ) 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: "mjourdan@baylibre.com" , Simon Ser , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Kevin Hilman , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: multipart/mixed; boundary="===============8501006469541730692==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8501006469541730692== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/e3_VDQSNvzbMkOgJtm//89P"; protocol="application/pgp-signature" --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 25 Mar 2020 11:24:15 +0100 Neil Armstrong wrote: > Hi, >=20 > On 25/03/2020 10:04, Simon Ser wrote: > > On Wednesday, March 25, 2020 9:50 AM, Neil Armstrong wrote: > > =20 > >> Amlogic uses a proprietary lossless image compression protocol and for= mat > >> for their hardware video codec accelerators, either video decoders or > >> video input encoders. > >> > >> This introduces the Scatter Memory layout, means the header contains I= OMMU > >> references to the compressed frames content to optimize memory access > >> and layout. > >> > >> In this mode, only the header memory address is needed, thus the conte= nt > >> memory organization is tied to the current producer execution and cann= ot > >> be saved/dumped neither transferrable between Amlogic SoCs supporting = this > >> modifier. =20 > >=20 > > I don't think this is suitable for modifiers. User-space relies on > > being able to copy a buffer from one machine to another over the > > network. It would be pretty annoying for user-space to have a blacklist > > of modifiers that don't work this way. > >=20 > > Example of such user-space: > > https://gitlab.freedesktop.org/mstoeckl/waypipe/ > > =20 >=20 > I really understand your point, but this is one of the use-cases we need = solve. > This is why I split the fourcc patch and added an explicit comment. >=20 > Please point me a way to display such buffer, the HW exists, works like t= hat and > it's a fact and can't change. >=20 > It will be the same for secure zero-copy buffers we can't map from usersp= ace, but > only the HW decoder can read/write and HW display can read. The comparison to secure buffers is a good one. Are buffers with the DRM_FORMAT_MOD_AMLOGIC_FBC_LAYOUT_SCATTER modifier meaningfully mmappable to CPU always / sometimes / never / varies-and-cannot-know? Maybe this type should be handled similar to secure buffers, with the exception that they are not actually secured but only mostly inaccessible. Then again, I haven't looked at any of the secure buffer proposals. Thanks, pq --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAl57YWEACgkQI1/ltBGq qqdFJQ//cD3K85nsCGKhXDmSyQzaQzhmiNbd/rn5U392CpaELlvtHKVFtGggN5zp l5MIb/EjYgZUHG220KklqCiZAzk+RLTmZnQPZmXPAnKobeeJLIGwHhKFBTozKG8t 9NLG8Gp1brFA7xVz63SSmZTUWFw4LP+HnMRIPPEGEpx6J4J3MJ8ikC+Utcvcs8yZ 1Be4E8s6cLRxcJPt4Q8PwhTNXtwdPxBL8aGhYB93Ptu30fGACCmUKCCtNyEo7PN+ qK2+eyZh3kB6Ktujsi+QqWgxtzIWtRH67ezkp3TlrqfFDQ8kH5guzfFfjb6coXW9 evJLwTgHoU/WZaOve3WVajKqfJdCbzzKFqBjaIeeA8RTWyWwHeBDpFA/G859H1OQ zd03sTrUz+uOl/k9ZpyG7dvReAijUA450FQe+c59lDWwWV94tRwbrFbjI3yh7R5q pl1bpuCFj5BVA74GEc8VzSNuqmqnqDltkiVAJ2BDi2heB5+2Pt+xZQlXz4rY4Ynl y9VLeSXlDxS7eJwsYjN9i3ra182eddULpxbdbdxPF7OVhpG2Wdhr7BFzdiNakBCM V7P7YUwFTOoNhiotZEKVpAnCQ7tIQgDxWRD/va+m6EmMhnjh0jDzb7nKz2a9y1FN UTiMucJoHEe0bxz94KaioKsNKAZQf7cNK1aUPkPF5qH+ORGgdVc= =oJGl -----END PGP SIGNATURE----- --Sig_/e3_VDQSNvzbMkOgJtm//89P-- --===============8501006469541730692== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8501006469541730692==-- 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=-2.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 5A644C54FD0 for ; Wed, 25 Mar 2020 13:49:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2CC0420663 for ; Wed, 25 Mar 2020 13:49:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ue53poOk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CC0420663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BE826E129; Wed, 25 Mar 2020 13:49:35 +0000 (UTC) Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A7E66E129 for ; Wed, 25 Mar 2020 13:49:34 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id f20so2555688ljm.0 for ; Wed, 25 Mar 2020 06:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=ue53poOk145/0Go2c3Fb090mulEi4KObzB4Gg55MF1CvN6x6lHk2Qf8lPZ5p5R3+G2 VP63zmjrCzKb82gf8jqzE7LJCcY3foHxfMdEijJbHSCvcWJLb0An2KtlnlYKqoF8gBtu ZM2ZexiOVhdnZg2Q8ll4+pRAHMR+Ez1aKDwmBNYhe6Nvsy5yNRJPt/igDUFQngqQ230s 7FxB2+dbcgoOMjaWWt/4YXpHnhCdt+5z1W+vDSn3fbKYHcojeMuflvme0hVgs/EFyIqc gbWuWSFjkBuKobaUJ4xQCX8QcyxxNW29g1kVgr4YR3BYFqnKx39KEE+s3zCzKixeZeWO yEpw== 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:in-reply-to :references:mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=RIU4i8Wr7pEG0h878+sxLvfX8+v3IxjvLEHFYQ7AzFQpS9Q+KbEqEyxHMOWZFfSkSF P5G3Lrs57Xsqn/Lvn4QnUzFGmvQ6xzMPH5NRkxHXF7HoLvgsSvpaCG2ctq/l9e/Gs2hz UzYrruV0sbJfZGYMH4j68QGrTFtJ/uzrrRsQF8HqEGLBnX5yzN9iNsrWeSHYzbsvCo+v JASroxfXsjeSX59hSYizXKk2MulG2pi99lpVLsVipAQTxZyAYk4VBqKuK3e01ylqnF8o 3xy8OlXZcd9WrQmYn8Z0nYAY1ouvYySFE4Roj//y+YuDieyxZVAq9wM4PRFMBRyuc+Tv ekxQ== X-Gm-Message-State: AGi0PubpLEgJd75mexHX/YRPx8bOMCK6jzSoqlF+GtUpm0fmcSHR043b GkonFtVKW1cwsL36scFARLQ= X-Google-Smtp-Source: APiQypIVWnohCBw6Laxl+KFUeZrUWln3GLJRYstirHtutpXWykkoScXzvviRjE1iqzvOz4cwkSo1ww== X-Received: by 2002:a2e:a362:: with SMTP id i2mr2084950ljn.52.1585144172471; Wed, 25 Mar 2020 06:49:32 -0700 (PDT) Received: from eldfell.localdomain ([194.136.85.206]) by smtp.gmail.com with ESMTPSA id f2sm6420123ljn.101.2020.03.25.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:49:31 -0700 (PDT) Date: Wed, 25 Mar 2020 15:49:21 +0200 From: Pekka Paalanen To: Neil Armstrong Subject: Re: [PATCH v4 7/8] drm/fourcc: amlogic: Add modifier definitions for the Scatter layout Message-ID: <20200325154921.2a87930c@eldfell.localdomain> In-Reply-To: References: <20200325085025.30631-1-narmstrong@baylibre.com> <20200325085025.30631-8-narmstrong@baylibre.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 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: "mjourdan@baylibre.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Kevin Hilman , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: multipart/mixed; boundary="===============0858414042==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============0858414042== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/e3_VDQSNvzbMkOgJtm//89P"; protocol="application/pgp-signature" --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 25 Mar 2020 11:24:15 +0100 Neil Armstrong wrote: > Hi, >=20 > On 25/03/2020 10:04, Simon Ser wrote: > > On Wednesday, March 25, 2020 9:50 AM, Neil Armstrong wrote: > > =20 > >> Amlogic uses a proprietary lossless image compression protocol and for= mat > >> for their hardware video codec accelerators, either video decoders or > >> video input encoders. > >> > >> This introduces the Scatter Memory layout, means the header contains I= OMMU > >> references to the compressed frames content to optimize memory access > >> and layout. > >> > >> In this mode, only the header memory address is needed, thus the conte= nt > >> memory organization is tied to the current producer execution and cann= ot > >> be saved/dumped neither transferrable between Amlogic SoCs supporting = this > >> modifier. =20 > >=20 > > I don't think this is suitable for modifiers. User-space relies on > > being able to copy a buffer from one machine to another over the > > network. It would be pretty annoying for user-space to have a blacklist > > of modifiers that don't work this way. > >=20 > > Example of such user-space: > > https://gitlab.freedesktop.org/mstoeckl/waypipe/ > > =20 >=20 > I really understand your point, but this is one of the use-cases we need = solve. > This is why I split the fourcc patch and added an explicit comment. >=20 > Please point me a way to display such buffer, the HW exists, works like t= hat and > it's a fact and can't change. >=20 > It will be the same for secure zero-copy buffers we can't map from usersp= ace, but > only the HW decoder can read/write and HW display can read. The comparison to secure buffers is a good one. Are buffers with the DRM_FORMAT_MOD_AMLOGIC_FBC_LAYOUT_SCATTER modifier meaningfully mmappable to CPU always / sometimes / never / varies-and-cannot-know? Maybe this type should be handled similar to secure buffers, with the exception that they are not actually secured but only mostly inaccessible. Then again, I haven't looked at any of the secure buffer proposals. Thanks, pq --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAl57YWEACgkQI1/ltBGq qqdFJQ//cD3K85nsCGKhXDmSyQzaQzhmiNbd/rn5U392CpaELlvtHKVFtGggN5zp l5MIb/EjYgZUHG220KklqCiZAzk+RLTmZnQPZmXPAnKobeeJLIGwHhKFBTozKG8t 9NLG8Gp1brFA7xVz63SSmZTUWFw4LP+HnMRIPPEGEpx6J4J3MJ8ikC+Utcvcs8yZ 1Be4E8s6cLRxcJPt4Q8PwhTNXtwdPxBL8aGhYB93Ptu30fGACCmUKCCtNyEo7PN+ qK2+eyZh3kB6Ktujsi+QqWgxtzIWtRH67ezkp3TlrqfFDQ8kH5guzfFfjb6coXW9 evJLwTgHoU/WZaOve3WVajKqfJdCbzzKFqBjaIeeA8RTWyWwHeBDpFA/G859H1OQ zd03sTrUz+uOl/k9ZpyG7dvReAijUA450FQe+c59lDWwWV94tRwbrFbjI3yh7R5q pl1bpuCFj5BVA74GEc8VzSNuqmqnqDltkiVAJ2BDi2heB5+2Pt+xZQlXz4rY4Ynl y9VLeSXlDxS7eJwsYjN9i3ra182eddULpxbdbdxPF7OVhpG2Wdhr7BFzdiNakBCM V7P7YUwFTOoNhiotZEKVpAnCQ7tIQgDxWRD/va+m6EmMhnjh0jDzb7nKz2a9y1FN UTiMucJoHEe0bxz94KaioKsNKAZQf7cNK1aUPkPF5qH+ORGgdVc= =oJGl -----END PGP SIGNATURE----- --Sig_/e3_VDQSNvzbMkOgJtm//89P-- --===============0858414042== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0858414042==-- 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=-2.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 CB2C8C43331 for ; Wed, 25 Mar 2020 13:49:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A182620663 for ; Wed, 25 Mar 2020 13:49:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s4Fa1WPA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ue53poOk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A182620663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7m/IPSvAe5Xg1uDg8qcGUPh2vwmZXCg1wQwTQYuiJ+M=; b=s4Fa1WPA2Az/pQVthrEQp4y25 y0o4Y26RFU8KRXerWlYSWvQE4Z3YpOIb2ClI5n5NRE0Jil1PHRwHsuOVa+uQoxGw2b9URlAfkci6r sVA3wpHwAewfdBSb/2u5CgG/F5psktFZurQfywK/OUwRYewYkxX1XrUwBgyJT6UkyMHrZeAEOVvkU UTlhg6EdLCGVMLEsQ3pEbeAMyeX9MNqlE7Jx1mBEfMVVNEZ4Ed8wj+DxpMMehp8zb4cEB4eWGudqL XEjSxuFhrs+TeTFjfzt6h7DFDbMtmgyVEcJFiOJBezu+rHhj81qRtygUGk5a8WamflkLQsemTxlmZ xd8SkqGjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH6Pb-0005wd-Mk; Wed, 25 Mar 2020 13:49:39 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH6PY-0005vZ-UU; Wed, 25 Mar 2020 13:49:38 +0000 Received: by mail-lj1-x241.google.com with SMTP id k21so2527843ljh.2; Wed, 25 Mar 2020 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=ue53poOk145/0Go2c3Fb090mulEi4KObzB4Gg55MF1CvN6x6lHk2Qf8lPZ5p5R3+G2 VP63zmjrCzKb82gf8jqzE7LJCcY3foHxfMdEijJbHSCvcWJLb0An2KtlnlYKqoF8gBtu ZM2ZexiOVhdnZg2Q8ll4+pRAHMR+Ez1aKDwmBNYhe6Nvsy5yNRJPt/igDUFQngqQ230s 7FxB2+dbcgoOMjaWWt/4YXpHnhCdt+5z1W+vDSn3fbKYHcojeMuflvme0hVgs/EFyIqc gbWuWSFjkBuKobaUJ4xQCX8QcyxxNW29g1kVgr4YR3BYFqnKx39KEE+s3zCzKixeZeWO yEpw== 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:in-reply-to :references:mime-version; bh=YDd4psw77+TjgR3LErHqB45pC2hCTAbwI5y4bLpGMCk=; b=H3qbSFNwwdbKC6yydHD5juzfoUOElFUVBHv6I0aKscq//sv58OsdJ4bN5JF36xB5f+ UqhvAX72IxMWhjWixHu65DjU+WuFR7OfSV/GO93/Ogjx3uGLdlFFBwAH0rIJ04uJ47tx dcu2TUCQZVSq6mEcpDGSW9ojWKlggHRWqXQ2arX8c27BeHbqcPG64CN2q3el2TV5TMnR A+qM0zOsCGcJxxvCPYNLUfzMhQvIMrTHRBmnMtwnVgoieli4wF619TMJtbiF+gu5glKB ct29CIVMMh5NOpstk8KFB+P8anahPSc4g8JRjpSINsYYCPQkRRKbSGvxkASMhQqrxCT4 2WJg== X-Gm-Message-State: AGi0PuZduFMeNug3ekW+YdaVNk0Vy6yEez19P26h2y7R9gVZy7QQbn8Z n8dfGUxffBs9j2Uaf1RfuOM= X-Google-Smtp-Source: APiQypIVWnohCBw6Laxl+KFUeZrUWln3GLJRYstirHtutpXWykkoScXzvviRjE1iqzvOz4cwkSo1ww== X-Received: by 2002:a2e:a362:: with SMTP id i2mr2084950ljn.52.1585144172471; Wed, 25 Mar 2020 06:49:32 -0700 (PDT) Received: from eldfell.localdomain ([194.136.85.206]) by smtp.gmail.com with ESMTPSA id f2sm6420123ljn.101.2020.03.25.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:49:31 -0700 (PDT) Date: Wed, 25 Mar 2020 15:49:21 +0200 From: Pekka Paalanen To: Neil Armstrong Subject: Re: [PATCH v4 7/8] drm/fourcc: amlogic: Add modifier definitions for the Scatter layout Message-ID: <20200325154921.2a87930c@eldfell.localdomain> In-Reply-To: References: <20200325085025.30631-1-narmstrong@baylibre.com> <20200325085025.30631-8-narmstrong@baylibre.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200325_064937_007078_D60DBCEF X-CRM114-Status: GOOD ( 16.51 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mjourdan@baylibre.com" , Simon Ser , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Kevin Hilman , "linux-amlogic@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: multipart/mixed; boundary="===============4517414167448278433==" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org --===============4517414167448278433== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/e3_VDQSNvzbMkOgJtm//89P"; protocol="application/pgp-signature" --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 25 Mar 2020 11:24:15 +0100 Neil Armstrong wrote: > Hi, >=20 > On 25/03/2020 10:04, Simon Ser wrote: > > On Wednesday, March 25, 2020 9:50 AM, Neil Armstrong wrote: > > =20 > >> Amlogic uses a proprietary lossless image compression protocol and for= mat > >> for their hardware video codec accelerators, either video decoders or > >> video input encoders. > >> > >> This introduces the Scatter Memory layout, means the header contains I= OMMU > >> references to the compressed frames content to optimize memory access > >> and layout. > >> > >> In this mode, only the header memory address is needed, thus the conte= nt > >> memory organization is tied to the current producer execution and cann= ot > >> be saved/dumped neither transferrable between Amlogic SoCs supporting = this > >> modifier. =20 > >=20 > > I don't think this is suitable for modifiers. User-space relies on > > being able to copy a buffer from one machine to another over the > > network. It would be pretty annoying for user-space to have a blacklist > > of modifiers that don't work this way. > >=20 > > Example of such user-space: > > https://gitlab.freedesktop.org/mstoeckl/waypipe/ > > =20 >=20 > I really understand your point, but this is one of the use-cases we need = solve. > This is why I split the fourcc patch and added an explicit comment. >=20 > Please point me a way to display such buffer, the HW exists, works like t= hat and > it's a fact and can't change. >=20 > It will be the same for secure zero-copy buffers we can't map from usersp= ace, but > only the HW decoder can read/write and HW display can read. The comparison to secure buffers is a good one. Are buffers with the DRM_FORMAT_MOD_AMLOGIC_FBC_LAYOUT_SCATTER modifier meaningfully mmappable to CPU always / sometimes / never / varies-and-cannot-know? Maybe this type should be handled similar to secure buffers, with the exception that they are not actually secured but only mostly inaccessible. Then again, I haven't looked at any of the secure buffer proposals. Thanks, pq --Sig_/e3_VDQSNvzbMkOgJtm//89P Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAl57YWEACgkQI1/ltBGq qqdFJQ//cD3K85nsCGKhXDmSyQzaQzhmiNbd/rn5U392CpaELlvtHKVFtGggN5zp l5MIb/EjYgZUHG220KklqCiZAzk+RLTmZnQPZmXPAnKobeeJLIGwHhKFBTozKG8t 9NLG8Gp1brFA7xVz63SSmZTUWFw4LP+HnMRIPPEGEpx6J4J3MJ8ikC+Utcvcs8yZ 1Be4E8s6cLRxcJPt4Q8PwhTNXtwdPxBL8aGhYB93Ptu30fGACCmUKCCtNyEo7PN+ qK2+eyZh3kB6Ktujsi+QqWgxtzIWtRH67ezkp3TlrqfFDQ8kH5guzfFfjb6coXW9 evJLwTgHoU/WZaOve3WVajKqfJdCbzzKFqBjaIeeA8RTWyWwHeBDpFA/G859H1OQ zd03sTrUz+uOl/k9ZpyG7dvReAijUA450FQe+c59lDWwWV94tRwbrFbjI3yh7R5q pl1bpuCFj5BVA74GEc8VzSNuqmqnqDltkiVAJ2BDi2heB5+2Pt+xZQlXz4rY4Ynl y9VLeSXlDxS7eJwsYjN9i3ra182eddULpxbdbdxPF7OVhpG2Wdhr7BFzdiNakBCM V7P7YUwFTOoNhiotZEKVpAnCQ7tIQgDxWRD/va+m6EmMhnjh0jDzb7nKz2a9y1FN UTiMucJoHEe0bxz94KaioKsNKAZQf7cNK1aUPkPF5qH+ORGgdVc= =oJGl -----END PGP SIGNATURE----- --Sig_/e3_VDQSNvzbMkOgJtm//89P-- --===============4517414167448278433== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic --===============4517414167448278433==--