From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 4/5] drm/i915: Add rotation support for the cursor plane Date: Tue, 18 Feb 2014 11:23:55 +0200 Message-ID: <20140218092355.GQ3852@intel.com> References: <1392239704-21776-1-git-send-email-ville.syrjala@linux.intel.com> <1392239704-21776-5-git-send-email-ville.syrjala@linux.intel.com> <1392375677.28501.40.camel@sagar-desktop> <20140214113929.GG3852@intel.com> <1392657830.28501.52.camel@sagar-desktop> <20140217175132.GP3852@intel.com> <1392709745.28501.55.camel@sagar-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1392709745.28501.55.camel@sagar-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Sagar Arun Kamble Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Tue, Feb 18, 2014 at 01:19:05PM +0530, Sagar Arun Kamble wrote: > On Mon, 2014-02-17 at 19:51 +0200, Ville Syrj=E4l=E4 wrote: > > On Mon, Feb 17, 2014 at 10:53:50PM +0530, Sagar Arun Kamble wrote: > > > On Fri, 2014-02-14 at 13:39 +0200, Ville Syrj=E4l=E4 wrote: > > > > On Fri, Feb 14, 2014 at 04:31:17PM +0530, Sagar Arun Kamble wrote: > > > > > On Wed, 2014-02-12 at 23:15 +0200, ville.syrjala@linux.intel.com = wrote: > > > > > > From: Ville Syrj=E4l=E4 > > > > > > = > > > > > > The cursor plane also supports 180 degree rotation. Add a new > > > > > > "cursor-rotation" property on the crtc which controls this. > > > > > > = > > > > > > Unlike sprites, the cursor has a fixed size, so if you have a s= mall > > > > > > cursor image with the rest of the bo filled by transparent pixe= ls, > > > > > > simply flipping the rotation property will cause the visible pa= rt > > > > > > of the cursor to shift. This is something to keep in mind when > > > > > > using cursor rotation. > > > > > By flipping you meant setting 180 degree rotation? > > > > = > > > > Yes. > > > > = > > > > > Don't we have to adjust the cursor base as well to the lower right > > > > > corner apart from setting the control bit? > > > > = > > > > No, the hardware does that automagically. Hmm. Except on gen4 > > > > apparently. Looks like I need to test on gen4, and fix it if it's > > > > really the case. > > > I tried on BYT system and 180 rotation on cursor plane is showing > > > garbage data in cursor plane. We might need to adjust the cursor base. > > = > > Yeah it's the same on gen4. I already have a fixed patch, but didn't > > repost it yet. > > = > > > Another thing, pipe rotation somehow did not work for me when I do th= is: > > > echo 0x4 > /sys/kernel/debug/dri/0/i915_pipe_rotation > > > Only cursor plane had impact. Need to debug this as well. > > = > > That's expected. It doesn't actually call the set_property codepath, > > instead it just sets the value directly and excpects a subsequent > > modeset to do the actual work. It was anyway just a hack to try things > > out a bit, so I didn't implement it properly. But it should be trivial > > to make it work correctly, so I might as well do it... > Yeah. Tried doing modeset and it works perfectly. > For Cursor rotation we might need to add check for 32bpp cursors as > well. We don't support anything else at the moment. And I don't think there's much point in adding support for any legacy cursor formats. The one thing we want to do is add support for larger cursor sizes. But I think that can wait until we expose the cursor as a drm_plane. -- = Ville Syrj=E4l=E4 Intel OTC