Rev 3298 | Rev 3482 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3298 | Rev 3480 | ||
---|---|---|---|
Line 478... | Line 478... | ||
478 | 478 | ||
Line 479... | Line 479... | ||
479 | /* You don't need to worry about fragmentation issues. |
479 | /* You don't need to worry about fragmentation issues. |
480 | * GTT space is continuous. I guarantee it. */ |
480 | * GTT space is continuous. I guarantee it. */ |
Line 481... | Line 481... | ||
481 | 481 | ||
482 | mapped = bits = (u32*)MapIoMem(dev_priv->mm.gtt->gma_bus_addr + obj->gtt_offset, |
482 | mapped = bits = (u32*)MapIoMem(dev_priv->gtt.mappable_base + obj->gtt_offset, |
Line 483... | Line 483... | ||
483 | CURSOR_WIDTH*CURSOR_HEIGHT*4, PG_SW); |
483 | CURSOR_WIDTH*CURSOR_HEIGHT*4, PG_SW); |
484 | 484 | ||
485 | if (unlikely(bits == NULL)) |
485 | if (unlikely(bits == NULL)) |
Line 679... | Line 679... | ||
679 | rect_t winrc; |
679 | rect_t winrc; |
680 | u32 slot; |
680 | u32 slot; |
681 | int ret; |
681 | int ret; |
682 | 682 | ||
Line -... | Line 683... | ||
- | 683 | if(mask->handle == -2) |
|
- | 684 | { |
|
- | 685 | printf("%s handle %d\n", __FUNCTION__, mask->handle); |
|
- | 686 | return 0; |
|
- | 687 | } |
|
- | 688 | ||
683 | obj = drm_gem_object_lookup(dev, file, mask->handle); |
689 | obj = drm_gem_object_lookup(dev, file, mask->handle); |
684 | if (obj == NULL) |
690 | if (obj == NULL) |
685 | return -ENOENT; |
691 | return -ENOENT; |
Line 686... | Line 692... | ||
686 | 692 | ||
Line 881... | Line 887... | ||
881 | 887 | ||
Line 882... | Line 888... | ||
882 | return 1; |
888 | return 1; |
883 | }; |
889 | }; |
Line -... | Line 890... | ||
- | 890 | ||
- | 891 | bool queue_work(struct workqueue_struct *wq, struct work_struct *work) |
|
- | 892 | { |
|
- | 893 | return __queue_work(wq, work); |
|
- | 894 | } |
|
- | 895 | ||
884 | 896 | ||
885 | void __stdcall delayed_work_timer_fn(unsigned long __data) |
897 | void __stdcall delayed_work_timer_fn(unsigned long __data) |
886 | { |
898 | { |
887 | struct delayed_work *dwork = (struct delayed_work *)__data; |
899 | struct delayed_work *dwork = (struct delayed_work *)__data; |
Line 960... | Line 972... | ||
960 | ts->tv_nsec = nsec; |
972 | ts->tv_nsec = nsec; |
961 | }>24); |
973 | } |
962 | 974 | ||
Line -... | Line 975... | ||
- | 975 | ||
- | 976 | void |
|
- | 977 | prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state) |
|
- | 978 | { |
|
- | 979 | unsigned long flags; |
|
- | 980 | ||
- | 981 | // wait->flags &= ~WQ_FLAG_EXCLUSIVE; |
|
- | 982 | spin_lock_irqsave(&q->lock, flags); |
|
- | 983 | if (list_empty(&wait->task_list)) |
|
- | 984 | __add_wait_queue(q, wait); |
|
- | 985 | spin_unlock_irqrestore(&q->lock, flags); |
|
- | 986 | } |
|
- | 987 | ||
- | 988 | /** |
|
- | 989 | * finish_wait - clean up after waiting in a queue |
|
- | 990 | * @q: waitqueue waited on |
|
- | 991 | * @wait: wait descriptor |
|
- | 992 | * |
|
- | 993 | * Sets current thread back to running state and removes |
|
- | 994 | * the wait descriptor from the given waitqueue if still |
|
- | 995 | * queued. |
|
- | 996 | */ |
|
- | 997 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait) |
|
- | 998 | { |
|
- | 999 | unsigned long flags; |
|
- | 1000 | ||
- | 1001 | // __set_current_state(TASK_RUNNING); |
|
- | 1002 | /* |
|
- | 1003 | * We can check for list emptiness outside the lock |
|
- | 1004 | * IFF: |
|
- | 1005 | * - we use the "careful" check that verifies both |
|
- | 1006 | * the next and prev pointers, so that there cannot |
|
- | 1007 | * be any half-pending updates in progress on other |
|
- | 1008 | * CPU's that we haven't seen yet (and that might |
|
- | 1009 | * still change the stack area. |
|
- | 1010 | * and |
|
- | 1011 | * - all other users take the lock (ie we can only |
|
- | 1012 | * have _one_ other CPU that looks at or modifies |
|
- | 1013 | * the list). |
|
- | 1014 | */ |
|
- | 1015 | if (!list_empty_careful(&wait->task_list)) { |
|
- | 1016 | spin_lock_irqsave(&q->lock, flags); |
|
- | 1017 | list_del_init(&wait->task_list); |
|
- | 1018 | spin_unlock_irqrestore(&q->lock, flags); |
|
- | 1019 | } |
|
- | 1020 | ||
- | 1021 | DestroyEvent(wait->evnt); |
|
- | 1022 | } |
|
- | 1023 | ||
- | 1024 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) |
|
- | 1025 | { |
|
- | 1026 | list_del_init(&wait->task_list); |
|
- | 1027 | return 1; |
|
- | 1028 | }>24); |
|
- | 1029 | ||
- | 1030 | ><24); |
|
- | 1031 |