From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Jindal, Sonika" <sonika.jindal@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm: Add rotation_property to mode_config and creating it
Date: Mon, 4 Aug 2014 14:54:39 +0300 [thread overview]
Message-ID: <20140804115439.GD4193@intel.com> (raw)
In-Reply-To: <53DF6083.5090708@intel.com>
On Mon, Aug 04, 2014 at 03:59:23PM +0530, Jindal, Sonika wrote:
>
>
> On 7/31/2014 9:39 AM, Jindal, Sonika wrote:
> >
> >
> > On 7/29/2014 4:00 PM, Daniel Vetter wrote:
> >> On Tue, Jul 29, 2014 at 12:40:29PM +0300, Ville Syrjälä wrote:
> >>> On Mon, Jul 28, 2014 at 08:47:22PM +0200, Daniel Vetter wrote:
> >>>> On Mon, Jul 28, 2014 at 06:29:41PM +0300, Ville Syrjälä wrote:
> >>>>> On Tue, Jul 15, 2014 at 05:43:37PM +0530, sonika.jindal@intel.com wrote:
> >>>>>> From: Sonika Jindal <sonika.jindal@intel.com>
> >>>>>>
> >>>>>> v2: Adding creation of rotation_property here.
> >>>>>>
> >>>>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
> >>>>>> ---
> >>>>>> drivers/gpu/drm/drm_crtc.c | 3 ++-
> >>>>>> include/drm/drm_crtc.h | 1 +
> >>>>>> 2 files changed, 3 insertions(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> >>>>>> index 787631e..49c0747 100644
> >>>>>> --- a/drivers/gpu/drm/drm_crtc.c
> >>>>>> +++ b/drivers/gpu/drm/drm_crtc.c
> >>>>>> @@ -1299,7 +1299,8 @@ static int drm_mode_create_standard_plane_properties(struct drm_device *dev)
> >>>>>> "type", drm_plane_type_enum_list,
> >>>>>> ARRAY_SIZE(drm_plane_type_enum_list));
> >>>>>> dev->mode_config.plane_type_property = type;
> >>>>>> -
> >>>>>> + dev->mode_config.rotation_property = drm_mode_create_rotation_property(dev,
> >>>>>> + BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_180));
> >>>>>
> >>>>> This might not make sense for other (!i915) hardware. And that's the
> >>>>> reason why I had the driver create the property in the first place.
> >>>>>
> >>>>> I think Daniel was thinking that we might want to expose all the bits
> >>>>> regardless of what the hardware supports, but I don't like that idea.
> >>>>> There are other properties (eg. alpha blending, csc stuff, etc.) that
> >>>>> have the same problem of hardware supporting only a (potentially small)
> >>>>> subset of the possible values. I'd rather we didn't make life harder
> >>>>> for userspace when the kernel can already report that certain values
> >>>>> will never work.
> >>>>
> >>>> Well I'd like the property to be in some generic place so that fbcon can
> >>>> unroate and that with the atomic stuff we can have rotation support in the
> >>>> core structures. Which should help with argument checking.
> >>>>
> >>>> But for rotation I don't think we should set it up in generic code, but in
> >>>> i915. So the place where we keep it would be generic, the values would be
> >>>> the sames, but the allowed set would differ depending upon platform or
> >>>> driver.
> >>>
> >>> That would still fail if all the planes on the same device don't support
> >>> the same rotation flags. Eg. on i915 we would have this problem if we
> >>> exposed the old video overlay as a drm plane. And it wouldn't be the
> >>> first piece of hardware where I've seen this kind of thing.
> >>
> >> Problem is still that I'd like to have a somewhat generic internal
> >> representation available. We could punt this to atomic though by adding a
> >> rotation field to the drm_plane_state structure. Which is more-or-less my
> >> plan, but wouldn't work with Rob's approach.
> >>
> >> Or we keep the property link only in drm_plane (and give drivers the
> >> freedom to set up the underlying enum however they want to), but I'm not
> >> sure whether our interfaces can cope with that.
> >> -Daniel
> >>
> > Daniel, Ville
> >
> > So what is the suggestion for this property? Should I be moving it to
> > somewhere else?
> >
> > -Sonika
> Hi Daniel/Ville,
>
> Please let me know if I need to move this property somewhere else.
Well we at least need to move the crationg of the property to the
driver. I guess we could leave the property itself in place in
mode_config so that fbdev can get at it easily. If we come across
a real need for separate per-plane rotation properties we can always
move it to drm_plane later.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-08-04 11:57 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 8:40 [PATCH 0/6] Add 180 degree primary and sprite rotation sonika.jindal
2014-07-15 8:40 ` [PATCH 1/6] drm/i915: Add 180 degree sprite rotation support sonika.jindal
2014-07-15 8:40 ` [PATCH 2/6] drm/i915: Make intel_plane_restore() return an error sonika.jindal
2014-07-15 8:40 ` [PATCH 3/6] drm: Add rotation_property to mode_config sonika.jindal
2014-07-15 12:13 ` [PATCH] drm: Add rotation_property to mode_config and creating it sonika.jindal
2014-07-28 15:29 ` Ville Syrjälä
2014-07-28 18:47 ` Daniel Vetter
2014-07-29 9:40 ` Ville Syrjälä
2014-07-29 10:30 ` Daniel Vetter
2014-07-31 4:09 ` Jindal, Sonika
2014-08-04 10:29 ` Jindal, Sonika
2014-08-04 11:54 ` Ville Syrjälä [this message]
2014-08-04 12:04 ` Jindal, Sonika
2014-07-15 8:40 ` [PATCH 4/6] drm/i915: Add rotation property for sprites sonika.jindal
2014-07-15 12:12 ` [PATCH] " sonika.jindal
2014-07-15 8:40 ` [PATCH 5/6] drm/i915: Add 180 degree primary plane rotation support sonika.jindal
2014-07-15 9:11 ` Daniel Vetter
2014-07-15 9:38 ` Jindal, Sonika
2014-07-15 10:31 ` Daniel Vetter
2014-07-15 11:30 ` [PATCH 0/3 v2] Moving creation of rotation_property to drm layer sonika.jindal
2014-07-15 11:30 ` [PATCH 1/4] drm: Add rotation_property to mode_config and creating it sonika.jindal
2014-07-15 11:30 ` [PATCH 2/4] drm/i915: Add rotation property for sprites sonika.jindal
2014-07-15 11:30 ` [PATCH 3/4] drm/i915: Add 180 degree primary plane rotation support sonika.jindal
2014-07-15 12:02 ` [PATCH 0/3 v2] Moving creation of rotation_property to drm layer Daniel Vetter
2014-07-15 12:10 ` Jindal, Sonika
2014-07-15 12:10 ` [PATCH] drm/i915: Add 180 degree primary plane rotation support sonika.jindal
2014-08-07 11:45 ` [PATCH 5/6] " Daniel Vetter
2014-08-07 12:11 ` Daniel Vetter
2014-08-11 11:07 ` Jindal, Sonika
2014-08-11 11:42 ` Daniel Vetter
2014-08-11 12:07 ` Jindal, Sonika
2014-08-11 12:23 ` Daniel Vetter
2014-08-12 3:25 ` Jindal, Sonika
2014-08-19 6:26 ` [PATCH 0/2] 180 Primary plane rotation: calling setplane in set_property sonika.jindal
2014-08-19 6:26 ` [PATCH 1/2] drm/i915: Updating plane parameters for primary plane in setplane sonika.jindal
2014-08-19 20:50 ` Matt Roper
2014-08-20 5:53 ` Jindal, Sonika
2014-08-21 6:14 ` sonika.jindal
2014-08-25 20:42 ` Daniel Vetter
2014-08-19 6:26 ` [PATCH 2/2] drm/i915: Add 180 degree primary plane rotation support sonika.jindal
2014-08-19 22:51 ` Matt Roper
2014-08-20 5:36 ` Jindal, Sonika
2014-08-21 6:15 ` sonika.jindal
2014-08-21 8:33 ` Ville Syrjälä
2014-08-21 11:44 ` Jindal, Sonika
2014-08-21 13:37 ` Ville Syrjälä
2014-08-22 3:59 ` Jindal, Sonika
2014-08-22 6:58 ` [PATCH] " sonika.jindal
2014-08-22 8:14 ` [PATCH 2/2] " Ville Syrjälä
2014-08-22 8:22 ` Jindal, Sonika
2014-08-22 8:36 ` [PATCH] " sonika.jindal
2014-08-25 20:50 ` Daniel Vetter
2014-07-15 8:40 ` [PATCH 6/6] drm: Resetting rotation property sonika.jindal
2014-08-04 12:01 ` Ville Syrjälä
2014-08-04 12:03 ` Jindal, Sonika
2014-07-15 10:52 ` [PATCH 0/6] Add 180 degree primary and sprite rotation Damien Lespiau
2014-07-15 10:55 ` Jindal, Sonika
2014-07-15 10:57 ` Damien Lespiau
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=20140804115439.GD4193@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sonika.jindal@intel.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