From: Eric Anholt <eric@anholt.net>
To: "Kristian Høgsberg" <hoegsberg@gmail.com>,
"Alex Deucher" <alexdeucher@gmail.com>
Cc: "Rob Clark" <rclark@redhat.com>,
"Chad Versace" <chadversary@chromium.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
"Jason Ekstrand" <jason.ekstrand@intel.com>,
"Kristian Høgsberg" <hoegsberg@google.com>,
"Ben Skeggs" <bskeggs@redhat.com>,
"Miguel Angel Vico" <mvicomoya@nvidia.com>,
mesa-dev <mesa-dev@lists.freedesktop.org>,
"Lyude Paul" <cpaul@redhat.com>,
"Nicolai Hähnle" <nhaehnle@gmail.com>
Subject: Re: [Mesa-dev] Allocator Nouveau driver, Mesa EXT_external_objects, and DRM metadata import interfaces
Date: Thu, 22 Feb 2018 11:21:34 -0800 [thread overview]
Message-ID: <87fu5sakzl.fsf@anholt.net> (raw)
In-Reply-To: <CAOeoa-f7WZSAXascwMstAGc9uEq8Z--AB0UGMKbdYe1+gHxz-g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 6355 bytes --]
Kristian Høgsberg <hoegsberg@gmail.com> writes:
> On Wed, Feb 21, 2018 at 4:00 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
>> On Wed, Feb 21, 2018 at 1:14 AM, Chad Versace <chadversary@chromium.org>
> wrote:
>> > On Thu 21 Dec 2017, Daniel Vetter wrote:
>> >> On Thu, Dec 21, 2017 at 12:22 AM, Kristian Kristensen <
> hoegsberg@google.com> wrote:
>> >>> On Wed, Dec 20, 2017 at 12:41 PM, Miguel Angel Vico <
> mvicomoya@nvidia.com> wrote:
>> >>>> On Wed, 20 Dec 2017 11:54:10 -0800 Kristian Høgsberg <
> hoegsberg@gmail.com> wrote:
>> >>>>> I'd like to see concrete examples of actual display controllers
>> >>>>> supporting more format layouts than what can be specified with a 64
>> >>>>> bit modifier.
>> >>>>
>> >>>> The main problem is our tiling and other metadata parameters can't
>> >>>> generally fit in a modifier, so we find passing a blob of metadata a
>> >>>> more suitable mechanism.
>> >>>
>> >>> I understand that you may have n knobs with a total of more than a
> total of
>> >>> 56 bits that configure your tiling/swizzling for color buffers. What
> I don't
>> >>> buy is that you need all those combinations when passing buffers
> around
>> >>> between codecs, cameras and display controllers. Even if you're
> sharing
>> >>> between the same 3D drivers in different processes, I expect just
> locking
>> >>> down, say, 64 different combinations (you can add more over time) and
>> >>> assigning each a modifier would be sufficient. I doubt you'd extract
>> >>> meaningful performance gains from going all the way to a blob.
>> >
>> > I agree with Kristian above. In my opinion, choosing to encode in
>> > modifiers a precise description of every possible tiling/compression
>> > layout is not technically incorrect, but I believe it misses the point.
>> > The intention behind modifiers is not to exhaustively describe all
>> > possibilites.
>> >
>> > I summarized this opinion in VK_EXT_image_drm_format_modifier,
>> > where I wrote an "introdution to modifiers" section. Here's an excerpt:
>> >
>> > One goal of modifiers in the Linux ecosystem is to enumerate for
> each
>> > vendor a reasonably sized set of tiling formats that are
> appropriate for
>> > images shared across processes, APIs, and/or devices, where each
>> > participating component may possibly be from different vendors.
>> > A non-goal is to enumerate all tiling formats supported by all
> vendors.
>> > Some tiling formats used internally by vendors are inappropriate for
>> > sharing; no modifiers should be assigned to such tiling formats.
>
>> Where it gets tricky is how to select that subset? Our tiling mode
>> are defined more by the asic specific constraints than the tiling mode
>> itself. At a high level we have basically 3 tiling modes (out of 16
>> possible) that would be the minimum we'd want to expose for gfx6-8.
>> gfx9 uses a completely new scheme.
>> 1. Linear (per asic stride requirements, not usable by many hw blocks)
>> 2. 1D Thin (5 layouts, displayable, depth, thin, rotated, thick)
>> 3. 2D Thin (1D tiling constraints, plus pipe config (18 possible),
>> tile split (7 possible), sample split (4 possible), num banks (4
>> possible), bank width (4 possible), bank height (4 possible), macro
>> tile aspect (4 possible) all of which are asic config specific)
>
>> I guess we could do something like:
>> AMD_GFX6_LINEAR_ALIGNED_64B
>> AMD_GFX6_LINEAR_ALIGNED_256B
>> AMD_GFX6_LINEAR_ALIGNED_512B
>> AMD_GFX6_1D_THIN_DISPLAY
>> AMD_GFX6_1D_THIN_DEPTH
>> AMD_GFX6_1D_THIN_ROTATED
>> AMD_GFX6_1D_THIN_THIN
>> AMD_GFX6_1D_THIN_THICK
>
> AMD_GFX6_2D_1D_THIN_DISPLAY_PIPE_CONFIG_P2_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_DEPTH_PIPE_CONFIG_P2_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_ROTATED_PIPE_CONFIG_P2_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_THIN_PIPE_CONFIG_P2_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_THICK_PIPE_CONFIG_P2_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_DISPLAY_PIPE_CONFIG_P4_8x16_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_DEPTH_PIPE_CONFIG_P4_8x16_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_ROTATED_PIPE_CONFIG_P4_8x16_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_THIN_PIPE_CONFIG_P4_8x16_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>
> AMD_GFX6_2D_1D_THIN_THICK_PIPE_CONFIG_P4_8x16_TILE_SPLIT_64B_SAMPLE_SPLIT_1_NUM_BANKS_2_BANK_WIDTH_1_BANK_HEIGHT_1_MACRO_TILE_ASPECT_1
>> etc.
>
>> We only probably need 40 bits to encode all of the tiling parameters
>> so we could do family, plus tiling encoding that still seems unwieldy
>> to deal with from an application perspective. All of the parameters
>> affect the alignment requirements.
>
> We discussed this earlier in the thread, here's what I said:
>
> Another point here is that the modifier doesn't need to encode all the
> thing you have to communicate to the HW. For a given width, height, format,
> compression type and maybe a few other high-level parameters, I'm skeptical
> that the remaining tile parameters aren't just mechanically derivable using
> a fixed table or formula. So instead of thinking of the modifiers as
> something you can just memcpy into a state packet, it identifies a family
> of configurations - enough information to deterministically derive the full
> exact configuration. The formula may change, for example for different
> hardware or if it's determined to not be optimal, and in that case, we can
> use a new modifier to represent to new formula.
Agreed. For Broadcom's VC5+ stuff, our tiling layout depends on the
number of SDRAM banks and bank size, but all users of buffers will know
what those are, so I'm not planning on including those in the modifier.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-02-22 19:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171220085151.6327051e@nvidia.com>
2017-12-20 19:51 ` [Mesa-dev] Allocator Nouveau driver, Mesa EXT_external_objects, and DRM metadata import interfaces Daniel Vetter
2017-12-20 19:54 ` Kristian Høgsberg
2017-12-20 20:41 ` Miguel Angel Vico
2017-12-20 23:22 ` [Mesa-dev] " Kristian Kristensen
2017-12-21 1:05 ` Ilia Mirkin
2017-12-21 8:05 ` Daniel Vetter
2018-02-21 6:14 ` Chad Versace
2018-02-21 18:26 ` [Mesa-dev] " Daniel Vetter
2018-02-21 23:23 ` Chad Versace
2018-02-22 0:00 ` Alex Deucher
2018-02-22 18:04 ` Kristian Høgsberg
2018-02-22 18:49 ` Bas Nieuwenhuizen
2018-02-22 21:16 ` Alex Deucher
2018-02-27 6:10 ` James Jones
2018-03-07 17:23 ` Daniel Vetter
2018-02-22 19:21 ` Eric Anholt [this message]
[not found] ` <CAPj87rOmGsN+HZEk1G=gFx_uPyipzEURB7=bfqOxxmLDtWwPgw@mail.gmail.com>
[not found] ` <b1d78126-fb83-d3c0-290f-8a5406ab1c79@nvidia.com>
[not found] ` <CAKMK7uHGBhMge8ayqcJUXysesVL8yc1dNk3rdH6C_N2DpO2OyQ@mail.gmail.com>
[not found] ` <CAF6AEGtNsBwhJAiUGuUQFdKccurSzD-HnpHH-JcHSx0RUCnZGA@mail.gmail.com>
2017-12-28 18:24 ` Miguel Angel Vico
2018-01-03 14:53 ` [Mesa-dev] " Rob Clark
2018-01-03 19:26 ` James Jones
2018-01-03 20:36 ` Kristian Kristensen
2018-01-08 9:35 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fu5sakzl.fsf@anholt.net \
--to=eric@anholt.net \
--cc=alexdeucher@gmail.com \
--cc=bskeggs@redhat.com \
--cc=chadversary@chromium.org \
--cc=cpaul@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hoegsberg@gmail.com \
--cc=hoegsberg@google.com \
--cc=jason.ekstrand@intel.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=mvicomoya@nvidia.com \
--cc=nhaehnle@gmail.com \
--cc=rclark@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.