Re: PATCH: move soft_cursor into fbconsole
From: Jon Smirl <hidden>
Date: 2005-06-24 16:27:36
On 6/24/05, James Simmons [off-list ref] wrote:
quoted
quoted
Now I was thinking instead of a massive move of the the software cursor we add a flag FBINFO_HWACCEL_CURSOR to tell us if we are using a hardware cursor. This way for the sysfs interface you can test to see if it is a hardware cursor and only allow userland to access a hardware cursor. Here is a patch for that. People please try it out.Your code will work, but it is conceptually what we want to do? Software cursors are application specific. The soft cursor implemented in fbdev really belongs to fbconsole. If we get another in-kernel user with a different update pattern (maybe they use the GPU) they will want a different soft cursor. Shouldn't we just move the current soft cursor into fbconsole? Given that software cursors are application specific fbdev should not contain one.The only reason I'm against that is then when the developer with the different update pattern will create a new fbconsole. We could end up with several fbconsoles. I really like to keep it down to one. So I rather deal with several cursor implementation instead of several fbconsoles. Also remember that the software cursor is generically wrapped around the the imageblit function. Since imageblit is independent of the update pattern we will be okay.
To address your concern, leave softcursor as an fbdev module. But we
do need to remove all of those .fb_cursor = softcursor from all of the
fbdev modules. As long as those are there we can only have one
softcursor implementation.
Then any in-kernel user does this:
/* First try the hardware cursor */
if (info->fbops->fb_cursor)
err = info->fbops->fb_cursor(info, &cursor);
/* if that doesn't exist or didn't work, use the software one */
if (err)
soft_cursor(info, &cursor);
I want to remove the fallback to softcursor logic from fbdev, I don't
care if the softcursor modules stays part of fbdev, it's the fallback
logic that doesn't belong in the drivers. There is no need for all of
the drivers to reference softcursor.
--
Jon Smirl
jonsmirl@gmail.com
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click