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: Thu, 19 Jun 2014 13:39:17 +0530 Message-ID: <53A29AAD.3040400@intel.com> References: <1403081847-4364-1-git-send-email-sonika.jindal@intel.com> <1403081847-4364-11-git-send-email-sonika.jindal@intel.com> <20140618170248.GF18833@strange.amr.corp.intel.com> <53A286AA.6030204@intel.com> <20140619070700.GO5821@phenom.ffwll.local> <53A296B9.6080506@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id AD5196E832 for ; Thu, 19 Jun 2014 01:09:20 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: "Kamble, Sagar A" , intel-gfx List-Id: intel-gfx@lists.freedesktop.org On 6/19/2014 1:25 PM, Daniel Vetter wrote: > On Thu, Jun 19, 2014 at 9:52 AM, Jindal, Sonika wrote: >>> No, this really should be done in >>> drm_fb_helper_restore_fbdev_mode_unlocked in drm_fb_helper.c. Well, in the >>> restore_fbdev_mode function in there. Once that's done and once omap is >>> also using the generic rotation properties (I think it is already) we can >>> remove the rotation handling code from omap's last_close. Please also >>> throw a (compile-tested-only) patch on top for that so that Rob Clark can >>> pick it up. >>> -Daniel >>> >> Ok, I will add it. So should I add a function pointer say reset_properties >> in crtc, which will be called from restore_fbdev_mode? > > No, I think it should directly reset the relevant properties. This > might mean that we have to move the rotation property pointer to > struct drm_plane so that restore_fbdev_mode can get at it. Or we wrap > up a helper for internal property setting purposes which bails out if > the property isn't attached to the relevant object. So, I will move rotation_property to drm_plane and for each plane where this property is attached, will call drm_object_property_set_value. Please correct me if I am wrong. > > This way it will automatically work for all drivers that support > rotation. With a callback we still have the same problem that each > driver needs to do their own magic, which means they'll get it wrong. > Letting helpers take care of such details gives us a much stronger > platfrom with drm drivers. > -Daniel >