dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC] drm: add support for tiled/compressed/etc modifier in addfb2
Date: Sat, 20 Dec 2014 21:04:35 +0200	[thread overview]
Message-ID: <40548048.tOu43FSkQq@avalon> (raw)
In-Reply-To: <CAF6AEGuv6QPfdirykMi+v2yPOGQAR-xGbBSFTezqiRVx0AuNtQ@mail.gmail.com>

Hi Rob,

On Thursday 18 December 2014 19:55:24 Rob Clark wrote:
> On Thu, Dec 18, 2014 at 4:22 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>>>>> TODO move definition of tokens to drm_fourcc.h?
> >>>>> 
> >>>>> Seems orthogonal imo. Another todo is to add checking to all
> >>>>> drivers to reject it if it's not 0 with -EINVAL. Otherwise we have yet
> >>>>> another case of an ioctl with fields that can't actually be used
> >>>>> everywhere.
> >>>> 
> >>>> Could we please add the check in core code instead of drivers ?
> >>> 
> >>> Nope since then no driver could ever use that extension. Defeats the
> >>> point ;-)
> >> 
> >> Except if we follow the proposal of adding a flag to tell whether a
> >> driver supports the extension ;-)
> > 
> > I'm not a terrible big fan of driver flags, mostly because I've seen too
> > much of the horrible stuff in dri1. Imo much better to pass everything to
> > drivers and help them out with helpers if needed. I might be going
> > overboard a bit with my bias against driver flags ;-)
> 
> I ventured a little ways down the thought path of adding list of
> supported modifier tokens per plane.. and then doing more complete
> checks in the core.  But then the question is, what about cases where
> some tiling format is only supported for UV but not Y, etc.. it
> quickly gets ugly.

From my experience with V4L2 expressing such constraints in a way that would 
be both simple and comprehensive isn't possible. We should aim for the common 
case, and I agree that finding out what the common case is would require 
implementing the feature first.

However, it would be pretty easy to flag whether a driver supports this new 
API at all. That could be used to zero the extra fields.

> I think for now better to let the driver do this (with a must_be_all_zeros()
> helper for what I expect will be the common case initially).  If common
> patterns emerge, then we refactor out a better helper..

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-12-20 19:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 17:17 [RFC] drm: add support for tiled/compressed/etc modifier in addfb2 Rob Clark
2014-12-10 17:30 ` Daniel Vetter
2014-12-12 20:56   ` Laurent Pinchart
2014-12-15  7:33     ` Daniel Vetter
2014-12-18 20:54       ` Laurent Pinchart
2014-12-18 21:22         ` Daniel Vetter
2014-12-19  0:55           ` Rob Clark
2014-12-20 19:04             ` Laurent Pinchart [this message]
2014-12-12 11:27 ` Daniel Stone
2014-12-12 13:50   ` Rob Clark
2014-12-12 14:56     ` Ville Syrjälä
2014-12-12 15:11       ` Daniel Stone
2014-12-12 15:30         ` Ville Syrjälä
2014-12-12 16:00           ` Rob Clark
2014-12-12 16:14             ` Ville Syrjälä
2014-12-12 17:05               ` Rob Clark
2014-12-15  7:42                 ` Daniel Vetter
2014-12-12 17:11           ` Daniel Stone
2014-12-12 18:00             ` Ville Syrjälä
2014-12-12 18:05               ` Daniel Stone
2014-12-12 18:22                 ` Ville Syrjälä
2014-12-15 22:19                   ` Daniel Stone
2014-12-16 14:42                     ` Ville Syrjälä
2014-12-12 15:56         ` Rob Clark
2014-12-15  7:39           ` Daniel Vetter
2014-12-16  3:56   ` Michel Dänzer
2014-12-16  8:01     ` Daniel Stone
2014-12-16 14:20       ` Rob Clark
2014-12-12 20:57 ` Laurent Pinchart
2014-12-12 21:33   ` Rob Clark
2014-12-13 20:30     ` Ville Syrjälä

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=40548048.tOu43FSkQq@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robdclark@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox