OSDN Git Service

drm/rockchip: add an common abstracted PSR driver
authorYakir Yang <ykk@rock-chips.com>
Sun, 24 Jul 2016 06:57:44 +0000 (14:57 +0800)
committerSean Paul <seanpaul@chromium.org>
Tue, 23 Aug 2016 15:44:32 +0000 (11:44 -0400)
commit5182c1a556d7ff70e28516c4b9250a347b732af0
tree60c2d74532993ab5f9623a43ce93d50c05044adf
parent69c34e41f5d4e8a719d67673647b39f807ae8c71
drm/rockchip: add an common abstracted PSR driver

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>
drivers/gpu/drm/rockchip/Makefile
drivers/gpu/drm/rockchip/rockchip_drm_drv.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/rockchip/rockchip_drm_fb.c
drivers/gpu/drm/rockchip/rockchip_drm_psr.c [new file with mode: 0644]
drivers/gpu/drm/rockchip/rockchip_drm_psr.h [new file with mode: 0644]
drivers/gpu/drm/rockchip/rockchip_drm_vop.c