Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp463358ybn; Thu, 3 Oct 2019 07:35:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbUDvIsGq0X0I0GApRo7txGr455CONnMvdfMtZlncIz3QdO/1dGl+x6+BzXYZiA+QmI4KY X-Received: by 2002:a05:6402:696:: with SMTP id f22mr9816822edy.216.1570113327651; Thu, 03 Oct 2019 07:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570113327; cv=none; d=google.com; s=arc-20160816; b=Wfwktdw7kHfdsf4U/qOHUKzckndUVma9Fs7XL/vJddZirD8vVMsDkbGt9b2kkrt+sr BFMtrAg4xe4FpIifmG3d2O9KnzzTO/v01H/1a3bwN1qCZxRop87Tj9KVW0q/7L+LtBn5 6DvDHAydBgkgEHsSBES/Jh2+9sc2CwcMxgxNPvkMXOCjKWxvRzKNPyF/7xICvQsqYP/9 f9V1czii57Q7vXJuDSBZa/636DMLSMQAAJp0hFM5vFtJui1wXiwoj4NOn6hOYCDbydEF zYp4Yl3bXeWNfX/W9lNtioInfK+/XpdPoj22ZeX4IGVX3uSM4nK/335ZOPdMWRcM9kao cLFg== 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=9HKr4/cJ7iq9izM911rBXPiwq2ApQcWOC8a/94M//WE=; b=gP1FHyKqLDk8ORUunEngVXuL8lFN5X4Wam66O27DUVUjfBm8IFqdiqAOqxONIP61ZK MB05qLI8V3w7qtTxDrrtLfeqRlKLq3y+BRX8zuPfz92Eo9s5KocwaslEhiq3h1r1D7u9 aRfv366wQgavxYiQ8mBfN5m0Cn3kY/ZtvlBf4gStpxHHQc1q1WPeFNxZgJgjCraKGLSC 1IOd1uLu3YjKNtGGn31dEHZGcIxSG9DYC5lFE5BopEL2ql+T8q9jEt6LWerOMFPDtGQO yVU7GBhigTHvgbnS/X/vP6D4RUPQV97lSt9O63QsFJFG/TzewiVAmOVV7akToBuR9sB2 ssVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g44SEnrz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si1646608edc.291.2019.10.03.07.35.02; Thu, 03 Oct 2019 07:35:27 -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=@gmail.com header.s=20161025 header.b=g44SEnrz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730422AbfJCNaB (ORCPT + 99 others); Thu, 3 Oct 2019 09:30:01 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:32923 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730415AbfJCNaB (ORCPT ); Thu, 3 Oct 2019 09:30:01 -0400 Received: by mail-io1-f65.google.com with SMTP id z19so5576747ior.0 for ; Thu, 03 Oct 2019 06:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9HKr4/cJ7iq9izM911rBXPiwq2ApQcWOC8a/94M//WE=; b=g44SEnrzA2qar8s97gk4B/ztcRe7nTTl5c5ZcAd2Fs/CLz8539Me0WXGCkws3eYC44 nYJ856R6/Ctbz9ZanNHCEx5MgYTxSy8BWyormOEux3XHMKOt+15xHMfbJ1h7MTk5yTDg 7o2TeE6YzevPbPGeqmrVXTUwiqZVEZZUtsDb2ZmpuFkFongRBKYVHWAdfpGS+zcYv+qV 7yvEPlPL6GlBY/P1+kKaPrJip7yCaf8zsQpUiNm+BwBO5NVhLopDZ8H7xCjsXcVCPkyJ RBf4dLgTtliQZzlKAZ0S2mhxym+ilnXZSfYPXNrat0TpShqSk0/h7lOGAjzqikTXqCHH Q5aQ== 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=9HKr4/cJ7iq9izM911rBXPiwq2ApQcWOC8a/94M//WE=; b=SuM2V+Fl6A/UvNJBk+Q6oUfD3hlwGGWCbxgxtLmLTUOKlzkRrmyKZy7OlZ7Oou9C00 Yg73rcHtmMBMaHLqZK2K99JGNOYhWsRy7hOuyK6UwEfEDpbAgsWSHwpP3zwLeKva23AB b7xkir8839meaLbJBMBGX2aH9h73jcg8eUy04E1EVawYYs6iAVZawdKPQmy0WAuoR59t aFbWWmXsGcdXLuKkCoCDDEHjAnk+8/BdhxmzfkAYP9DKkFC6c7sHk4OJE00OYKq/o2GR RpC1W3k+oYJGf/VCXpe4U2keAGXeYioBZGjv/wIW4Hbi8PIo2Ebb47hSHE+cyDW74xo5 iJQQ== X-Gm-Message-State: APjAAAUyRwBObSCMxd6SG5OZquuDoG+mo9iLST5kuBsFzBHn3higowQ9 yTNWGQ9b6qru4AjuhHLfXB/2q+NBQKIFkK/RhCrfdKDj X-Received: by 2002:a92:aa87:: with SMTP id p7mr9947589ill.7.1570109400135; Thu, 03 Oct 2019 06:30:00 -0700 (PDT) MIME-Version: 1.0 References: <20190930164425.20282-1-ayan.halder@arm.com> In-Reply-To: <20190930164425.20282-1-ayan.halder@arm.com> From: Qiang Yu Date: Thu, 3 Oct 2019 21:29:48 +0800 Message-ID: Subject: Re: [PATCH v2] drm/fourcc: Add Arm 16x16 block modifier To: Ayan Halder Cc: Liviu Dudau , Brian Starkey , "malidp@foss.arm.com" , "airlied@linux.ie" , "maarten.lankhorst@linux.intel.com" , "maxime.ripard@bootlin.com" , "sean@poorly.run" , "daniel@ffwll.ch" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , nd , Raymond Smith 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 Hi Ayan, Thanks for the patch. I'm OK with either the static reserved type way or the previous dynamic way. So this patch is: Reviewed-by: Qiang Yu PS. for anyone would like to know the usage of this modifier, lima mesa driver need this modifier to denote some tiled texture format and shared between client and display server. Regards, Qiang On Tue, Oct 1, 2019 at 12:45 AM Ayan Halder 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. > > Changes from v1:- > 1. Reserved the upper four bits (out of the 56 bits assigned to each vendor) > to denote the category of Arm specific modifiers. Currently, we have two > categories ie AFBC and MISC. > > Signed-off-by: Raymond Smith > Signed-off-by: Ayan kumar halder > --- > include/uapi/drm/drm_fourcc.h | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index 3feeaa3f987a..b1d3de961109 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -648,7 +648,21 @@ extern "C" { > * Further information on the use of AFBC modifiers can be found in > * Documentation/gpu/afbc.rst > */ > -#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode) > + > +/* > + * The top 4 bits (out of the 56 bits alloted for specifying vendor specific > + * modifiers) denote the category for modifiers. Currently we have only two > + * categories of modifiers ie AFBC and MISC. We can have a maximum of sixteen > + * different categories. > + */ > +#define DRM_FORMAT_MOD_ARM_CODE(type, val) \ > + fourcc_mod_code(ARM, ((__u64)type << 52) | ((val) & 0x000fffffffffffffULL)) > + > +#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00 > +#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01 > + > +#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) \ > + DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode) > > /* > * AFBC superblock size > @@ -742,6 +756,17 @@ 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 \ > + DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL) > + > + > /* > * Allwinner tiled modifier > * > -- > 2.23.0 >