From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 10/11] drm/i915: Add 180 degree primary plane rotation support Date: Thu, 19 Jun 2014 10:21:48 +0200 Message-ID: <20140619082148.GR5821@phenom.ffwll.local> 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> <53A29AAD.3040400@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by gabe.freedesktop.org (Postfix) with ESMTP id CDEA46E835 for ; Thu, 19 Jun 2014 01:21:56 -0700 (PDT) Received: by mail-we0-f172.google.com with SMTP id u57so1993317wes.31 for ; Thu, 19 Jun 2014 01:21:55 -0700 (PDT) Content-Disposition: inline In-Reply-To: <53A29AAD.3040400@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Jindal, Sonika" Cc: "Kamble, Sagar A" , intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Thu, Jun 19, 2014 at 01:39:17PM +0530, Jindal, Sonika wrote: > > > 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. Yeah, that sounds like a plan. -Daniel > > > >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 > > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch