All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
	Intel GFX <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] drm: Plumb modifiers through plane init
Date: Wed, 3 May 2017 15:07:29 +0100	[thread overview]
Message-ID: <20170503140729.GJ28653@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAPj87rM-aXoq=GdsBSJiL7w9uSjAQ+f2aEB2TO1eofe7PQCGaA@mail.gmail.com>

On Wed, May 03, 2017 at 02:45:26PM +0100, Daniel Stone wrote:
> Hi Liviu,
> 
> On 3 May 2017 at 11:34, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> > On Tue, May 02, 2017 at 10:14:26PM -0700, Ben Widawsky wrote:
> >> v2: A minor addition from Daniel
> >
> > You are *really* pushing your luck by not Cc-ing *any* of the maintainers of
> > the drivers you touch. You do want reviews, don't you?
> 
> Ouch. I'm very sure Ben does want reviews, but he mainly works in Mesa
> where you can rely on the list rather than having to CC everyone
> individually. It was a mistake, so please be more gentle with him;
> your whole mail comes across as quite hostile to me.

Sorry, I'm not trying to be hostile. Try to read the bolded words with a long
(southern USA) intonation as if to draw attention to them. You will see that
it is just pointing to two facts: he does not warn anyone about the changes and
he is not making the patchset that obviously critical by having a commit message
that implies everyone should pay attention to it. So he is really hoping to be
lucky to get reviews (or doesn't actively seek them).

> 
> > Finally, the questions I should've started with: why the change? What are you trying to
> > achieve? It is not very clear from the commit message at all.
> 
> It does deserve a much better commit message than what it has, but as
> he is on holiday for the rest of the week, I can answer. Currently, we
> advertise which formats each plane is capable of displaying. In order
> for userspace to be able to allocate tiled/compressed buffers for
> scanout, we want userspace to be able to discover which modifiers each
> plane supports as well.

I get the overall goal. We need/want something similar for Mali DP and AFBC buffers.
What I don't understand is the current aproach (but I've found from Brian that somehow
I've missed the long discussion(s) around the subject). I was hoping to learn
from the commit message why he thinks the introduction of this code is the right
way of doing it. And the IRC logs seem to imply that he is mostly doing something
that others have agreed upon and he doesn't really care about the approach as long
as it ticks the "supported by intel driver" box.

> 
> >> @@ -105,6 +108,28 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,
> >>               return -ENOMEM;
> >>       }
> >>
> >> +     /* First driver to need more than 64 formats needs to fix this */
> >> +     if (WARN_ON(format_count > 64))
> >> +             return -EINVAL;
> >
> > What is the link between format_count and format modifiers? Why are you introducing
> > this artificial restriction on the format_count? Also, there doesn't seem to be any
> > check if format_modifier_count == format_count. What happens when they don't match?
> 
> Inside the blob, each modifier carries a bitmask of formats (specified
> by index) that the modifier applies to, i.e. with:
>   .formats = { ARGB8888, XRGB8888, RGB565 },
> 
> a modifier which applied only to the 32-bit formats would specify a
> bitmask of 0x3. The uABI supports this just fine, but the internal
> plumbing does not yet, because no-one supports more than 64 formats.

Yeah, still doesn't answer the question. Maybe if the comment said something like:
"When building format modifiers bitmap we only have space to map up to 64 formats.
Check that the driver is not trying to exceed that." then it would've been more
obvious why the check is needed and also why one doesn't care about format_modifier_count.

To explain my mindset: the way the patch series was formatted and the way I've read it
initially I did not realised that the idea is to build a bitmask. Nothing in this patch
alludes to that so I assumed there was a 1:1 relationship between format modifiers and
format.

> 
> >> +
> >> +     if (format_modifiers) {
> >> +             const uint64_t *temp_modifiers = format_modifiers;
> >> +             while (*temp_modifiers++ != DRM_FORMAT_MOD_INVALID)
> >> +                     format_modifier_count++;
> >> +     }
> >> +
> >> +     plane->modifier_count = format_modifier_count;
> >
> > Why do you need to remember this? It is not used anywhere else!
> 
> It is used to populate the blob in a later patch!

I cannot find that patch. Nothing in the 3 patches uses that. Have a look!

Best regards,
Liviu

> 
> Cheers,
> Daniel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-05-03 14:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03  5:14 [PATCH 1/3] drm: Plumb modifiers through plane init Ben Widawsky
2017-05-03  5:14 ` [PATCH 2/3] drm: Create a format/modifier blob Ben Widawsky
2017-05-03 11:00   ` Brian Starkey
2017-05-03 11:47     ` Daniel Stone
2017-05-03 12:39       ` Brian Starkey
2017-05-03 12:51   ` Brian Starkey
2017-05-03 13:51     ` [Intel-gfx] " Daniel Stone
2017-05-03 14:03       ` Brian Starkey
2017-05-03 14:07         ` [Intel-gfx] " Daniel Stone
2017-05-03 14:17           ` Brian Starkey
2017-05-03 13:15   ` Liviu Dudau
2017-05-11 17:58     ` Ben Widawsky
2017-05-03 13:32   ` Emil Velikov
2017-05-03 15:08   ` Daniel Vetter
2017-05-16 21:19     ` [Intel-gfx] " Ben Widawsky
2017-05-17 11:31       ` Daniel Vetter
2017-05-17 15:12         ` Daniel Vetter
2017-05-18  0:00         ` Ben Widawsky
2017-05-18  0:38           ` Rob Clark
2017-05-18  0:42             ` [Intel-gfx] " Rob Clark
2017-05-04  9:28   ` Daniel Stone
2017-05-03  5:14 ` [PATCH 3/3] drm/i915: Add format modifiers for Intel Ben Widawsky
2017-05-03  5:30 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm: Plumb modifiers through plane init Patchwork
2017-05-03 10:34 ` [PATCH 1/3] " Liviu Dudau
2017-05-03 13:45   ` [Intel-gfx] " Daniel Stone
2017-05-03 14:07     ` Liviu Dudau [this message]
2017-05-03 14:14       ` Daniel Stone
2017-05-03 14:52         ` Liviu Dudau
2017-05-03 16:45           ` Daniel Vetter
2017-05-03 17:30             ` [Intel-gfx] " Liviu Dudau
2017-05-10 16:34               ` Ben Widawsky
2017-05-10 17:24                 ` Liviu Dudau
2017-05-10 19:33                   ` [Intel-gfx] " Ben Widawsky
2017-05-10 20:21                     ` Liviu Dudau
2017-05-10 16:33     ` Ben Widawsky
2017-05-03 18:28 ` kbuild test robot
2017-05-03 18:48 ` kbuild test robot

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=20170503140729.GJ28653@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=ben@bwidawsk.net \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.