[PATCH] Don't allow softcursor use from userland

STALE7667d

13 messages, 4 authors, 2005-08-10 · open the first message on its own page

[PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-07 02:35:04


This patch forbids the cursor use from userland. The reason is that the 
cursor area could be altered by a another process and the current system
doesn't handle syncing those updates.

diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/aty/mach64_cursor.c fbdev-2.6/drivers/video/aty/mach64_cursor.c
--- linus-2.6/drivers/video/aty/mach64_cursor.c	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/aty/mach64_cursor.c	2005-08-02 16:16:07.000000000 -0700
@@ -219,8 +219,8 @@
 	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
 	info->sprite.flags = FB_PIXMAP_IO;
 
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	info->fbops->fb_cursor = atyfb_cursor;
-
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/fbsysfs.c fbdev-2.6/drivers/video/fbsysfs.c
--- linus-2.6/drivers/video/fbsysfs.c	2005-07-31 15:45:22.000000000 -0700
+++ fbdev-2.6/drivers/video/fbsysfs.c	2005-08-02 16:23:13.000000000 -0700
@@ -371,13 +371,19 @@
 static ssize_t store_cursor(struct class_device *class_device,
 			    const char * buf, size_t count)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
 static ssize_t show_cursor(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+
+	if (!(fb_info->flags & FBINFO_HWACCEL_CURSOR))
+		return -ENXIO;
 	return 0;
 }
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810.h fbdev-2.6/drivers/video/i810/i810.h
--- linus-2.6/drivers/video/i810/i810.h	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810.h	2005-08-02 15:00:52.000000000 -0700
@@ -201,7 +201,6 @@
 #define HAS_ACCELERATION            2
 #define ALWAYS_SYNC                 4
 #define LOCKUP                      8
-#define USE_HWCUR                  16
 
 struct gtt_data {
 	struct agp_memory *i810_fb_memory;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/i810/i810_main.c fbdev-2.6/drivers/video/i810/i810_main.c
--- linus-2.6/drivers/video/i810/i810_main.c	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/i810/i810_main.c	2005-08-02 15:00:52.000000000 -0700
@@ -1375,7 +1375,6 @@
 	decode_var(&info->var, par);
 	i810_load_regs(par);
 	i810_init_cursor(par);
-
 	encode_fix(&info->fix, info);
 
 	if (info->var.accel_flags && !(par->dev_flags & LOCKUP)) {
@@ -1387,6 +1386,7 @@
 		info->pixmap.scan_align = 1;
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	info->flags |= FBINFO_HWACCEL_CURSOR;
 	return 0;
 }
 
@@ -1418,9 +1418,8 @@
 	struct i810fb_par *par = (struct i810fb_par *)info->par;
 	u8 __iomem *mmio = par->mmio_start_virtual;
 
-	if (!(par->dev_flags & USE_HWCUR) || !info->var.accel_flags ||
-	    par->dev_flags & LOCKUP)
-		return soft_cursor(info, cursor);
+	if (!par->dev_flags & LOCKUP)
+		return -ENXIO;
 
 	if (cursor->image.width > 64 || cursor->image.height > 64)
 		return -ENXIO;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbdrv.c fbdev-2.6/drivers/video/intelfb/intelfbdrv.c
--- linus-2.6/drivers/video/intelfb/intelfbdrv.c	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbdrv.c	2005-08-02 19:01:32.000000000 -0700
@@ -117,14 +117,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
@@ -242,7 +238,7 @@
 static char *mode       = NULL;
 
 module_param(accel, bool, S_IRUGO);
-MODULE_PARM_DESC(accel, "Enable console acceleration");
+MODULE_PARM_DESC(accel, "Enable hardware acceleration");
 module_param(vram, int, S_IRUGO);
 MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
 module_param(voffset, int, S_IRUGO);
@@ -498,7 +494,7 @@
 {
 	struct fb_info *info;
 	struct intelfb_info *dinfo;
-	int i, j, err, dvo;
+	int i, err, dvo;
 	int aperture_size, stolen_size;
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
@@ -841,13 +837,6 @@
 	if (bailearly == 5)
 		bailout(dinfo);
 
-	for (i = 0; i < 16; i++) {
-		j = color_table[i];
-		dinfo->palette[i].red = default_red[j];
-		dinfo->palette[i].green = default_grn[j];
-		dinfo->palette[i].blue = default_blu[j];
-	}
-
 	if (bailearly == 6)
 		bailout(dinfo);
 
@@ -1332,6 +1321,8 @@
 	} else {
 		info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 	}
+	if (dinfo->hwcursor)
+		info->flags |= FBINFO_HWACCEL_CURSOR;
 	kfree(hw);
 	return 0;
 invalid_mode:
@@ -1359,10 +1350,6 @@
 			green >>= 8;
 			blue >>= 8;
 
-			dinfo->palette[regno].red = red;
-			dinfo->palette[regno].green = green;
-			dinfo->palette[regno].blue = blue;
-
 			intelfbhw_setcolreg(dinfo, regno, red, green, blue,
 					    transp);
 		}
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfb.h fbdev-2.6/drivers/video/intelfb/intelfb.h
--- linus-2.6/drivers/video/intelfb/intelfb.h	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfb.h	2005-08-02 19:01:32.000000000 -0700
@@ -234,7 +234,6 @@
 
 	/* palette */
 	u32 pseudo_palette[17];
-	struct { u8 red, green, blue, pad; } palette[256];
 
 	/* chip info */
 	int pci_chipset;
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/intelfb/intelfbhw.c fbdev-2.6/drivers/video/intelfb/intelfbhw.c
--- linus-2.6/drivers/video/intelfb/intelfbhw.c	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/intelfb/intelfbhw.c	2005-08-02 19:01:32.000000000 -0700
@@ -29,14 +29,10 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
-#include <linux/console.h>
-#include <linux/selection.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <linux/kd.h>
-#include <linux/vt_kern.h>
 #include <linux/pagemap.h>
 #include <linux/version.h>
 
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/nvidia/nvidia.c fbdev-2.6/drivers/video/nvidia/nvidia.c
--- linus-2.6/drivers/video/nvidia/nvidia.c	2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/nvidia/nvidia.c	2005-08-02 15:00:52.000000000 -0700
@@ -1300,6 +1300,7 @@
 	    | FBINFO_HWACCEL_IMAGEBLIT
 	    | FBINFO_HWACCEL_FILLRECT
 	    | FBINFO_HWACCEL_COPYAREA
+	    | FBINFO_HWACCEL_CURSOR
 	    | FBINFO_HWACCEL_YPAN;
 
 	fb_videomode_to_modelist(info->monspecs.modedb,
diff -urN -X /home/jsimmons/dontdiff linus-2.6/drivers/video/riva/fbdev.c fbdev-2.6/drivers/video/riva/fbdev.c
--- linus-2.6/drivers/video/riva/fbdev.c	2005-07-28 10:24:11.000000000 -0700
+++ fbdev-2.6/drivers/video/riva/fbdev.c	2005-08-02 15:00:52.000000000 -0700
@@ -1704,7 +1704,8 @@
 		    | FBINFO_HWACCEL_YPAN
 		    | FBINFO_HWACCEL_COPYAREA
 		    | FBINFO_HWACCEL_FILLRECT
-	            | FBINFO_HWACCEL_IMAGEBLIT;
+	            | FBINFO_HWACCEL_IMAGEBLIT
+		    | FBINFO_HWACCEL_CURSOR;
 
 	/* Accel seems to not work properly on NV30 yet...*/
 	if ((par->riva.Architecture == NV_ARCH_30) || noaccel) {
diff -urN -X /home/jsimmons/dontdiff linus-2.6/include/linux/fb.h fbdev-2.6/include/linux/fb.h
--- linus-2.6/include/linux/fb.h	2005-07-11 10:07:22.000000000 -0700
+++ fbdev-2.6/include/linux/fb.h	2005-08-02 15:00:52.000000000 -0700
@@ -702,6 +702,7 @@
 #define FBINFO_HWACCEL_XPAN		0x1000 /* optional */
 #define FBINFO_HWACCEL_YPAN		0x2000 /* optional */
 #define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */
+#define FBINFO_HWACCEL_CURSOR		0x8000 /* required */
 
 #define FBINFO_MISC_USEREVENT          0x10000 /* event request
 						  from userspace */


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: Andrew Morton <hidden>
Date: 2005-08-07 04:29:14

James Simmons [off-list ref] wrote:
 This patch forbids the cursor use from userland. The reason is that the 
 cursor area could be altered by a another process and the current system
 doesn't handle syncing those updates.
Can this change break existing apps?


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: Re: [PATCH] Don't allow softcursor use from userland

From: Jon Smirl <hidden>
Date: 2005-08-07 04:41:49

On 8/7/05, Andrew Morton [off-list ref] wrote:
James Simmons [off-list ref] wrote:
quoted
 This patch forbids the cursor use from userland. The reason is that the
 cursor area could be altered by a another process and the current system
 doesn't handle syncing those updates.
Can this change break existing apps?
This change is not agreed too yet. Antonio and I are proposing a
different solution.
http://comments.gmane.org/gmane.linux.fbdev.devel/7118

The alternate solution takes into account that fbconsole is the only
user of softcursor and moves softcursor into console.  fbdev drivers
then only expose a cursor entry point if they have a hardware cursor.
If they don't the entry point is NULL.

Nether solution should break existing apps since the existing
softcursor scheme was broken from user space and unusable.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-07 10:35:15

James Simmons wrote:
This patch forbids the cursor use from userland. The reason is that the 
cursor area could be altered by a another process and the current system
doesn't handle syncing those updates.
I don't really like this change.  I prefer Jon's proposal of setting
fbops->fb_cursor = NULL and moving softcursor.c to drivers/video/console.
This will slash > 200 lines of source code and several bytes from the kernel
image size. Plus it's cleaner.

Tony



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-07 23:17:06

James Simmons wrote:
quoted
This patch forbids the cursor use from userland. The reason is that the 
cursor area could be altered by a another process and the current system
doesn't handle syncing those updates.
I don't really like this change.  I prefer Jon's proposal of setting
fbops->fb_cursor = NULL and moving softcursor.c to drivers/video/console.
This will slash > 200 lines of source code and several bytes from the kernel
image size. Plus it's cleaner.
One change at a time. If you want to properly do cursor in fbcon then just 
moving softcursor there is not the answer. What if you have a driver that 
has software image blit and hardware fillrect. You want to have fbcon use 
the hardware fillrect to draw the cursor using xor mode. See the problem 
is more than just moving softcursor.c. Softcursor.c should go away 
completely. 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-07 23:19:47

On Sat, 6 Aug 2005, Andrew Morton wrote:
James Simmons [off-list ref] wrote:
quoted
 This patch forbids the cursor use from userland. The reason is that the 
 cursor area could be altered by a another process and the current system
 doesn't handle syncing those updates.
Can this change break existing apps?
No. No one uses the sysfs for the cursro yet.  


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-07 23:25:46

This change is not agreed too yet. Antonio and I are proposing a
different solution.
http://comments.gmane.org/gmane.linux.fbdev.devel/7118

The alternate solution takes into account that fbconsole is the only
user of softcursor and moves softcursor into console.  fbdev drivers
then only expose a cursor entry point if they have a hardware cursor.
If they don't the entry point is NULL.

Nether solution should break existing apps since the existing
softcursor scheme was broken from user space and unusable.
That is too big a change at one time and moving soft_cursor to fbcon is a 
partial solution. See my other email. I don't want to touch every driver
at this point!! First prevent anyone from using soft cursor from userland.
Second fix fbcon version of the cursor. That mean doing more than just 
moving the softcursor into fbcon. Third as drivers are updated remove the 
soft cursor hooks. It will not break anything. 

P.S
  When I first started out I sent giant patches that impacted alot of 
things. People got upset. Please don't repeat my mistakes with giant 
patches that impact every driver.




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-08 00:59:32

James Simmons wrote:
quoted
James Simmons wrote:
    
quoted
This patch forbids the cursor use from userland. The reason is that the 
cursor area could be altered by a another process and the current system
doesn't handle syncing those updates.

      
I don't really like this change.  I prefer Jon's proposal of setting
fbops->fb_cursor = NULL and moving softcursor.c to drivers/video/console.
This will slash > 200 lines of source code and several bytes from the kernel
image size. Plus it's cleaner.
    
One change at a time. If you want to properly do cursor in fbcon then just 
moving softcursor there is not the answer. What if you have a driver that 
  
See the patch again, there's only one logical change. And the intent of the
patch was never to support userspace cursor.
has software image blit and hardware fillrect. You want to have fbcon use 
  
Then the driver sets fbops->fb_cursor with its own version that does 
fillrect instead of imageblit.

I think you're still trying to overload fbops->fb_cursor. These drawing 
functions in info->fbops (fb_imageblit, fb_fillrect, fb_copyarea and
fb_cursor) are  for fbcon use _only_. They cannot be used in userspace
because of the inherent limitations of the code, and it depends on fields
that are internal to fbdev/fbcon (ie pseudo_palette). And even if you make it
work, I doubt it will be efficient code. Remember that the fbcon  hooks were
written in such a way so that we can have a very fast console, but it
sacrifices  userspace compatibility.

If you want to add userspace support for hardware cursors then you have to
create another API. If you don't want another API, then forget about userspace
support. Overloading fbops->fb_cursor is not the answer.

Tony




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-08 17:35:40


What is wrong with brekaing this patch into smaller pieces????????????
I'm not getting a answer!!!!! As I said no giant patches that tocuh every 
driver.
quoted
has software image blit and hardware fillrect. You want to have fbcon use 
  
Then the driver sets fbops->fb_cursor with its own version that does 
fillrect instead of imageblit.
No. fb_cursor is only used for a hardware cursor case. 
If you want to add userspace support for hardware cursors then you have to
create another API. If you don't want another API, then forget about userspace
support. Overloading fbops->fb_cursor is not the answer.
So fbops->fb_cursor will not be used at all for the console? 

Look the patch I sent is small and doesn't interfere with many drivers. It 
does stop your desires either. Personally softcursor should go away.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: Jon Smirl <hidden>
Date: 2005-08-08 17:59:59

On 8/8/05, James Simmons [off-list ref] wrote:

What is wrong with brekaing this patch into smaller pieces????????????
I'm not getting a answer!!!!! As I said no giant patches that tocuh every
driver.
quoted
quoted
has software image blit and hardware fillrect. You want to have fbcon use
Then the driver sets fbops->fb_cursor with its own version that does
fillrect instead of imageblit.
No. fb_cursor is only used for a hardware cursor case.
quoted
If you want to add userspace support for hardware cursors then you have to
create another API. If you don't want another API, then forget about userspace
support. Overloading fbops->fb_cursor is not the answer.
So fbops->fb_cursor will not be used at all for the console?
fbconsole check to see if fbops->fb_cursor is not null, if it is not
null it uses the hardware cursor. Otherwise it uses it's internal
softcursor implementation.
Look the patch I sent is small and doesn't interfere with many drivers. It
does stop your desires either. Personally softcursor should go away.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-08 18:16:10

quoted
So fbops->fb_cursor will not be used at all for the console?
fbconsole check to see if fbops->fb_cursor is not null, if it is not
null it uses the hardware cursor. Otherwise it uses it's internal
softcursor implementation.
See my other email about drivers have a hwcursor flag to turn hardware 
cursor off and on.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: James Simmons <hidden>
Date: 2005-08-09 02:04:08

quoted
What is wrong with brekaing this patch into smaller pieces????????????
I'm not getting a answer!!!!! As I said no giant patches that tocuh every 
driver.
quoted
quoted
has software image blit and hardware fillrect. You want to have fbcon use 
  
Then the driver sets fbops->fb_cursor with its own version that does 
fillrect instead of imageblit.
No. fb_cursor is only used for a hardware cursor case. 
And what happens if the driver does not have support for a hardware cursor? 
quoted
quoted
If you want to add userspace support for hardware cursors then you have to
create another API. If you don't want another API, then forget about userspace
support. Overloading fbops->fb_cursor is not the answer.
So fbops->fb_cursor will not be used at all for the console? 
You're getting it backwards.  fbops->fb_cursor is for the console. If you want
userspace hardware cursor, then we need a new API.  It's not something that I
want, just a fact.  Look at the code. Remember, I wrote the orginal fb_cursor
code, so I know its limitations. The sole purpose was to replace the 2.4
permanently blinking block and to allow users to have a choice of using an
underline or block cursor. 

But to overload fbops->fb_cursor for use in userspace will just introduce new
headaches and will be painful to debug.
quoted
Look the patch I sent is small and doesn't interfere with many drivers. It 
does stop your desires either. Personally softcursor should go away.
And force all maintainers to write forhardware cursor support?  Even X doesn't have
that 100% support. Might as well remove cfbimageblit, cfbfillrect and
cfbcopyarea too, if that's what you want.
What I mean is soft_cursor shouldn't be bounds to fbops->fb_cursor. Since 
no one understands what I'm trying to say I will create a nice patch to 
show you what I mean. Okay!!!!!!!



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Re: [PATCH] Don't allow softcursor use from userland

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-10 01:35:42

James Simmons wrote:
What is wrong with brekaing this patch into smaller pieces????????????
I'm not getting a answer!!!!! As I said no giant patches that tocuh every 
driver.
quoted
quoted
has software image blit and hardware fillrect. You want to have fbcon use 
  
Then the driver sets fbops->fb_cursor with its own version that does 
fillrect instead of imageblit.
No. fb_cursor is only used for a hardware cursor case. 
And what happens if the driver does not have support for a hardware cursor? 
quoted
If you want to add userspace support for hardware cursors then you have to
create another API. If you don't want another API, then forget about userspace
support. Overloading fbops->fb_cursor is not the answer.
So fbops->fb_cursor will not be used at all for the console? 
You're getting it backwards.  fbops->fb_cursor is for the console. If you want
userspace hardware cursor, then we need a new API.  It's not something that I
want, just a fact.  Look at the code. Remember, I wrote the orginal fb_cursor
code, so I know its limitations. The sole purpose was to replace the 2.4
permanently blinking block and to allow users to have a choice of using an
underline or block cursor. 

But to overload fbops->fb_cursor for use in userspace will just introduce new
headaches and will be painful to debug.
Look the patch I sent is small and doesn't interfere with many drivers. It 
does stop your desires either. Personally softcursor should go away.
And force all maintainers to write forhardware cursor support?  Even X doesn't have
that 100% support. Might as well remove cfbimageblit, cfbfillrect and
cfbcopyarea too, if that's what you want.

Tony


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help