summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-23drm/rockchip: A couple small fixes to psrSean Paul1-12/+7
A few things that need tidying up, no functional changes. Reviewed-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-08-23drm/rockchip: Use a spinlock to protect psr stateSean Paul1-9/+17
The handling of psr state is racey, shore that up with a per-psr driver lock. Reviewed-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-08-23drm/rockchip: Don't use a delayed worker for psr state changesSean Paul1-28/+10
The delayed worker isn't needed and is racey. Remove it and do the state change in line. Reviewed-by: Yakir Yang <ykk@rock-chips.com> Tested-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-08-23drm/rockchip: Convert psr_list_mutex to spinlock and use itSean Paul1-7/+18
This patch converts the psr_list_mutex to a spinlock and locks all access to psr_list to avoid races (however unlikely they were). Reviewed-by: Yakir Yang <ykk@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-08-23drm/rockchip: add an common abstracted PSR driverYakir Yang1-0/+249
The PSR driver have exported four symbols for specific device driver, and it's safe to call them in interrupt context: - rockchip_drm_psr_register() - rockchip_drm_psr_unregister() - rockchip_drm_psr_enable() - rockchip_drm_psr_disable() - rockchip_drm_psr_flush() Encoder driver should call the register/unregister interfaces to hook itself into common PSR driver, encoder have implement the 'psr_set' callback which use the set PSR state in hardware side. Crtc driver would call the enable/disable interfaces when vblank is enable/disable, after that the common PSR driver would call the encoder registered callback to set the PSR state. Fb driver would call the flush interface in 'fb->dirty' callback, this helper function would force all PSR enabled encoders to exit from PSR for 3 seconds. Signed-off-by: Yakir Yang <ykk@rock-chips.com> [seanpaul removed leftover psr_enabled/psr_work kruft from drm_vop.c] Signed-off-by: Sean Paul <seanpaul@chromium.org>