Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2647518rda; Wed, 25 Oct 2023 08:31:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8ir8XAWvVTGEN+sa0F+Q8pzvqGAq2fryhJXhAICxLtMpURxZ4UVilnqwk/CXkGRiY3iPv X-Received: by 2002:a67:c18e:0:b0:44d:4d5f:79a4 with SMTP id h14-20020a67c18e000000b0044d4d5f79a4mr14863953vsj.20.1698247883162; Wed, 25 Oct 2023 08:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698247883; cv=none; d=google.com; s=arc-20160816; b=qNT7dpbDSKp778qpTFz1cwYqqRS4iPvPOFMYYSH40kH3J1rjn//kvJxgH4kAmJhlN1 Ok0HW8rZZK1BvBtrHodzKyBzaVnApyj7WaiRXAyDeq0NdqOYCmYIlH+/MtjsJquhGjZu uaWrBlUlbzpdBvzCCMXhHta71CzIT9iVy7sjcohayU/WECnQ9pXjIV/2Nal7gjQVQvT/ u7z2yyu1vj9k1AkYNCSvvlOwQaMnl6yGm12ErHIbO4Z+PkXj5EzhVAFFNQ+24jvNf6a2 xqlkkExp2dTHrLP8Ec7NwklxOKpJ9/eoTQRIggGFAulfFkV4yuDpDC96VpshhZ6H182j vHmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8/OEf6wY4K8LL5fCd9Dam3mad0hP6D3Fcdj2bC0ObXE=; fh=UWNmwoGCyLVYP/JE6iIxIAaJceSPQ2SHZyV/32fqg8c=; b=YW8UssbOuXu9pDVyHcyTmY3QgRYIhPOHoBnkByNU/5lFrLRuMM/dzBsBCYjfRTH4PM UT1LoMKjHECC6Bx+esRmoqBB6S/4WOJ24A2tJpcTM49uaBcSjoIBTx8gdqK3/9oMx9rZ Dxjt2wlPkqeYtUUUXb/f0gK+A+/VqcStaI2HfC4paLPeoh4S5e96EFofM4acoG+UP+5m BIbQjpAnJ/JPCH1KsxsXUcf0ZH+GlSazZrQwoZgJMZQwxD4QJj3QJbSPOeSjOGFGBcQ3 bWmgc9eEaWJqiAqGkgTXEuiGJ6WehFRa0u8eVEGd8qczAFx7X4fU+o254W/ZEyuoVQsp kXdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xW43IF8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bf2-20020a0561023a6200b0044e8b0d4fd7si1173666vsb.724.2023.10.25.08.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:31:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xW43IF8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 863598082715; Wed, 25 Oct 2023 08:30:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232621AbjJYPaF (ORCPT + 99 others); Wed, 25 Oct 2023 11:30:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235234AbjJYP3u (ORCPT ); Wed, 25 Oct 2023 11:29:50 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E1161990 for ; Wed, 25 Oct 2023 08:28:15 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-66d17bdabe1so39975096d6.0 for ; Wed, 25 Oct 2023 08:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698247691; x=1698852491; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8/OEf6wY4K8LL5fCd9Dam3mad0hP6D3Fcdj2bC0ObXE=; b=xW43IF8AQEwDX+cYuI/NbiRfB2POLxdGkH0WoNUe/y3dSi+EcIbq3ItiosYFEXrcyg TgQNhXITQbMZZmIjPWCi5TBs2GxIzBg8MRqXpmTmMxS8oLyE9ZZYxOM2Em3y9E3pq5v9 sRScR0FfKvI0k9aUnTU1Y9YzYMU+ecmL5A3wy04VW5C7C4n2vXdif79yXOXMd9WipWrt 6QbxOhhMOAp+ZwXlUzZk75eP59BMT6TK2m0MKq6tvMmzW50UN0mftxt4rND1npwwrAHz w4HayfcRXdpNS2ayrgYkKuB7ZsD+XT3qS4WTdQ9WMD20NWDeCDp3ovaIrg+pIFgp4+0G +5xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698247691; x=1698852491; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8/OEf6wY4K8LL5fCd9Dam3mad0hP6D3Fcdj2bC0ObXE=; b=kJiS8I7DLp87a1IjI5AeW12tdFdkSetZiC50iBCM2KDT7dzn1mEYS+v8NwikNXzNiL 9AZq2ej4mQQ62lalg7FdQyjWqPaAqJIe67fJSOkK97DsN4xKG/vPvIVpvZfRbFbTzViV C5xwmh5NfBv38xAeZ02ti5dXZvSN3/Qwt96VmvdEuyqQTLurj0c9vt+ze3IrxjOWIuC+ 86mPOMg1JqQ1UIi5Bb4LLhEer/SpGX5bASelgfO4qM/A7cbED6u4l/4rgVob/I0+U1Ue 3ZU4tITsaRV8GSMeHhHUxaK00HC1+a5PIFFlDan8wwJgGAuI1jw2mfX3YdV8Yr3qF0qA 6xcw== X-Gm-Message-State: AOJu0YwtcNLbhzpFAn1cOtJcQ89ZXrSgHLwynPBcUZ0RVOFquAyYj4Tl oVqr/YABwJIgw+g24dVpt6iWAw== X-Received: by 2002:a05:6214:2586:b0:66d:1d22:42d8 with SMTP id fq6-20020a056214258600b0066d1d2242d8mr20338672qvb.11.1698247691667; Wed, 25 Oct 2023 08:28:11 -0700 (PDT) Received: from [192.168.1.212] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id g24-20020a37e218000000b007671b599cf5sm4280080qki.40.2023.10.25.08.28.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 08:28:10 -0700 (PDT) Message-ID: <6f145485-c330-4a89-9e5a-af35d0b72e21@linaro.org> Date: Wed, 25 Oct 2023 18:28:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/6] drm/fourcc: Add drm/vs tiled modifiers Content-Language: en-GB To: Keith Zhao , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Cc: Krzysztof Kozlowski , Sumit Semwal , Emil Renner Berthing , Shengyang Chen , Conor Dooley , Albert Ou , Thomas Zimmermann , Maxime Ripard , Jagan Teki , Rob Herring , Chris Morgan , Paul Walmsley , Bjorn Andersson , Changhuang Liang , Jack Zhu , Palmer Dabbelt , Shawn Guo , christian.koenig@amd.com References: <20231025103957.3776-1-keith.zhao@starfivetech.com> <20231025103957.3776-4-keith.zhao@starfivetech.com> From: Dmitry Baryshkov In-Reply-To: <20231025103957.3776-4-keith.zhao@starfivetech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:30:45 -0700 (PDT) On 25/10/2023 13:39, Keith Zhao wrote: > For each modifier, add the corresponding description > > Signed-off-by: Keith Zhao > --- > include/uapi/drm/drm_fourcc.h | 57 +++++++++++++++++++++++++++++++++++ > 1 file changed, 57 insertions(+) > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index 8db7fd3f7..a580a848c 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -419,6 +419,7 @@ extern "C" { > #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 > #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 > #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a > +#define DRM_FORMAT_MOD_VENDOR_VERISILICON 0x0b > > /* add more to the end as needed */ > > @@ -1562,6 +1563,62 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) > #define AMD_FMT_MOD_CLEAR(field) \ > (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT)) > > +#define DRM_FORMAT_MOD_VERISILICON_TYPE_NORMAL 0x00 > +#define DRM_FORMAT_MOD_VERISILICON_TYPE_MASK ((__u64)0x3 << 54) > + > +#define fourcc_mod_vs_code(type, val) \ > + fourcc_mod_code(VERISILICON, ((((__u64)type) << 54) | (val))) Please use fourcc_mode_code directly. > + > +#define DRM_FORMAT_MOD_VERISILICON_NORM_MODE_MASK 0x1F > + > +/* > + * An x-major 8x8 super tile consists of 64 8x8 sub-tiles in total. > + * Each 8x8 sub-tile consists of four standard tiles . > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_SUPER_TILED_XMAJOR_8X8 0x02 > + > +/* > + * A y-major 8x8 super tile consists of 64 8x8 sub-tiles in total. > + * Each 8x8 sub-tile consists of four standard tiles . > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_SUPER_TILED_YMAJOR_8X8 0x03 > + > +/* > + * An 8x8 tile consists of four standard tiles > + * that are organized in Z-order. > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_TILE_8X8 0x04 > + > +/* > + * An 8x4 tile consists of two standard tiles > + * that are organized in Z-order. > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_TILE_8X4 0x07 > + > +/* > + * An x-major 8x4 super tile consists of 128 8x4 sub-tiles in total. > + * Each 8x4 sub-tile consists of two standard tiles. > + * two standard tiles also same with DRM_FORMAT_MOD_VS_TILE_8X4 > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_SUPER_TILED_XMAJOR_8X4 0x0B > + > +/* > + * A y-major 4x8 super tile consists of 128 4x8 sub-tiles in total. > + * Each 4x8 sub-tile consists of two standard tiles. > + * two standard tiles also same with DRM_FORMAT_MOD_VS_TILE_8X4 > + * standard tiles (see Vivante 4x4 tiling layout) > + */ > +#define DRM_FORMAT_MOD_VERISILICON_SUPER_TILED_YMAJOR_4X8 0x0C > + > +#define fourcc_mod_vs_norm_code(tile) \ > + fourcc_mod_vs_code(DRM_FORMAT_MOD_VERISILICON_TYPE_NORMAL, \ > + (tile)) 1) this is not a part of uAPI 2) please use fourcc_mod_code directly. > + > #if defined(__cplusplus) > } > #endif -- With best wishes Dmitry