Rev 4111 | Rev 5078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4111 | Rev 4570 | ||
---|---|---|---|
Line 96... | Line 96... | ||
96 | return 0; |
96 | return 0; |
Line 97... | Line 97... | ||
97 | 97 | ||
98 | if( cmdline && *cmdline ) |
98 | if( cmdline && *cmdline ) |
Line 99... | Line 99... | ||
99 | parse_cmdline(cmdline, log); |
99 | parse_cmdline(cmdline, log); |
100 | - | ||
101 | if(!dbg_open(log)) |
- | |
102 | { |
- | |
103 | strcpy(log, "/tmp1/1/vmw.log"); |
- | |
104 | // strcpy(log, "/RD/1/DRIVERS/VMW.log"); |
- | |
105 | // strcpy(log, "/HD0/1/vmw.log"); |
- | |
106 | 100 | ||
107 | if(!dbg_open(log)) |
101 | if( *log && !dbg_open(log)) |
108 | { |
102 | { |
109 | printf("Can't open %s\nExit\n", log); |
- | |
110 | return 0; |
103 | printf("Can't open %s\nExit\n", log); |
- | 104 | return 0; |
|
111 | }; |
105 | } |
Line 112... | Line 106... | ||
112 | } |
106 | |
113 | dbgprintf(" vmw v3.12-rc6\n cmdline: %s\n", cmdline); |
107 | dbgprintf(" vmw v3.14-rc1\n cmdline: %s\n", cmdline); |
Line 114... | Line 108... | ||
114 | 108 | ||
Line 818... | Line -... | ||
818 | - | ||
819 | - | ||
820 | - | ||
821 | 812 | ||
Line 822... | Line 813... | ||
822 | 813 | ||
Line 823... | Line -... | ||
823 | - | ||
824 | - | ||
825 | - | ||
Line 826... | Line 814... | ||
826 | #include "vmwgfx_kms.h" |
814 | |
Line 827... | Line 815... | ||
827 | 815 | ||
828 | void kms_update(); |
816 | |
Line 840... | Line 828... | ||
840 | uint32_t *data; |
828 | uint32_t *data; |
841 | uint32_t hot_x; |
829 | uint32_t hot_x; |
842 | uint32_t hot_y; |
830 | uint32_t hot_y; |
Line 843... | Line 831... | ||
843 | 831 | ||
844 | struct list_head list; |
- | |
845 | // struct drm_i915_gem_object *cobj; |
832 | struct list_head list; |
Line 846... | Line 833... | ||
846 | }cursor_t; |
833 | }cursor_t; |
847 | 834 | ||
Line 891... | Line 878... | ||
891 | count++; |
878 | count++; |
892 | }; |
879 | }; |
893 | return count; |
880 | return count; |
894 | }; |
881 | }; |
Line -... | Line 882... | ||
- | 882 | ||
- | 883 | static void __stdcall restore_cursor(int x, int y){}; |
|
- | 884 | static void disable_mouse(void) {}; |
|
- | 885 | ||
- | 886 | static void __stdcall move_cursor_kms(cursor_t *cursor, int x, int y) |
|
- | 887 | { |
|
- | 888 | struct drm_crtc *crtc = os_display->crtc; |
|
- | 889 | struct vmw_private *dev_priv = vmw_priv(crtc->dev); |
|
- | 890 | struct vmw_display_unit *du = vmw_crtc_to_du(crtc); |
|
- | 891 | ||
- | 892 | vmw_cursor_update_position(dev_priv, true, x,y); |
|
- | 893 | }; |
|
- | 894 | ||
- | 895 | static cursor_t* __stdcall select_cursor_kms(cursor_t *cursor) |
|
- | 896 | { |
|
- | 897 | struct vmw_private *dev_priv = vmw_priv(os_display->ddev); |
|
- | 898 | cursor_t *old; |
|
- | 899 | ||
- | 900 | old = os_display->cursor; |
|
- | 901 | os_display->cursor = cursor; |
|
- | 902 | ||
- | 903 | vmw_cursor_update_image(dev_priv, cursor->data, |
|
- | 904 | 64, 64, cursor->hot_x, cursor->hot_y); |
|
- | 905 | ||
- | 906 | // vmw_cursor_update_position(dev_priv, true, |
|
- | 907 | // du->cursor_x + du->hotspot_x, |
|
- | 908 | // du->cursor_y + du->hotspot_y); |
|
- | 909 | ||
- | 910 | return old; |
|
- | 911 | }; |
|
- | 912 | ||
895 | 913 | ||
896 | int kms_init(struct drm_device *dev) |
914 | int kms_init(struct drm_device *dev) |
897 | { |
915 | { |
898 | struct drm_connector *connector; |
916 | struct drm_connector *connector; |
899 | struct drm_connector_helper_funcs *connector_funcs; |
917 | struct drm_connector_helper_funcs *connector_funcs; |
Line 941... | Line 959... | ||
941 | { |
959 | { |
942 | os_display->ddev = dev; |
960 | os_display->ddev = dev; |
943 | os_display->connector = connector; |
961 | os_display->connector = connector; |
944 | os_display->crtc = crtc; |
962 | os_display->crtc = crtc; |
945 | os_display->supported_modes = mode_count; |
963 | os_display->supported_modes = mode_count; |
946 | // os_display->update = kms_update; |
- | |
947 | - | ||
948 | // struct intel_crtc *intel_crtc = to_intel_crtc(os_display->crtc); |
- | |
949 | - | ||
950 | // list_for_each_entry(cursor, &os_display->cursors, list) |
- | |
951 | // { |
- | |
952 | // init_cursor(cursor); |
- | |
953 | // }; |
- | |
954 | - | ||
955 | // os_display->restore_cursor(0,0); |
- | |
956 | // os_display->init_cursor = init_cursor; |
- | |
957 | // os_display->select_cursor = select_cursor_kms; |
- | |
958 | // os_display->show_cursor = NULL; |
- | |
959 | // os_display->move_cursor = move_cursor_kms; |
- | |
960 | // os_display->restore_cursor = restore_cursor; |
- | |
961 | // os_display->disable_mouse = disable_mouse; |
- | |
962 | - | ||
963 | // intel_crtc->cursor_x = os_display->width/2; |
- | |
964 | // intel_crtc->cursor_y = os_display->height/2; |
- | |
Line -... | Line 964... | ||
- | 964 | ||
- | 965 | os_display->restore_cursor(0,0); |
|
- | 966 | os_display->select_cursor = select_cursor_kms; |
|
- | 967 | os_display->show_cursor = NULL; |
|
- | 968 | os_display->move_cursor = move_cursor_kms; |
|
- | 969 | os_display->restore_cursor = restore_cursor; |
|
965 | 970 | os_display->disable_mouse = disable_mouse; |
|
966 | // select_cursor_kms(os_display->cursor); |
971 | select_cursor_kms(os_display->cursor); |
967 | }; |
972 | }; |
Line 968... | Line 973... | ||
968 | safe_sti(ifl); |
973 | safe_sti(ifl); |
969 | 974 |