Commit 3ae133b
drm/msm/dpu: move CRTC resource assignment to dpu_encoder_virt_atomic_check
Historically CRTC resources (LMs and CTLs) were assigned in
dpu_crtc_atomic_begin(). The commit 9222cdd ("drm/msm/dpu: move hw
resource tracking to crtc state") simply moved resources to
struct dpu_crtc_state, without changing the code sequence. Later on the
commit b107603 ("drm/msm/dpu: map mixer/ctl hw blocks in encoder
modeset") rearanged the code, but still kept the cstate->num_mixers
assignment to happen during commit phase. This makes dpu_crtc_state
inconsistent between consequent atomic_check() calls.
Move CRTC resource assignment to happen at the end of
dpu_encoder_virt_atomic_check().
Fixes: b107603 ("drm/msm/dpu: map mixer/ctl hw blocks in encoder modeset")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/612235/
Link: https://lore.kernel.org/r/20240903-dpu-mode-config-width-v6-2-617e1ecc4b7a@linaro.org
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>1 parent bfecbc2 commit 3ae133b
2 files changed
Lines changed: 38 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | 1094 | | |
1098 | 1095 | | |
1099 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
627 | 661 | | |
628 | 662 | | |
629 | 663 | | |
| |||
692 | 726 | | |
693 | 727 | | |
694 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
695 | 732 | | |
696 | 733 | | |
697 | 734 | | |
| |||
1093 | 1130 | | |
1094 | 1131 | | |
1095 | 1132 | | |
1096 | | - | |
1097 | 1133 | | |
1098 | 1134 | | |
1099 | 1135 | | |
1100 | | - | |
1101 | | - | |
1102 | 1136 | | |
1103 | | - | |
| 1137 | + | |
1104 | 1138 | | |
1105 | 1139 | | |
1106 | 1140 | | |
| |||
1129 | 1163 | | |
1130 | 1164 | | |
1131 | 1165 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | 1166 | | |
1138 | 1167 | | |
1139 | 1168 | | |
| |||
1159 | 1188 | | |
1160 | 1189 | | |
1161 | 1190 | | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | 1191 | | |
1175 | 1192 | | |
1176 | 1193 | | |
| |||
0 commit comments