From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm: Check crtc viewport correctly with rotated primary plane on atomic drivers
Date: Fri, 16 Oct 2015 16:35:02 +0200 [thread overview]
Message-ID: <20151016143502.GI13786@phenom.ffwll.local> (raw)
In-Reply-To: <20151016083818.GM26517@intel.com>
On Fri, Oct 16, 2015 at 11:38:18AM +0300, Ville Syrjälä wrote:
> On Thu, Oct 15, 2015 at 05:32:12PM -0700, Matt Roper wrote:
> > On Thu, Oct 15, 2015 at 08:40:01PM +0300, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > On atomic drivers we can dig out the primary plane rotation from the
> > > plane state instead of looking at the legacy crtc->invert_dimensions
> > > flag. The flag is not set by anyone except omapdrm, and it would be
> > > racy to set it the same way in the atomic helpers.
> >
> > Can't we just remove the invert_dimensions field completely now? It's a
> > legacy-only field, but no legacy drivers actually set it, so it winds up
> > being completely unused.
>
> omap sets it.
Omap should be atomic now (maybe double-check with Laurent), so I think we
can indeed ditch it. Follow-up series perhaps?
-Daniel
>
> >
> >
> > Matt
> >
> > >
> > > Cc: Matt Roper <matthew.d.roper@intel.com>
> > > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/drm_crtc.c | 12 +++++++++++-
> > > 1 file changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > > index 227613a..ffaa3f5 100644
> > > --- a/drivers/gpu/drm/drm_crtc.c
> > > +++ b/drivers/gpu/drm/drm_crtc.c
> > > @@ -2545,6 +2545,16 @@ void drm_crtc_get_hv_timing(const struct drm_display_mode *mode,
> > > }
> > > EXPORT_SYMBOL(drm_crtc_get_hv_timing);
> > >
> > > +static bool invert_dimensions(const struct drm_crtc *crtc)
> > > +{
> > > + if (crtc->state) {
> > > + return crtc->primary->state->rotation & (BIT(DRM_ROTATE_90) |
> > > + BIT(DRM_ROTATE_270));
> > > + } else {
> > > + return crtc->invert_dimensions;
> > > + }
> > > +}
> > > +
> > > /**
> > > * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the
> > > * CRTC viewport
> > > @@ -2564,7 +2574,7 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc,
> > >
> > > drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
> > >
> > > - if (crtc->invert_dimensions)
> > > + if (invert_dimensions(crtc))
> > > swap(hdisplay, vdisplay);
> > >
> > > return check_src_coords(x << 16, y << 16,
> > > --
> > > 2.4.9
> > >
> >
> > --
> > Matt Roper
> > Graphics Software Engineer
> > IoTG Platform Enabling & Development
> > Intel Corporation
> > (916) 356-2795
>
> --
> Ville Syrjälä
> Intel OTC
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-10-16 14:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 17:39 [PATCH 1/5] drm: Don't leak fb when plane crtc coodinates are bad ville.syrjala
2015-10-15 17:39 ` [PATCH 2/5] drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane ville.syrjala
2015-10-15 17:40 ` [PATCH 3/5] drm: Refactor plane src coordinate checks ville.syrjala
2015-10-15 17:40 ` [PATCH 4/5] drm: Check crtc viewport correctly with rotated primary plane on atomic drivers ville.syrjala
2015-10-16 0:32 ` Matt Roper
2015-10-16 8:38 ` Ville Syrjälä
2015-10-16 14:35 ` Daniel Vetter [this message]
2015-10-16 15:10 ` Ville Syrjälä
2015-10-16 15:26 ` Matt Roper
2015-10-16 15:38 ` [PATCH v2 " ville.syrjala
2015-10-15 17:40 ` [PATCH 5/5] drm: Check plane src coordinates correctly during page flip for " ville.syrjala
2015-10-16 16:27 ` Matt Roper
2015-10-16 16:40 ` Tvrtko Ursulin
2015-10-16 17:17 ` Daniel Vetter
2015-10-16 17:46 ` Matt Roper
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=20151016143502.GI13786@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=ville.syrjala@linux.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