mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
drm/rockchip: vop2: fix double config done at one frame time
Maybe appear the following case: -> set gamma -> config done -> atomic commit --> update win format --> update win address ---> here maybe meet vop hardware frame start, and triggle some config take affect. ---> as only some config take affect, this maybe lead to iommu pagefault. --> update win size --> update win other parameters -> config done so we add readx_poll_timeout() to make sure the first config done take effect and then to do next frame config. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I6ec67b374b3afd2bed4a57aa1e7b729964df1736
This commit is contained in:
@@ -2348,6 +2348,23 @@ static void vop2_crtc_load_lut(struct drm_crtc *crtc)
|
||||
vp->gamma_lut_active = true;
|
||||
|
||||
spin_unlock(&vop2->reg_lock);
|
||||
/*
|
||||
* maybe appear the following case:
|
||||
* -> set gamma
|
||||
* -> config done
|
||||
* -> atomic commit
|
||||
* --> update win format
|
||||
* --> update win address
|
||||
* ---> here maybe meet vop hardware frame start, and triggle some config take affect.
|
||||
* ---> as only some config take affect, this maybe lead to iommu pagefault.
|
||||
* --> update win size
|
||||
* --> update win other parameters
|
||||
* -> config done
|
||||
*
|
||||
* so we add readx_poll_timeout() to make sure the first config done take
|
||||
* effect and then to do next frame config.
|
||||
*/
|
||||
readx_poll_timeout(CTRL_GET, dsp_lut_en, dle, dle, 5, 33333);
|
||||
#undef CTRL_GET
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user