From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jindal, Sonika" Subject: Re: [PATCH 10/11] drm/i915: Add 180 degree primary plane rotation support Date: Fri, 27 Jun 2014 16:45:29 +0530 Message-ID: <53AD5251.10809@intel.com> References: <1403081847-4364-1-git-send-email-sonika.jindal@intel.com> <1403081847-4364-11-git-send-email-sonika.jindal@intel.com> <53AD49AB.3030109@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 5655F6E61F for ; Fri, 27 Jun 2014 04:15:31 -0700 (PDT) In-Reply-To: <53AD49AB.3030109@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Tvrtko Ursulin , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 6/27/2014 4:08 PM, Tvrtko Ursulin wrote: > Hi, > > On 06/18/2014 09:57 AM, sonika.jindal@intel.com wrote: > [snip] >> +static int intel_primary_plane_set_property(struct drm_plane *plane, >> + struct drm_property *prop, >> + uint64_t val) >> +{ >> + struct drm_device *dev = plane->dev; >> + struct drm_i915_private *dev_priv = dev->dev_private; >> + struct intel_plane *intel_plane = to_intel_plane(plane); >> + struct intel_crtc *intel_crtc = to_intel_crtc(plane->crtc); >> + struct drm_crtc *crtc = &intel_crtc->base; >> + uint64_t old_val; >> + int ret = -ENOENT; >> + >> + if (prop == dev_priv->rotation_property) { >> + /* exactly one rotation angle please */ >> + if (hweight32(val & 0xf) != 1) >> + return -EINVAL; >> + >> + old_val = intel_plane->rotation; >> + intel_plane->rotation = val; >> + >> + if (intel_crtc->active && intel_crtc->primary_enabled) { >> + intel_crtc_wait_for_pending_flips(crtc); >> + >> + /* FBC does not work on some platforms for rotated planes */ >> + if (dev_priv->fbc.plane == intel_crtc->plane && >> + INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev) && >> + intel_plane->rotation != BIT(DRM_ROTATE_0)) >> + intel_disable_fbc(dev); > > Also, do we need a path for turning FBC back on once plane orientation > goes back to a supported configuration? > > Regards, > > Tvrtko > True, looks like it should be added. I'l add and post. -Sonika