Commit ddbfac1
drm/amd/display: Fix unsafe uses of kernel mode FPU
The point of isolating code that uses kernel mode FPU in separate
compilation units is to ensure that even implicit uses of, e.g., SIMD
registers for spilling occur only in a context where this is permitted,
i.e., from inside a kernel_fpu_begin/end block.
This is important on arm64, which uses -mgeneral-regs-only to build all
kernel code, with the exception of such compilation units where FP or
SIMD registers are expected to be used. Given that the compiler may
invent uses of FP/SIMD anywhere in such a unit, none of its code may be
accessible from outside a kernel_fpu_begin/end block.
This means that all callers into such compilation units must use the
DC_FP start/end macros, which must not occur there themselves. For
robustness, all functions with external linkage that reside there should
call dc_assert_fp_enabled() to assert that the FPU context was set up
correctly.
Fix this for the DCN35, DCN351 and DCN36 implementations.
Cc: Austin Zheng <[email protected]>
Cc: Jun Lei <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Leo Li <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
Signed-off-by: Alex Deucher <[email protected]>1 parent bd8acfc commit ddbfac1
File tree
6 files changed
+56
-7
lines changed- drivers/gpu/drm/amd/display/dc
- dml
- dcn31
- dcn351
- dcn35
- resource
- dcn351
- dcn35
- dcn36
6 files changed
+56
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| 811 | + | |
| 812 | + | |
811 | 813 | | |
812 | 814 | | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | 819 | | |
| 820 | + | |
| 821 | + | |
818 | 822 | | |
819 | 823 | | |
820 | 824 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
501 | | - | |
502 | 503 | | |
503 | | - | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
584 | 586 | | |
585 | 587 | | |
586 | 588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| 481 | + | |
| 482 | + | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| |||
531 | 533 | | |
532 | 534 | | |
533 | 535 | | |
534 | | - | |
535 | 536 | | |
536 | | - | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1760 | 1760 | | |
1761 | 1761 | | |
1762 | 1762 | | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
1763 | 1777 | | |
1764 | 1778 | | |
1765 | 1779 | | |
| |||
1770 | 1784 | | |
1771 | 1785 | | |
1772 | 1786 | | |
1773 | | - | |
| 1787 | + | |
1774 | 1788 | | |
1775 | 1789 | | |
1776 | 1790 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1732 | 1732 | | |
1733 | 1733 | | |
1734 | 1734 | | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
1735 | 1750 | | |
1736 | 1751 | | |
1737 | 1752 | | |
| |||
1742 | 1757 | | |
1743 | 1758 | | |
1744 | 1759 | | |
1745 | | - | |
| 1760 | + | |
1746 | 1761 | | |
1747 | 1762 | | |
1748 | 1763 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1734 | 1734 | | |
1735 | 1735 | | |
1736 | 1736 | | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
1737 | 1751 | | |
1738 | 1752 | | |
1739 | 1753 | | |
| |||
1744 | 1758 | | |
1745 | 1759 | | |
1746 | 1760 | | |
1747 | | - | |
| 1761 | + | |
1748 | 1762 | | |
1749 | 1763 | | |
1750 | 1764 | | |
| |||
0 commit comments