From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 3/5] DRM: Armada: Add support for ARGB 32x64 or 64x32 hardware cursors Date: Mon, 7 Oct 2013 11:32:50 +0100 Message-ID: <20131007103250.GJ12758@n2100.arm.linux.org.uk> References: <20131006220728.GG12758@n2100.arm.linux.org.uk> <20131007110141.27f1ac25@armhf> <20131007094008.GH12758@n2100.arm.linux.org.uk> <20131007120922.47df03b6@armhf> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20131007120922.47df03b6@armhf> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Jean-Francois Moine Cc: Jason Cooper , David Airlie , dri-devel@lists.freedesktop.org, Rob Clark , Daniel Vetter , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth List-Id: dri-devel@lists.freedesktop.org On Mon, Oct 07, 2013 at 12:09:22PM +0200, Jean-Francois Moine wrote: > On Mon, 7 Oct 2013 10:40:08 +0100 > Russell King - ARM Linux wrote: > > > > > This patch adds ARGB hardware cursor support to the DRM driver for the > > > > Marvell Armada SoCs. ARGB cursors are supported at either 32x64 or > > > > 64x32 resolutions. > > > [snip] > > > > > > I don't see the interest of such cursors. Actually, most often, the > > > cursors are 64x64 and 'A' is either 0 or 0xff. As the Armada 510 > > > supports 64x64 cursors with transparency, it would be more useful to > > > implement these ones... > > > > Sorry, you're completely wrong there. Xorg uses an alphablended cursor. > > This patch is a result of trialling each of the Armada's cursor options > > and this is the only one which results in a reasonable looking cursor. > > Strange. I am using the 64x64 cursor with transparency of the 510 for > many months and I never saw any problem. When I tried it, all cursors had variable alpha, and converting the alpha to a single transparency bit made the cursor look rubbish against certain backgrounds. > If you absolutely want to have all transparency shades, you should > accept 64x64 cursors and test if they may be rendered as 64x32 or > 32x64, i.e. test that there is only pure transparency in the non- > rendered rectangles... That is policy, and that is something which can be done by the X server rather than the kernel. The kernel exposes the hardware capabilities, which are to allow a 64x32 or a 32x64 cursor. Userspace can make the decision dynamically which it wishes to use. However, what you're suggesting is dangerous. What do you do when you're presented with a cursor which is 64x64 ? Do you: (a) not display it (b) crash the X server There isn't a fallback to using software cursors available in the X server because there's no error reporting for a failed hardware cursor update.