From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jindal, Sonika" Subject: Re: [PATCH 2/3] drm/i915: Add 180 degree primary plane rotation support Date: Tue, 24 Jun 2014 15:56:57 +0530 Message-ID: <53A95271.4080207@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> <20140624101404.GB11357@strange.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 605F56E4F4 for ; Tue, 24 Jun 2014 03:26:59 -0700 (PDT) In-Reply-To: <20140624101404.GB11357@strange.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 6/24/2014 3:44 PM, Damien Lespiau wrote: > 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_prop= erty >> 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 ch= ange >> 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 r= eset >> of rotation property from lastclose. rotation_property is moved to drm_p= lane,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, stru= ct 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 c= ore >> * goes right around and calls lastclose. Check for this and don't cl= ean >> * up anything. */ >> - if (!dev_priv) >> - return; >> - > > Hum, I don't think this was supposed to be removed? > Yes, my mistake.. I will revert it and resend the patch.