diff options
-rw-r--r-- | drivers/video/udlfb.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 0cca4873d490..d4f742ea0eda 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c | |||
@@ -39,9 +39,7 @@ static struct fb_fix_screeninfo dlfb_fix = { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST | | 41 | static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST | |
42 | #ifdef FBINFO_VIRTFB | ||
43 | FBINFO_VIRTFB | | 42 | FBINFO_VIRTFB | |
44 | #endif | ||
45 | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT | | 43 | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT | |
46 | FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR; | 44 | FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR; |
47 | 45 | ||
@@ -594,18 +592,6 @@ error: | |||
594 | return 0; | 592 | return 0; |
595 | } | 593 | } |
596 | 594 | ||
597 | static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf, | ||
598 | size_t count, loff_t *ppos) | ||
599 | { | ||
600 | ssize_t result = -ENOSYS; | ||
601 | |||
602 | #if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE | ||
603 | result = fb_sys_read(info, buf, count, ppos); | ||
604 | #endif | ||
605 | |||
606 | return result; | ||
607 | } | ||
608 | |||
609 | /* | 595 | /* |
610 | * Path triggered by usermode clients who write to filesystem | 596 | * Path triggered by usermode clients who write to filesystem |
611 | * e.g. cat filename > /dev/fb1 | 597 | * e.g. cat filename > /dev/fb1 |
@@ -615,12 +601,10 @@ static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf, | |||
615 | static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, | 601 | static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, |
616 | size_t count, loff_t *ppos) | 602 | size_t count, loff_t *ppos) |
617 | { | 603 | { |
618 | ssize_t result = -ENOSYS; | 604 | ssize_t result; |
619 | struct dlfb_data *dev = info->par; | 605 | struct dlfb_data *dev = info->par; |
620 | u32 offset = (u32) *ppos; | 606 | u32 offset = (u32) *ppos; |
621 | 607 | ||
622 | #if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE | ||
623 | |||
624 | result = fb_sys_write(info, buf, count, ppos); | 608 | result = fb_sys_write(info, buf, count, ppos); |
625 | 609 | ||
626 | if (result > 0) { | 610 | if (result > 0) { |
@@ -631,7 +615,6 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, | |||
631 | dlfb_handle_damage(dev, 0, start, info->var.xres, | 615 | dlfb_handle_damage(dev, 0, start, info->var.xres, |
632 | lines, info->screen_base); | 616 | lines, info->screen_base); |
633 | } | 617 | } |
634 | #endif | ||
635 | 618 | ||
636 | return result; | 619 | return result; |
637 | } | 620 | } |
@@ -643,14 +626,10 @@ static void dlfb_ops_copyarea(struct fb_info *info, | |||
643 | 626 | ||
644 | struct dlfb_data *dev = info->par; | 627 | struct dlfb_data *dev = info->par; |
645 | 628 | ||
646 | #if defined CONFIG_FB_SYS_COPYAREA || defined CONFIG_FB_SYS_COPYAREA_MODULE | ||
647 | |||
648 | sys_copyarea(info, area); | 629 | sys_copyarea(info, area); |
649 | 630 | ||
650 | dlfb_handle_damage(dev, area->dx, area->dy, | 631 | dlfb_handle_damage(dev, area->dx, area->dy, |
651 | area->width, area->height, info->screen_base); | 632 | area->width, area->height, info->screen_base); |
652 | #endif | ||
653 | |||
654 | } | 633 | } |
655 | 634 | ||
656 | static void dlfb_ops_imageblit(struct fb_info *info, | 635 | static void dlfb_ops_imageblit(struct fb_info *info, |
@@ -658,15 +637,10 @@ static void dlfb_ops_imageblit(struct fb_info *info, | |||
658 | { | 637 | { |
659 | struct dlfb_data *dev = info->par; | 638 | struct dlfb_data *dev = info->par; |
660 | 639 | ||
661 | #if defined CONFIG_FB_SYS_IMAGEBLIT || defined CONFIG_FB_SYS_IMAGEBLIT_MODULE | ||
662 | |||
663 | sys_imageblit(info, image); | 640 | sys_imageblit(info, image); |
664 | 641 | ||
665 | dlfb_handle_damage(dev, image->dx, image->dy, | 642 | dlfb_handle_damage(dev, image->dx, image->dy, |
666 | image->width, image->height, info->screen_base); | 643 | image->width, image->height, info->screen_base); |
667 | |||
668 | #endif | ||
669 | |||
670 | } | 644 | } |
671 | 645 | ||
672 | static void dlfb_ops_fillrect(struct fb_info *info, | 646 | static void dlfb_ops_fillrect(struct fb_info *info, |
@@ -674,17 +648,12 @@ static void dlfb_ops_fillrect(struct fb_info *info, | |||
674 | { | 648 | { |
675 | struct dlfb_data *dev = info->par; | 649 | struct dlfb_data *dev = info->par; |
676 | 650 | ||
677 | #if defined CONFIG_FB_SYS_FILLRECT || defined CONFIG_FB_SYS_FILLRECT_MODULE | ||
678 | |||
679 | sys_fillrect(info, rect); | 651 | sys_fillrect(info, rect); |
680 | 652 | ||
681 | dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width, | 653 | dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width, |
682 | rect->height, info->screen_base); | 654 | rect->height, info->screen_base); |
683 | #endif | ||
684 | |||
685 | } | 655 | } |
686 | 656 | ||
687 | #ifdef CONFIG_FB_DEFERRED_IO | ||
688 | /* | 657 | /* |
689 | * NOTE: fb_defio.c is holding info->fbdefio.mutex | 658 | * NOTE: fb_defio.c is holding info->fbdefio.mutex |
690 | * Touching ANY framebuffer memory that triggers a page fault | 659 | * Touching ANY framebuffer memory that triggers a page fault |
@@ -746,8 +715,6 @@ error: | |||
746 | &dev->cpu_kcycles_used); | 715 | &dev->cpu_kcycles_used); |
747 | } | 716 | } |
748 | 717 | ||
749 | #endif | ||
750 | |||
751 | static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len) | 718 | static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len) |
752 | { | 719 | { |
753 | int i; | 720 | int i; |
@@ -880,7 +847,6 @@ static int dlfb_ops_open(struct fb_info *info, int user) | |||
880 | 847 | ||
881 | kref_get(&dev->kref); | 848 | kref_get(&dev->kref); |
882 | 849 | ||
883 | #ifdef CONFIG_FB_DEFERRED_IO | ||
884 | if (fb_defio && (info->fbdefio == NULL)) { | 850 | if (fb_defio && (info->fbdefio == NULL)) { |
885 | /* enable defio at last moment if not disabled by client */ | 851 | /* enable defio at last moment if not disabled by client */ |
886 | 852 | ||
@@ -896,7 +862,6 @@ static int dlfb_ops_open(struct fb_info *info, int user) | |||
896 | info->fbdefio = fbdefio; | 862 | info->fbdefio = fbdefio; |
897 | fb_deferred_io_init(info); | 863 | fb_deferred_io_init(info); |
898 | } | 864 | } |
899 | #endif | ||
900 | 865 | ||
901 | dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n", | 866 | dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n", |
902 | info->node, user, info, dev->fb_count); | 867 | info->node, user, info, dev->fb_count); |
@@ -977,14 +942,12 @@ static int dlfb_ops_release(struct fb_info *info, int user) | |||
977 | if (dev->virtualized && (dev->fb_count == 0)) | 942 | if (dev->virtualized && (dev->fb_count == 0)) |
978 | schedule_delayed_work(&dev->free_framebuffer_work, HZ); | 943 | schedule_delayed_work(&dev->free_framebuffer_work, HZ); |
979 | 944 | ||
980 | #ifdef CONFIG_FB_DEFERRED_IO | ||
981 | if ((dev->fb_count == 0) && (info->fbdefio)) { | 945 | if ((dev->fb_count == 0) && (info->fbdefio)) { |
982 | fb_deferred_io_cleanup(info); | 946 | fb_deferred_io_cleanup(info); |
983 | kfree(info->fbdefio); | 947 | kfree(info->fbdefio); |
984 | info->fbdefio = NULL; | 948 | info->fbdefio = NULL; |
985 | info->fbops->fb_mmap = dlfb_ops_mmap; | 949 | info->fbops->fb_mmap = dlfb_ops_mmap; |
986 | } | 950 | } |
987 | #endif | ||
988 | 951 | ||
989 | dl_warn("released /dev/fb%d user=%d count=%d\n", | 952 | dl_warn("released /dev/fb%d user=%d count=%d\n", |
990 | info->node, user, dev->fb_count); | 953 | info->node, user, dev->fb_count); |
@@ -1103,7 +1066,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info) | |||
1103 | 1066 | ||
1104 | static struct fb_ops dlfb_ops = { | 1067 | static struct fb_ops dlfb_ops = { |
1105 | .owner = THIS_MODULE, | 1068 | .owner = THIS_MODULE, |
1106 | .fb_read = dlfb_ops_read, | 1069 | .fb_read = fb_sys_read, |
1107 | .fb_write = dlfb_ops_write, | 1070 | .fb_write = dlfb_ops_write, |
1108 | .fb_setcolreg = dlfb_ops_setcolreg, | 1071 | .fb_setcolreg = dlfb_ops_setcolreg, |
1109 | .fb_fillrect = dlfb_ops_fillrect, | 1072 | .fb_fillrect = dlfb_ops_fillrect, |