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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 6CB75C43603 for ; Thu, 19 Dec 2019 23:31:22 +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 4803624676 for ; Thu, 19 Dec 2019 23:31:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4803624676 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC0C189D81; Thu, 19 Dec 2019 23:31:21 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id D85DC89D81 for ; Thu, 19 Dec 2019 23:31:20 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2019 15:31:20 -0800 X-IronPort-AV: E=Sophos;i="5.69,333,1571727600"; d="scan'208";a="210629772" Received: from ideak-desk.fi.intel.com ([10.237.72.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2019 15:31:17 -0800 Date: Fri, 20 Dec 2019 01:30:53 +0200 From: Imre Deak To: Matt Roper Message-ID: <20191219233053.GA8168@ideak-desk.fi.intel.com> References: <20191218161105.30638-1-imre.deak@intel.com> <20191218161105.30638-2-imre.deak@intel.com> <20191219210352.GB2712252@mdroper-desk1.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191219210352.GB2712252@mdroper-desk1.amr.corp.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [Intel-gfx] [PATCH 01/15] drm/framebuffer: Format modifier for Intel Gen-12 render compression X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: imre.deak@intel.com Cc: Nanley G Chery , intel-gfx@lists.freedesktop.org, Lucas De Marchi , Dhinakaran Pandiyan Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Dec 19, 2019 at 01:03:52PM -0800, Matt Roper wrote: > On Wed, Dec 18, 2019 at 06:10:51PM +0200, Imre Deak wrote: > > From: Dhinakaran Pandiyan > > = > > Gen-12 has a new compression format, add a new modifier to indicate tha= t. > = > There's been some recent hallway chat about this, but it might be worth > naming this "TGL" rather then "GEN12" and using a fresh modifier even if > future gen12+ platforms seemingly have the same general CCS layout and > programming model. Using the same modifier between multiple platforms > implies that the data format truly is compatible between them and that > one platform can consume the surfaces generated by another (even if you > can't do direct sharing via dma_buf, you could theoretically copy buffer > contents over the network, save/restore buffers from disk, etc.). Even > if things look identical at the bspec level, there's no guarantee that > the hardware guys won't tweak the underlying compression algorithm > between platforms in a way that makes the buffers generated by one GPU > incompatible with a different platform. > = > In fact we've already seen one instance of this type of incompatibility > --- EHL/JSL's GT uses a very slightly different packing format than ICL > did. In that case there was a chicken register we could use to make the > EHL GT use the ICL-style packing (and we had to set this bit anyway for > the display controller to be able to consume GT-rendered buffers). But > going forward I think we probably want to use per-platform modifiers > rather than per-generation modifiers by default. Okay, however, the possibility to share the buffers between GPUs (without having to decompress/recompress) is an important feature imo, so I wouldn't be surprised if HW would be designed with this in mind. Some kind of architecture document proposed actually these modifier names, not sure if the authors of that didn't think about buffer sharing. Can't we assume that the design would be sensible and call the format that is shareable at least among GEN12 platforms GEN12? I think we could use a new modifier name for a platform generating an incompatible format. I agree that we should make sure the buffers are truly shareable before allowing to share modifier names. --Imre > = > Matt > = > > = > > Cc: Ville Syrj=E4l=E4 > > Cc: Matt Roper > > Cc: Nanley G Chery > > Cc: Jason Ekstrand > > Signed-off-by: Dhinakaran Pandiyan > > Signed-off-by: Lucas De Marchi > > Signed-off-by: Imre Deak > > --- > > include/uapi/drm/drm_fourcc.h | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > = > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourc= c.h > > index 8caaaf7ff91b..5ba481f49931 100644 > > --- a/include/uapi/drm/drm_fourcc.h > > +++ b/include/uapi/drm/drm_fourcc.h > > @@ -410,6 +410,17 @@ extern "C" { > > #define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) > > #define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) > > = > > +/* > > + * Intel color control surfaces (CCS) for Gen-12 render compression. > > + * > > + * The main surface is Y-tiled and at plane index 0, the CCS is linear= and > > + * at index 1. A 64B CCS cache line corresponds to an area of 4x1 tile= s in > > + * main surface. In other words, 4 bits in CCS map to a main surface c= ache > > + * line pair. The main surface pitch is required to be a multiple of f= our > > + * Y-tile widths. > > + */ > > +#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) > > + > > /* > > * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macrobloc= ks > > * > > -- = > > 2.22.0 > > = > = > -- = > Matt Roper > Graphics Software Engineer > VTT-OSGC Platform Enablement > Intel Corporation > (916) 356-2795 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx