drm/msm/dpu: Prevent unnecessary hardware block migration#568
drm/msm/dpu: Prevent unnecessary hardware block migration#568chenchongbiao wants to merge 1 commit into
Conversation
|
改动一:dpu_crtc_assign_resources // 改后: 原来无论 CRTC 开还是关,先扔干净再重新捡。释放 ctl-0 后 ctl-0 变成空闲,然后 crtc-1 的 reserve 从 j=0 扫描就会抢走。 // 改前:一轮循环 // 改后:两轮循环 改动三:_dpu_rm_reserve_lms — LM 分配,同理但加了一个关键点 |
…unplug
When one CRTC is disabled during Type-C hot-unplug, the DPU Resource
Manager would unnecessarily reassign hardware blocks (CTL, LM, DSPP)
for the remaining active CRTC. The sequence:
1. crtc-0's dpu_rm_release() frees ctl-0, LM-0/1
2. crtc-1's dpu_crtc_assign_resources() releases ctl-1/LM-2/3
then calls dpu_rm_reserve()
3. _dpu_rm_reserve_ctls() scans from j=0, finds ctl-0 free,
assigns it to crtc-1 instead of keeping ctl-1
4. _dpu_rm_reserve_lms() does the same for LM blocks
5. The hardware pipeline migration triggers a modeset that
disables/re-enables the encoder, but vblank IRQ callbacks
are not properly re-registered (cb:0x0 in core_irq debugfs)
6. INTF hardware continues generating vsync but interrupts go
unhandled, causing the display to freeze
Fix by:
- In dpu_crtc_assign_resources(): only release resources when
the CRTC is being disabled, not on every modeset. For enabled
CRTCs, let dpu_rm_reserve() retain the existing assignment.
- In _dpu_rm_reserve_ctls() and _dpu_rm_reserve_lms(): use a
two-pass approach that first prefers hardware blocks already
assigned to this CRTC, then falls back to the free pool.
Signed-off-by: Chongbiao Chen <chenchongbiao@radxa.com>
27af9d0 to
03915e9
Compare
When one CRTC is disabled during Type-C hot-unplug, the DPU Resource Manager would unnecessarily reassign hardware blocks (CTL, LM, DSPP) for the remaining active CRTC. The sequence:
Fix by: