dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Adam Jackson <ajax@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC] drm: atomic mode set API
Date: Thu, 16 Feb 2012 00:12:49 +0100	[thread overview]
Message-ID: <20120215231249.GD26578@phenom.ffwll.local> (raw)
In-Reply-To: <4F3C38E1.304@redhat.com>

On Wed, Feb 15, 2012 at 05:59:45PM -0500, Adam Jackson wrote:
> On 2/15/12 5:42 PM, Jesse Barnes wrote:
> 
> >+#define DRM_SET_CONFIG_TEST (1<<0) /* don't change the config, just test it for validity */
> >+
> >+struct drm_mode_set_config {
> >+	__u64 crtcs;
> >+	__u64 crtc_fbs;
> >+	__u64 crtc_xpos; /* array of x coords for crtcs */
> >+	__u64 crtc_ypos; /* array of y coords for crtcs */
> >+	__u32 count_crtcs;
> >+
> >+	__u64 plane_sets; /* array of set_plane structs */
> >+
> >+	__u32 count_planes;
> >+
> >+	__u64 connectors;
> >+	__u64 connector_modes;
> >+	__u32 count_connectors;
> >+
> >+	__u32 flags;
> >+};
> 
> This appears to be missing some []s, but I think the intent is clear.
> 
> >  #define DRM_MODE_ENCODER_NONE	0
> >  #define DRM_MODE_ENCODER_DAC	1
> >  #define DRM_MODE_ENCODER_TMDS	2
> >
> >This allows you to bind a bunch of fbs to crtcs with independent
> >positions, as well as set a bunch of planes to specific fbs and
> >layouts.  Finally, it lets you change the connector config at the same
> >time, with a flag to simply test a config instead of actually setting
> >it.
> >
> >Any comments?  Do we also need to set gamma or other properties as part
> >of this?  What about cursors?
> 
> I guess you might want to set gamma atomically, but I can't imagine
> it being a factor in anyone's "can I do this" logic.
> 
> How do you pass in pixel format?  Do you just assume the existing fb
> is already in the correct format?  That could work but it kind of
> sucks for low-memory environments since you'd need to have enough
> room to pre-create all the fbs.  You could still do the "tear
> everything down first" approach to work around that, but then you'd
> still have the possibility of having nothing lit up _and_ not being
> able to set what was requested, and then needing to unwind in
> userspace.
> 
> I'd sort of also want to see audio reflected in this (sigh), since
> that's going to affect the bandwidth math.  DP 1.2 makes that even
> worse.

Yeah, I think we should include any funky connector, crtc, plane
properties (the latter don't exist yet, but I guess they will sooner or
later) because they all might affect how many and which hw resources we
need (I'm thinking e.g. of plane setups for hw that reuses crtc engines as
planes, but where you can use the crtc scanout engine for something else
if it's completely occluded or set to just scan out the black borders with
a parameter).
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-02-15 23:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 22:42 [RFC] drm: atomic mode set API Jesse Barnes
2012-02-15 22:59 ` Adam Jackson
2012-02-15 23:12   ` Daniel Vetter [this message]
2012-02-16  1:55     ` Jesse Barnes
2012-02-16 12:36     ` Ville Syrjälä
2012-02-16  1:53   ` Jesse Barnes
2012-02-16  7:52   ` Rob Clark
2012-02-16 12:46 ` Jakob Bornecrantz
2012-02-16 16:53   ` Jesse Barnes

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=20120215231249.GD26578@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ajax@redhat.com \
    --cc=dri-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox