From 4c7ffe0b9f7f40bd818fe3af51342f64c483908e Mon Sep 17 00:00:00 2001 From: James Simmons Date: Fri, 9 Sep 2005 13:04:31 -0700 Subject: [PATCH] fbdev: prevent drivers that have hardware cursors from calling software cursor code This patch removes drivers that have hardware cursors from calling the software cursor code. Also if the driver sets a no hardware cursor flag then the driver reports a error it someone attempts to use the cursor. Signed-off-by: James Simmons Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/nvidia/nvidia.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video/nvidia') diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 30f80c23f93..af99ea96012 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -893,7 +893,7 @@ static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor) int i, set = cursor->set; u16 fg, bg; - if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) + if (!hwcur || cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) return -ENXIO; NVShowHideCursor(par, 0); @@ -1356,8 +1356,6 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info) info->pixmap.size = 8 * 1024; info->pixmap.flags = FB_PIXMAP_SYSTEM; - if (!hwcur) - info->fbops->fb_cursor = soft_cursor; info->var.accel_flags = (!noaccel); switch (par->Architecture) { -- cgit v1.2.3