Commit f0ed398
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 <[email protected]>
Reviewed-by: Matthew Brost <[email protected]> # commit 1
Reviewed-by: Ashutosh Dixit <[email protected]>
Cc: [email protected]
Reviewed-by: Jonathan Cavitt <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 5503983)
Signed-off-by: Thomas Hellström <[email protected]>1 parent fe39b22 commit f0ed398
File tree
3 files changed
+51
-90
lines changed- drivers/gpu/drm/xe
3 files changed
+51
-90
lines changed| 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 | | |
| |||
596 | 590 | | |
597 | 591 | | |
598 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
599 | 609 | | |
600 | 610 | | |
601 | 611 | | |
| 612 | + | |
602 | 613 | | |
603 | 614 | | |
604 | 615 | | |
605 | 616 | | |
606 | | - | |
607 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
608 | 620 | | |
609 | 621 | | |
610 | 622 | | |
611 | 623 | | |
| 624 | + | |
612 | 625 | | |
613 | 626 | | |
614 | 627 | | |
| |||
623 | 636 | | |
624 | 637 | | |
625 | 638 | | |
| 639 | + | |
| 640 | + | |
626 | 641 | | |
627 | 642 | | |
628 | 643 | | |
629 | 644 | | |
| 645 | + | |
630 | 646 | | |
631 | 647 | | |
632 | 648 | | |
| |||
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
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 | | - | |
| 694 | + | |
723 | 695 | | |
724 | 696 | | |
725 | 697 | | |
726 | 698 | | |
727 | 699 | | |
728 | | - | |
| 700 | + | |
729 | 701 | | |
730 | 702 | | |
731 | 703 | | |
732 | 704 | | |
733 | 705 | | |
734 | | - | |
| 706 | + | |
735 | 707 | | |
736 | 708 | | |
737 | 709 | | |
| |||
751 | 723 | | |
752 | 724 | | |
753 | 725 | | |
754 | | - | |
755 | | - | |
756 | 726 | | |
757 | 727 | | |
758 | 728 | | |
759 | | - | |
| 729 | + | |
760 | 730 | | |
761 | 731 | | |
762 | | - | |
763 | 732 | | |
764 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
765 | 738 | | |
766 | 739 | | |
767 | | - | |
768 | | - | |
| 740 | + | |
| 741 | + | |
769 | 742 | | |
770 | 743 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | 744 | | |
780 | | - | |
781 | | - | |
| 745 | + | |
782 | 746 | | |
783 | 747 | | |
784 | 748 | | |
785 | 749 | | |
786 | 750 | | |
787 | | - | |
788 | | - | |
789 | 751 | | |
790 | 752 | | |
791 | | - | |
| 753 | + | |
792 | 754 | | |
793 | 755 | | |
794 | | - | |
795 | 756 | | |
796 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
797 | 762 | | |
798 | 763 | | |
799 | | - | |
800 | | - | |
| 764 | + | |
| 765 | + | |
801 | 766 | | |
802 | 767 | | |
803 | 768 | | |
804 | | - | |
805 | | - | |
806 | 769 | | |
807 | 770 | | |
808 | 771 | | |
809 | 772 | | |
810 | 773 | | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
| 774 | + | |
819 | 775 | | |
820 | 776 | | |
821 | 777 | | |
| |||
2066 | 2022 | | |
2067 | 2023 | | |
2068 | 2024 | | |
2069 | | - | |
2070 | | - | |
| 2025 | + | |
| 2026 | + | |
2071 | 2027 | | |
2072 | 2028 | | |
2073 | 2029 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| |||
| 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