Commit 5503983
xe/oa: Fix query mode of operation for OAR/OAC
This is a set of squashed commits to facilitate smooth applying to
stable. Each commit message is retained for reference.
1) Allow a GGTT mapped batch to be submitted to user exec queue
For a OA use case, one of the HW registers needs to be modified by
submitting an MI_LOAD_REGISTER_IMM command to the users exec queue, so
that the register is modified in the user's hardware context. In order
to do this a batch that is mapped in GGTT, needs to be submitted to the
user exec queue. Since all user submissions use q->vm and hence PPGTT,
add some plumbing to enable submission of batches mapped in GGTT.
v2: ggtt is zero-initialized, so no need to set it false (Matt Brost)
2) xe/oa: Use MI_LOAD_REGISTER_IMMEDIATE to enable OAR/OAC
To enable OAR/OAC, a bit in RING_CONTEXT_CONTROL needs to be set.
Setting this bit cause the context image size to change and if not done
correct, can cause undesired hangs.
Current code uses a separate exec_queue to modify this bit and is
error-prone. As per HW recommendation, submit MI_LOAD_REGISTER_IMM to
the target hardware context to modify the relevant bit.
In v2 version, an attempt to submit everything to the user-queue was
made, but it failed the unprivileged-single-ctx-counters test. It
appears that the OACTXCONTROL must be modified from a remote context.
In v3 version, all context specific register configurations were moved
to use LOAD_REGISTER_IMMEDIATE and that seems to work well. This is a
cleaner way, since we can now submit all configuration to user
exec_queue and the fence handling is simplified.
v2:
(Matt)
- set job->ggtt to true if create job is successful
- unlock vm on job error
(Ashutosh)
- don't wait on job submission
- use kernel exec queue where possible
v3:
(Ashutosh)
- Fix checkpatch issues
- Remove extra spaces/new-lines
- Add Fixes: and Cc: tags
- Reset context control bit when OA stream is closed
- Submit all config via MI_LOAD_REGISTER_IMMEDIATE
(Umesh)
- Update commit message for v3 experiment
- Squash patches for easier port to stable
v4:
(Ashutosh)
- No need to pass q to xe_oa_submit_bb
- Do not support exec queues with width > 1
- Fix disabling of CTX_CTRL_OAC_CONTEXT_ENABLE
v5:
(Ashutosh)
- Drop reg_lri related comments
- Use XE_OA_SUBMIT_NO_DEPS in xe_oa_load_with_lri
Fixes: 8135f1c ("drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close")
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com> # commit 1
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220171919.571528-2-umesh.nerlige.ramappa@intel.com1 parent 0708908 commit 5503983
3 files changed
Lines changed: 51 additions & 92 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
| |||
605 | 599 | | |
606 | 600 | | |
607 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
| 621 | + | |
611 | 622 | | |
612 | 623 | | |
613 | 624 | | |
614 | 625 | | |
615 | | - | |
616 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
617 | 629 | | |
618 | 630 | | |
619 | 631 | | |
620 | 632 | | |
| 633 | + | |
621 | 634 | | |
622 | 635 | | |
623 | 636 | | |
| |||
632 | 645 | | |
633 | 646 | | |
634 | 647 | | |
| 648 | + | |
| 649 | + | |
635 | 650 | | |
636 | 651 | | |
637 | 652 | | |
638 | 653 | | |
| 654 | + | |
639 | 655 | | |
640 | 656 | | |
641 | 657 | | |
| |||
684 | 700 | | |
685 | 701 | | |
686 | 702 | | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
| 703 | + | |
734 | 704 | | |
735 | 705 | | |
736 | 706 | | |
737 | 707 | | |
738 | 708 | | |
739 | | - | |
| 709 | + | |
740 | 710 | | |
741 | 711 | | |
742 | 712 | | |
743 | 713 | | |
744 | 714 | | |
745 | | - | |
| 715 | + | |
746 | 716 | | |
747 | 717 | | |
748 | 718 | | |
| |||
762 | 732 | | |
763 | 733 | | |
764 | 734 | | |
765 | | - | |
766 | | - | |
767 | 735 | | |
768 | 736 | | |
769 | 737 | | |
770 | | - | |
| 738 | + | |
771 | 739 | | |
772 | 740 | | |
773 | | - | |
774 | 741 | | |
775 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
776 | 747 | | |
777 | 748 | | |
778 | | - | |
779 | | - | |
| 749 | + | |
| 750 | + | |
780 | 751 | | |
781 | 752 | | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | 753 | | |
791 | | - | |
792 | | - | |
| 754 | + | |
793 | 755 | | |
794 | 756 | | |
795 | 757 | | |
796 | 758 | | |
797 | 759 | | |
798 | | - | |
799 | | - | |
800 | 760 | | |
801 | 761 | | |
802 | | - | |
| 762 | + | |
803 | 763 | | |
804 | 764 | | |
805 | | - | |
806 | 765 | | |
807 | 766 | | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
808 | 771 | | |
809 | 772 | | |
810 | | - | |
811 | | - | |
| 773 | + | |
| 774 | + | |
812 | 775 | | |
813 | 776 | | |
814 | 777 | | |
815 | | - | |
816 | | - | |
817 | 778 | | |
818 | 779 | | |
819 | 780 | | |
820 | 781 | | |
821 | 782 | | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
| 783 | + | |
830 | 784 | | |
831 | 785 | | |
832 | 786 | | |
| |||
2110 | 2064 | | |
2111 | 2065 | | |
2112 | 2066 | | |
2113 | | - | |
2114 | | - | |
| 2067 | + | |
| 2068 | + | |
2115 | 2069 | | |
2116 | 2070 | | |
2117 | 2071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
0 commit comments