diff options
author | Qiang Yu <yuq825@gmail.com> | 2020-04-21 21:35:48 +0800 |
---|---|---|
committer | Qiang Yu <yuq825@gmail.com> | 2020-04-24 20:51:10 +0800 |
commit | 3446d7e9883d70882568b0f7b6549835d51a8bc7 (patch) | |
tree | bac87841e0e25d9ce56d4f8b5330d25f708c7f46 /drivers/gpu/drm/lima/lima_pp.c | |
parent | 9f5072a191a141dcc919125986ea22bf05d598a7 (diff) | |
download | lwn-3446d7e9883d70882568b0f7b6549835d51a8bc7.tar.gz lwn-3446d7e9883d70882568b0f7b6549835d51a8bc7.zip |
drm/lima: add resume/suspend callback for each ip
For called when PM do resume/suspend.
Tested-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200421133551.31481-8-yuq825@gmail.com
Diffstat (limited to 'drivers/gpu/drm/lima/lima_pp.c')
-rw-r--r-- | drivers/gpu/drm/lima/lima_pp.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index 8fef224b93c8..33f01383409c 100644 --- a/drivers/gpu/drm/lima/lima_pp.c +++ b/drivers/gpu/drm/lima/lima_pp.c @@ -223,6 +223,23 @@ static void lima_pp_print_version(struct lima_ip *ip) lima_ip_name(ip), name, major, minor); } +static int lima_pp_hw_init(struct lima_ip *ip) +{ + ip->data.async_reset = false; + lima_pp_soft_reset_async(ip); + return lima_pp_soft_reset_async_wait(ip); +} + +int lima_pp_resume(struct lima_ip *ip) +{ + return lima_pp_hw_init(ip); +} + +void lima_pp_suspend(struct lima_ip *ip) +{ + +} + int lima_pp_init(struct lima_ip *ip) { struct lima_device *dev = ip->dev; @@ -230,9 +247,7 @@ int lima_pp_init(struct lima_ip *ip) lima_pp_print_version(ip); - ip->data.async_reset = false; - lima_pp_soft_reset_async(ip); - err = lima_pp_soft_reset_async_wait(ip); + err = lima_pp_hw_init(ip); if (err) return err; @@ -254,6 +269,16 @@ void lima_pp_fini(struct lima_ip *ip) } +int lima_pp_bcast_resume(struct lima_ip *ip) +{ + return 0; +} + +void lima_pp_bcast_suspend(struct lima_ip *ip) +{ + +} + int lima_pp_bcast_init(struct lima_ip *ip) { struct lima_device *dev = ip->dev; |