Rev 3764 | Rev 5271 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3764 | Rev 5078 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
- | 2 | #include |
|
2 | #include |
3 | #include |
3 | #include |
4 | #include |
4 | #include "radeon_drm.h" |
- | |
5 | #include "radeon.h" |
5 | #include "radeon.h" |
6 | #include "radeon_object.h" |
6 | #include "radeon_object.h" |
7 | #include "bitmap.h" |
7 | #include "bitmap.h" |
8 | #include "display.h" |
8 | #include "display.h" |
Line 9... | Line 9... | ||
9 | 9 | ||
Line 10... | Line 10... | ||
10 | #include "r100d.h" |
10 | #include "r100d.h" |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | 12 | ||
Line 13... | Line 13... | ||
13 | display_t *rdisplay; |
13 | display_t *os_display; |
Line 29... | Line 29... | ||
29 | 29 | ||
Line 30... | Line 30... | ||
30 | int i,j; |
30 | int i,j; |
31 | int r; |
31 | int r; |
Line 32... | Line 32... | ||
32 | 32 | ||
Line 33... | Line 33... | ||
33 | rdev = (struct radeon_device *)rdisplay->ddev->dev_private; |
33 | rdev = (struct radeon_device *)os_display->ddev->dev_private; |
34 | 34 | ||
Line 35... | Line 35... | ||
35 | r = radeon_bo_create(rdev, CURSOR_WIDTH*CURSOR_HEIGHT*4, |
35 | r = radeon_bo_create(rdev, CURSOR_WIDTH*CURSOR_HEIGHT*4, |
36 | PAGE_SIZE, false, RADEON_GEM_DOMAIN_VRAM, NULL, &cursor->robj); |
36 | PAGE_SIZE, false, RADEON_GEM_DOMAIN_VRAM, 0, NULL, &cursor->robj); |
Line 37... | Line 37... | ||
37 | 37 | ||
Line 80... | Line 80... | ||
80 | }; |
80 | }; |
81 | 81 | ||
Line 82... | Line 82... | ||
82 | static void radeon_show_cursor() |
82 | static void radeon_show_cursor() |
83 | { |
83 | { |
84 | struct radeon_device *rdev = (struct radeon_device *)rdisplay->ddev->dev_private; |
84 | struct radeon_device *rdev = (struct radeon_device *)os_display->ddev->dev_private; |
Line 85... | Line 85... | ||
85 | 85 | ||
86 | 86 | ||
87 | if (ASIC_IS_DCE4(rdev)) { |
87 | if (ASIC_IS_DCE4(rdev)) { |
Line 105... | Line 105... | ||
105 | struct radeon_device *rdev; |
105 | struct radeon_device *rdev; |
106 | cursor_t *old; |
106 | cursor_t *old; |
107 | uint32_t gpu_addr; |
107 | uint32_t gpu_addr; |
108 | 108 | ||
Line 109... | Line 109... | ||
109 | rdev = (struct radeon_device *)rdisplay->ddev->dev_private; |
109 | rdev = (struct radeon_device *)os_display->ddev->dev_private; |
Line 110... | Line 110... | ||
110 | 110 | ||
Line 111... | Line 111... | ||
111 | old = rdisplay->cursor; |
111 | old = os_display->cursor; |
112 | 112 | ||
Line 113... | Line 113... | ||
113 | rdisplay->cursor = cursor; |
113 | os_display->cursor = cursor; |
114 | gpu_addr = radeon_bo_gpu_offset(cursor->robj); |
114 | gpu_addr = radeon_bo_gpu_offset(cursor->robj); |
115 | 115 | ||
Line 134... | Line 134... | ||
134 | static void radeon_lock_cursor(bool lock) |
134 | static void radeon_lock_cursor(bool lock) |
135 | { |
135 | { |
136 | struct radeon_device *rdev; |
136 | struct radeon_device *rdev; |
Line 137... | Line 137... | ||
137 | 137 | ||
Line 138... | Line 138... | ||
138 | rdev = (struct radeon_device *)rdisplay->ddev->dev_private; |
138 | rdev = (struct radeon_device *)os_display->ddev->dev_private; |
Line 139... | Line 139... | ||
139 | 139 | ||
140 | uint32_t cur_lock; |
140 | uint32_t cur_lock; |
Line 166... | Line 166... | ||
166 | 166 | ||
167 | void __stdcall move_cursor(cursor_t *cursor, int x, int y) |
167 | void __stdcall move_cursor(cursor_t *cursor, int x, int y) |
168 | { |
168 | { |
169 | struct radeon_device *rdev; |
169 | struct radeon_device *rdev; |
Line 170... | Line 170... | ||
170 | rdev = (struct radeon_device *)rdisplay->ddev->dev_private; |
170 | rdev = (struct radeon_device *)os_display->ddev->dev_private; |
171 | 171 | ||
172 | int hot_x = cursor->hot_x; |
172 | int hot_x = cursor->hot_x; |
Line 231... | Line 231... | ||
231 | u32_t ifl; |
231 | u32_t ifl; |
232 | 232 | ||
Line 233... | Line 233... | ||
233 | ENTER(); |
233 | ENTER(); |
Line 234... | Line 234... | ||
234 | 234 | ||
Line 235... | Line 235... | ||
235 | rdisplay = GetDisplay(); |
235 | os_display = GetDisplay(); |
Line 236... | Line 236... | ||
236 | 236 | ||
237 | dev = rdisplay->ddev = rdev->ddev; |
237 | dev = os_display->ddev = rdev->ddev; |
238 | 238 | ||
239 | ifl = safe_cli(); |
239 | ifl = safe_cli(); |
240 | { |
240 | { |
241 | list_for_each_entry(cursor, &rdisplay->cursors, list) |
241 | list_for_each_entry(cursor, &os_display->cursors, list) |
Line 242... | Line 242... | ||
242 | { |
242 | { |
243 | init_cursor(cursor); |
243 | init_cursor(cursor); |
244 | }; |
244 | }; |
245 | 245 | ||
246 | rdisplay->restore_cursor(0,0); |
246 | os_display->restore_cursor(0,0); |
247 | rdisplay->init_cursor = init_cursor; |
247 | os_display->init_cursor = init_cursor; |
248 | rdisplay->select_cursor = select_cursor; |
248 | os_display->select_cursor = select_cursor; |
Line 249... | Line 249... | ||
249 | rdisplay->show_cursor = NULL; |
249 | os_display->show_cursor = NULL; |
250 | rdisplay->move_cursor = move_cursor; |
250 | os_display->move_cursor = move_cursor; |
251 | rdisplay->restore_cursor = restore_cursor; |
251 | os_display->restore_cursor = restore_cursor; |
252 | rdisplay->disable_mouse = disable_mouse; |
252 | os_display->disable_mouse = disable_mouse; |
Line 253... | Line 253... | ||
253 | 253 |