From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
Erik Gilling <konkers@google.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Linaro-mm-sig] [RFC 0/4] Atomic Display Framework
Date: Thu, 29 Aug 2013 10:58:51 +0300 [thread overview]
Message-ID: <20130829075851.GE11428@intel.com> (raw)
In-Reply-To: <CAKMK7uE72HWByKpG3KxWxWmGjkYe3QH3obN-qy1VLZvOg0_qmQ@mail.gmail.com>
On Thu, Aug 29, 2013 at 09:01:01AM +0200, Daniel Vetter wrote:
> On Thu, Aug 29, 2013 at 5:51 AM, Rob Clark <robdclark@gmail.com> wrote:
> >> 1. The API is geared toward updating one object at a time. Android's graphics stack needs the entire screen updated atomically to avoid tearing, and on some SoCs to avoid wedging the display hardware. Rob Clark's atomic modeset patchset worked, but copy/update/commit design meant the driver had to keep a lot more internal state.
> >>
> >
> > I'm not entirely sure how to avoid that, because at least some hw we
> > need to have the entire new-state in order to validate if it is
> > possible. I'm open to suggestions, of course, but the approach I was
> > going for was to at least do most of the boring work for this in
> > drm/kms core (ie. w/ the drm_{plane,crtc,etc}_state stuff)
>
> Yeah, I think Rob's design that trickle-feeds the entire state to the
> driver is ok (preferrably using a driver-allocated state tracking
> object or so). And then we'll let some helper code make this sane for
> most drivers.
>
> I guess especially for pageflips a mode where we just pass in new
> buffers (and leave all the blending as-is) would be useful, maybe we
> could add a flag that says "keep all other properties as-is".
That's the normal mode of operation as far as I'm concerned. If the user
doesn't specify a prop, it retains its current value.
Also I don't generally want magic properties that flip their state in
response to a change in other seemingly unrelated property. Either the
user specifies a coherent state, or we return an error.
> A second
> flag for "reset properties to defaults" would also be good, where
> default = the primary plane can display unobstructed. So mostly just
> for boot splash screens, fbcon, ...
That could be useful, or we could maintain per-master state/context.
But I don't consider the planes themselves the major issue here. It's
very easy for the client to disable all unneeded planes explicitly.
It's all the other stuff like various methods of gamma adjustments,
various other color adjustemnt thingys, possibly some blending modes,
the output quantization range stuff, etc.
> >> 2. Some SoCs don't map well to KMS's CRTC + planes + encoders + connector model. At the time I was dealing with hardware where the blending engines didn't have their own framebuffer (they could only scan out constant colors or mix the output of other blocks), and you needed to gang several mixers together to drive high-res displays.
> >>
> >
> > currently you can connect a crtc to multiple encoders (at least for
> > some hw).. I suppose w/ the small addition of having a way to specify
> > an encoder's x/y offset, we could cover this sort of case?
>
> Hm, I've thought that if we convert the primary plane to a real plane
> we'd already have that. Then you can just place planes at x/y offset
> to construct the entire scanout area. Planes also have a crtc mask, as
> do connectors (through the encoders) so the n-to-m mapping is also
> possible on the output side afaics.
The all planes approach only works here if your drm_crtc is an abstract
thing composed of multiple hardware mixers/blenders/whatever you call them.
>
> >> 3. KMS doesn't support custom pixel formats, which a lot of newer SoCs use internally to cut down on bandwidth between hardware blocks.
> >
> > for custom formats, use a custom fourcc value, this should work.
> >
> > err, hmm, looks like some of the error checking that was added is a
> > bit too aggressive. What I'd propose is:
> >
> > #define DRM_FORMAT_CUSTOM 0x80000000
> >
> > and then 'if (format & DRM_FORMAT_CUSTOM) ... pass through to driver ..'
>
> Imo we should just convert primary planes to real planes so that we
> can do the same table-based checking for them as we do for secondary
> planes right now.
My plan for i915 is to convert them to drm_planes but first keep them
hidden via Rob's private plane mechanism.
After that we need to figure out how we can expose them to userspace w/o
risking breaking stuff too much. Maybe a new ioctl to enumerate private
planes only? And the maybe only accept direct use of private planes via
the atomic API, not through the old setplane API. Or if people want to
use setplane we could add a flag there indicating that the user is aware
of private planes and wants to use them.
> And then we can just ditch format_check
I'd like to keep the check because it provides a small barrier against
people just adding formats in driver code w/o even updating drm_fourcc.h.
If we need the extra flexibility, let's add the custom bit, and then
user space will know all bets are off when dealing with such formats.
> and allow
> drivers to use whatever pleases them. Of course reserving a driver
> specific range would be good, otoh we could just add more stuff to the
> drm_fourcc.h header.
>
> Cheers, Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-08-29 7:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 1:51 [RFC 0/4] Atomic Display Framework Greg Hackmann
2013-08-29 1:51 ` [RFC 1/4] video: Add generic display entity core Greg Hackmann
2013-08-29 1:51 ` [RFC 2/4] video: add atomic display framework Greg Hackmann
2013-08-29 1:51 ` [RFC 3/4] video: adf: add display core helper Greg Hackmann
2013-08-29 1:51 ` [RFC 4/4] video: adf: add memblock helper Greg Hackmann
2013-08-29 3:51 ` [RFC 0/4] Atomic Display Framework Rob Clark
2013-08-29 7:01 ` [Linaro-mm-sig] " Daniel Vetter
2013-08-29 7:58 ` Ville Syrjälä [this message]
2013-08-29 8:52 ` Damien Lespiau
2013-08-29 12:59 ` Rob Clark
2013-08-29 12:25 ` Rob Clark
2013-08-29 7:36 ` Ville Syrjälä
2013-08-29 12:54 ` Rob Clark
2013-08-29 23:34 ` Greg Hackmann
2013-08-30 14:00 ` Rob Clark
2013-08-30 14:11 ` Ville Syrjälä
2013-09-02 7:39 ` Daniel Vetter
2013-09-02 13:19 ` Rob Clark
2013-09-02 15:26 ` Alex Deucher
2013-08-29 23:26 ` Greg Hackmann
2013-08-30 13:55 ` Rob Clark
2013-08-30 14:01 ` 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=20130829075851.GE11428@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=konkers@google.com \
--cc=linaro-mm-sig@lists.linaro.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.