public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/9] drm/i915: Plane rotation support
Date: Mon, 30 Sep 2013 20:09:49 +0300	[thread overview]
Message-ID: <20130930170949.GE9395@intel.com> (raw)
In-Reply-To: <CAF6AEGv7NpoowCWUwz0R3Dod6f9m9TCLqOSB4O+a8_C4eCxUdw@mail.gmail.com>

On Mon, Sep 30, 2013 at 12:15:06PM -0400, Rob Clark wrote:
> On Mon, Sep 30, 2013 at 10:44 AM,  <ville.syrjala@linux.intel.com> wrote:
> > Recently some people from inside Intel have showed some interest in 180
> > degree plane rotation. To avoid a huge mess, I decided that I should
> > implement the feature properly.
> >
> > So I snatched the rotation property from omapdrm, and moved some of the
> > code into drm_crtc.c, added a bunch of helper stuff to drm_crtc/rect
> > and implemented the relevant bits in i915. I didn't touch cursor or
> > primary planes at all. I'm sort of hoping we might do the drm_plane
> > conversion sometime soonish and then we'd avoid adding a bunch of
> > plane properties to the crtc.
> 
> fwiw, I was leaning towards introducing primary-plane's visible to
> userspace after we have atomic modeset (or really, the
> propertyification associated with atomic modeset).

Less burden of maintaining all the crtc properties if we convert to
drm_plane first.

> 
> But that should be independent of drm_plane conversion.  You probably
> still want to do something like what I did in omapdrm where you attach
> plane properties on the crtc as well for benefit of old userspace.

Dunno. There's no old userspace that would use this. There are some
folks inside Intel who apparently want rotation for some thing, but
I was thinking I'd let them add the properties on the crtc and not
upstream any of that.

> 
> > One thing I don't really like is the current way of stuffing the bit
> > number into the enum_list resulting in DRM_ROTATE_FOO being just the bit
> > number. I'd prefer to make DRM_ROTATE_FOO the shifted bitmask. But I'm
> > not sure if changing that would cause grief to userspace, so I left it
> > alone for now.
> 
> I think this shouldn't be visible to userspace.  If I remember
> correctly, I just did it this way to make it easier to prevent users
> of bitmask property from doing the wrong thing (setting multiple bits,
> overlapping bitmask values, etc).

Well setting multiple bits should be allowed. If it's not we need to fix
it since rotation+reflection sure needs it. Or did you mean users as in
driver code in the kernel which registers the bitmask prop?

I also just had an idea to expose color keys, bg colors, etc. as bitmask
props where each channel is represented by a multi-bit mask, and the
whole thing is just one bitmask prop. That would expose some structure
to userspace w/o need a new prop type. But maybe we want a specialized
type for color props for extra clarty.

> 
> Anyways, from a really quick look, the core and omapdrm parts look good.
> 
> The drm_rotation_simplify() might be overkill..  or at least userspace
> should see what are the supported bitmask flags and not try to ask for
> something that is not supported.  Or am I missing something?

My main idea was that, for example if the hardware support X and Y reflection,
we can expose both 0 and 180 angles and X and Y reflection, and the driver
code can then do the simplification to elimnate the 180 degree case. So it's
just a convenience tool for the driver authors to eliminate the redundant
information. I didn't actually end up using it in i915 since we really
don't support anything but 0 and 180 cases, and advertising anything
else to userspace would be a bad idea.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-09-30 17:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 14:44 [PATCH 0/9] drm/i915: Plane rotation support ville.syrjala
2013-09-30 14:44 ` [PATCH 1/9] drm: Move DRM_ROTATE bits out of omapdrm into drm_crtc.h ville.syrjala
2013-09-30 14:44 ` [PATCH 2/9] drm: Add support_bits parameter to drm_property_create_bitmask() ville.syrjala
2013-09-30 14:44 ` [PATCH 3/9] drm: Add drm_mode_create_rotation_property() ville.syrjala
2013-09-30 14:44 ` [PATCH 4/9] drm/omap: Switch omapdrm over to drm_mode_create_rotation_property() ville.syrjala
2013-09-30 14:44 ` [PATCH 5/9] drm: Add drm_rect rotation functions ville.syrjala
2013-09-30 14:44 ` [PATCH 6/9] drm: Add drm_rotation_simplify() ville.syrjala
2013-10-14 13:46   ` [Intel-gfx] " Imre Deak
2013-10-14 13:50     ` Ville Syrjälä
2013-09-30 14:44 ` [PATCH 7/9] drm/i915: Add 180 degree sprite rotation support ville.syrjala
2013-10-01 13:22   ` [PATCH v2 " ville.syrjala
2013-09-30 14:44 ` [PATCH 8/9] drm/i915: Make intel_plane_restore() return an error ville.syrjala
2013-09-30 14:44 ` [PATCH 9/9] drm/i915: Add rotation property for sprites ville.syrjala
2013-10-14 13:59   ` Imre Deak
2013-10-14 14:39     ` Ville Syrjälä
2013-10-14 15:10       ` Imre Deak
2013-09-30 16:15 ` [PATCH 0/9] drm/i915: Plane rotation support Rob Clark
2013-09-30 17:09   ` Ville Syrjälä [this message]
2013-09-30 17:46     ` Rob Clark
2013-09-30 18:21       ` Daniel Vetter
2013-09-30 18:36         ` Ville Syrjälä
2013-09-30 18:31       ` 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=20130930170949.GE9395@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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