Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp807609ybi; Fri, 21 Jun 2019 08:29:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe0xktr3gt4a6CzxvxXVqKU9CujWzlJ5KFx2nipBGFZrYglj/3SX9hELLADZUwlBcnkk6d X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr108569996plz.38.1561130968869; Fri, 21 Jun 2019 08:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561130968; cv=none; d=google.com; s=arc-20160816; b=qE4SU12xv9zb2sLtO2nFIG7ZeZAUS7JDrijpMARTY3dSQ2eaFYgwHK/kA8QFYz5+9A Z4UgfTvw1+TjABfAFUHEUR8cbfZZXqk2mkYe4mVCesw7sIAlmjUNa2r/T8vNrG/uowb6 kcOVPwchi2itlqA4DvYDIGfeeKoOEEyk4aNhfp/bU41vrd0wfi9LaDjr/bhYOQvwRahL k/R0vXDlwspi7U7RMdOVQCVSaUp7baxKdw8MM28AwLFcB+qIqlAvRt8lgQUG7kTCHMcE 3ZA1ux4T/IGCKKGlw23r/YQvX90bMc0F+PIzA5eBo+spiuH1Mj9dcVqDPwLBX59YG2+6 1eCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=r/y2umFI+hLi0gqB/rGAubbWLUwkck+57yGiyeuQgSY=; b=iF21gb4GtwohtAb1wg3J07AHdgIJgCrfwqTk5iUUsqSkUsS8PRx9yHdnMww8V+zW8+ /YYSQvJ5to4ufFLwWjUZsnavwxHfVhlZPMHYntUz+jeRiHOfAqp2ERTZkHX60EZrIOMJ GOrFSoZ5XkxRLANRQI0Bc3sLLKFKdnK15/e+/5VhZAmhpA52yJbr5s2gAj9jVOpslMwn TqEeYcFh2ts7Rp6QLEEVt+O6RWzsK3BF3MpoHohyvtwnxKNF8FlQvE+1l5S9DdWFAc9r xKce608JQ3QbWlvaZm+FHfvr0zQPwxs5Gl134ELBa/IwUvSkbDRnchPVq6GgA7fq8mV6 Y8ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IckKuSoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si2952771pjs.63.2019.06.21.08.29.13; Fri, 21 Jun 2019 08:29:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IckKuSoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726231AbfFUP1S (ORCPT + 99 others); Fri, 21 Jun 2019 11:27:18 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:38557 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfFUP1Q (ORCPT ); Fri, 21 Jun 2019 11:27:16 -0400 Received: by mail-ot1-f65.google.com with SMTP id d17so6692863oth.5 for ; Fri, 21 Jun 2019 08:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r/y2umFI+hLi0gqB/rGAubbWLUwkck+57yGiyeuQgSY=; b=IckKuSoiNlAN+R3Z7KagwwSqiMULpfnyYjhGFqV3B10qOS3tAz5qWzbravJhLfm7Nn MBM47QBtmecN/B9H/8yM571Y8ymLkyQDWRh8HrG5CiN4gKyxfKwjuhVrpgLPKjtkGOwl Qu3S509r9QsAZGUnh9qhM/im3oxrR62oXDIJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r/y2umFI+hLi0gqB/rGAubbWLUwkck+57yGiyeuQgSY=; b=qEZbO2s82hCdpXFtotZnetCB0Sj141uio17DvioXJZpYf7aR3U4baprtMXyD0OJ/tQ AVM3gnJ0YeVZcBD8+Yydi34SEQQCMFKDfngn6Za14JJI4g3m0ewF02I1K0a0yrrL1hiD doeS9ibOzRAsHdW/4DlFAsq+XpEv+7r4rXSFQHL5D71HTBZmgGJfBUP97gsAuScwqzgO 8/LqcB8TSrzI+rUpjI9BetPYnioKJXPvB1slMqdVBnZtzZftKrYcfsZK5XiemlSZmDkr H/rQRQTYoxLMumGK617pFQvLxmi9v4gk1SThMejnendEBL3o6QKUHq5WAYtnWhQMcgiy V7HA== X-Gm-Message-State: APjAAAWZI6dVta2TYkXNl3k+6YROK91aBsYHozwIcLOuyGbP4XnDyqax 2NaAczwgiQXPW43HdOF047c89ciH0xgMI0ClUmj9HaoF X-Received: by 2002:a9d:4b95:: with SMTP id k21mr6328797otf.281.1561130835867; Fri, 21 Jun 2019 08:27:15 -0700 (PDT) MIME-Version: 1.0 References: <1561112433-5308-1-git-send-email-raymond.smith@arm.com> In-Reply-To: <1561112433-5308-1-git-send-email-raymond.smith@arm.com> From: Daniel Vetter Date: Fri, 21 Jun 2019 17:27:00 +0200 Message-ID: Subject: Re: [PATCH] drm/fourcc: Add Arm 16x16 block modifier To: Raymond Smith Cc: "maarten.lankhorst@linux.intel.com" , "maxime.ripard@bootlin.com" , "sean@poorly.run" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "yuq825@gmail.com" , Ayan Halder , Brian Starkey , "malidp@foss.arm.com" , nd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 12:21 PM Raymond Smith wrote: > > Add the DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED modifier to > denote the 16x16 block u-interleaved format used in Arm Utgard and > Midgard GPUs. > > Signed-off-by: Raymond Smith > --- > include/uapi/drm/drm_fourcc.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index 3feeaa3..8ed7ecf 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -743,6 +743,16 @@ extern "C" { > #define AFBC_FORMAT_MOD_BCH (1ULL << 11) > > /* > + * Arm 16x16 Block U-Interleaved modifier > + * > + * This is used by Arm Mali Utgard and Midgard GPUs. It divides the image > + * into 16x16 pixel blocks. Blocks are stored linearly in order, but pixels > + * in the block are reordered. > + */ > +#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \ > + fourcc_mod_code(ARM, ((1ULL << 55) | 1)) This seems to be an extremely random pick for a new number. What's the thinking here? Aside from "doesnt match any of the afbc combos" ofc. If you're already up to having thrown away 55bits, then it's not going to last long really :-) I think a good idea would be to reserve a bunch of the high bits as some form of index (afbc would get index 0 for backwards compat). And then the lower bits would be for free use for a given index/mode. And the first mode is probably an enumeration, where possible modes simple get enumerated without further flags or anything. The other bit: Would be real good to define the format a bit more precisely, including the layout within the tile. Also ofc needs acks from lima/panfrost people since I assume they'll be using this, too. Thanks, Daniel > + > +/* > * Allwinner tiled modifier > * > * This tiling mode is implemented by the VPU found on all Allwinner platforms, > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch