From: Damien Lespiau Subject: Re: [PATCH 2/3] drm/i915: Add 180 degree primary plane rotation support Date: Tue, 24 Jun 2014 11:14:04 +0100 Message-ID: <20140624101404.GB11357@strange.amr.corp.intel.com> References: <20140619082148.GR5821@phenom.ffwll.local> <1403501761-15049-1-git-send-email-sonika.jindal@intel.com> <1403501761-15049-3-git-send-email-sonika.jindal@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id D13916E4EF for ; Tue, 24 Jun 2014 03:14:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1403501761-15049-3-git-send-email-sonika.jindal@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: sonika.jindal@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Jun 23, 2014 at 11:06:00AM +0530, sonika.jindal@intel.com wrote: > From: Sonika Jindal > = > Primary planes support 180 degree rotation. Expose the feature > through rotation drm property. > = > v2: Calculating linear/tiled offsets based on pipe source width and > height. Added 180 degree rotation support in ironlake_update_plane. > = > v3: Checking if CRTC is active before issueing update_plane. Added > wait for vblank to make sure we dont overtake page flips. Disabling > FBC since it does not work with rotated planes. > = > v4: Updated rotation checks for pending flips, fbc disable. Creating > rotation property only for Gen4 onwards. Property resetting as part > of lastclose. > = > v5: Resetting property in i915_driver_lastclose properly for planes > and crtcs. Fixed linear offset calculation that was off by 1 w.r.t > width in i9xx_update_plane and ironlake_update_plane. Removed tab > based indentation and unnecessary braces in intel_crtc_set_property > and intel_update_fbc. FBC and flip related checks should be done only > for valid crtcs. > = > v6: Minor nits in FBC disable checks for comments in intel_crtc_set_prope= rty > and positioning the disable code in intel_update_fbc. > = > v7: In case rotation property on inactive crtc is updated, we return > successfully printing debug log as crtc is inactive and only property cha= nge > is preserved. > = > v8: update_plane is changed to update_primary_plane, crtc->fb is changed = to > crtc->primary->fb and return value of update_primary_plane is ignored. > = > v9: added rotation property to primary plane instead of crtc. Removing re= set > of rotation property from lastclose. rotation_property is moved to drm_pl= ane,so > drm layer will take care of resetting. > = > Testcase: igt/kms_rotation_crc > = > Cc: Daniel Vetter > Cc: Jani Nikula > Cc: dri-devel@lists.freedesktop.org > Cc: vijay.a.purushothaman@intel.com > Signed-off-by: Uma Shankar > Signed-off-by: Sagar Kamble > Reviewed-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/i915_dma.c | 5 -- > drivers/gpu/drm/i915/i915_reg.h | 1 + > drivers/gpu/drm/i915/intel_display.c | 94 ++++++++++++++++++++++++++++= ++++-- > drivers/gpu/drm/i915/intel_pm.c | 8 +++ > 4 files changed, 98 insertions(+), 10 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_= dma.c > index 5e583a1..4b6b911 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1938,14 +1938,9 @@ int i915_driver_open(struct drm_device *dev, struc= t drm_file *file) > */ > void i915_driver_lastclose(struct drm_device *dev) > { > - struct drm_i915_private *dev_priv =3D dev->dev_private; > - > /* On gen6+ we refuse to init without kms enabled, but then the drm core > * goes right around and calls lastclose. Check for this and don't clean > * up anything. */ > - if (!dev_priv) > - return; > - Hum, I don't think this was supposed to be removed? -- = Damien