.. | .. |
---|
536 | 536 | __func__, acquire_fence_fd); |
---|
537 | 537 | return -EINVAL; |
---|
538 | 538 | } |
---|
539 | | - /* close acquire fence fd */ |
---|
540 | | - ksys_close(acquire_fence_fd); |
---|
| 539 | + |
---|
| 540 | + if (!request->feature.user_close_fence) { |
---|
| 541 | + /* close acquire fence fd */ |
---|
| 542 | +#ifdef CONFIG_NO_GKI |
---|
| 543 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) |
---|
| 544 | + close_fd(acquire_fence_fd); |
---|
| 545 | +#else |
---|
| 546 | + ksys_close(acquire_fence_fd); |
---|
| 547 | +#endif |
---|
| 548 | +#else |
---|
| 549 | + pr_err("Please update the driver to v1.2.28 to prevent acquire_fence_fd leaks."); |
---|
| 550 | + return -EFAULT; |
---|
| 551 | +#endif |
---|
| 552 | + } |
---|
| 553 | + |
---|
541 | 554 | |
---|
542 | 555 | ret = rga_dma_fence_get_status(acquire_fence); |
---|
543 | 556 | if (ret < 0) { |
---|
.. | .. |
---|
646 | 659 | scheduler->ops->soft_reset(scheduler); |
---|
647 | 660 | } |
---|
648 | 661 | |
---|
649 | | - pr_err("reset core[%d] by request abort", scheduler->core); |
---|
| 662 | + pr_err("reset core[%d] by request[%d] abort", |
---|
| 663 | + scheduler->core, request->id); |
---|
650 | 664 | running_abort_count++; |
---|
651 | 665 | } |
---|
652 | 666 | } |
---|
.. | .. |
---|
753 | 767 | } else if (!test_bit(RGA_JOB_STATE_DONE, &job->state) && |
---|
754 | 768 | test_bit(RGA_JOB_STATE_FINISH, &job->state)) { |
---|
755 | 769 | spin_unlock_irqrestore(&scheduler->irq_lock, flags); |
---|
756 | | - pr_err("hardware has finished, but the software has timeout!\n"); |
---|
| 770 | + pr_err("request[%d] hardware has finished, but the software has timeout!\n", |
---|
| 771 | + request->id); |
---|
757 | 772 | return -EBUSY; |
---|
758 | 773 | } else if (!test_bit(RGA_JOB_STATE_DONE, &job->state) && |
---|
759 | 774 | !test_bit(RGA_JOB_STATE_FINISH, &job->state)) { |
---|
760 | 775 | spin_unlock_irqrestore(&scheduler->irq_lock, flags); |
---|
761 | | - pr_err("hardware has timeout.\n"); |
---|
| 776 | + pr_err("request[%d] hardware has timeout.\n", request->id); |
---|
762 | 777 | return -EBUSY; |
---|
763 | 778 | } |
---|
764 | 779 | } |
---|
.. | .. |
---|
831 | 846 | struct rga_pending_request_manager *request_manager = rga_drvdata->pend_request_manager; |
---|
832 | 847 | |
---|
833 | 848 | if (rga_request_commit(request)) |
---|
834 | | - pr_err("rga request commit failed!\n"); |
---|
| 849 | + pr_err("rga request[%d] commit failed!\n", request->id); |
---|
835 | 850 | |
---|
836 | 851 | mutex_lock(&request_manager->lock); |
---|
837 | 852 | rga_request_put(request); |
---|
.. | .. |
---|
845 | 860 | struct rga_pending_request_manager *request_manager; |
---|
846 | 861 | struct rga_request *request; |
---|
847 | 862 | int finished_count, failed_count; |
---|
| 863 | + bool is_finished = false; |
---|
848 | 864 | unsigned long flags; |
---|
849 | 865 | |
---|
850 | 866 | request_manager = rga_drvdata->pend_request_manager; |
---|
.. | .. |
---|
893 | 909 | |
---|
894 | 910 | rga_dma_fence_signal(request->release_fence, request->ret); |
---|
895 | 911 | |
---|
896 | | - wake_up(&request->finished_wq); |
---|
| 912 | + is_finished = true; |
---|
897 | 913 | |
---|
898 | 914 | if (DEBUGGER_EN(MSG)) |
---|
899 | 915 | pr_info("request[%d] finished %d failed %d\n", |
---|
.. | .. |
---|
906 | 922 | } |
---|
907 | 923 | |
---|
908 | 924 | mutex_lock(&request_manager->lock); |
---|
| 925 | + |
---|
| 926 | + if (is_finished) |
---|
| 927 | + wake_up(&request->finished_wq); |
---|
| 928 | + |
---|
909 | 929 | rga_request_put(request); |
---|
| 930 | + |
---|
910 | 931 | mutex_unlock(&request_manager->lock); |
---|
911 | 932 | |
---|
912 | 933 | return 0; |
---|
.. | .. |
---|
960 | 981 | request->sync_mode = user_request->sync_mode; |
---|
961 | 982 | request->mpi_config_flags = user_request->mpi_config_flags; |
---|
962 | 983 | request->acquire_fence_fd = user_request->acquire_fence_fd; |
---|
| 984 | + request->feature = task_list[0].feature; |
---|
963 | 985 | |
---|
964 | 986 | spin_unlock_irqrestore(&request->lock, flags); |
---|
965 | 987 | |
---|
.. | .. |
---|
1095 | 1117 | request_commit: |
---|
1096 | 1118 | ret = rga_request_commit(request); |
---|
1097 | 1119 | if (ret < 0) { |
---|
1098 | | - pr_err("rga request commit failed!\n"); |
---|
| 1120 | + pr_err("rga request[%d] commit failed!\n", request->id); |
---|
1099 | 1121 | goto err_put_release_fence; |
---|
1100 | 1122 | } |
---|
1101 | 1123 | |
---|