mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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
This commit is contained in:
parent
9f5072a191
commit
3446d7e988
16 changed files with 187 additions and 37 deletions
|
@ -38,9 +38,35 @@ int lima_l2_cache_flush(struct lima_ip *ip)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int lima_l2_cache_hw_init(struct lima_ip *ip)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = lima_l2_cache_flush(ip);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
l2_cache_write(LIMA_L2_CACHE_ENABLE,
|
||||
LIMA_L2_CACHE_ENABLE_ACCESS |
|
||||
LIMA_L2_CACHE_ENABLE_READ_ALLOCATE);
|
||||
l2_cache_write(LIMA_L2_CACHE_MAX_READS, 0x1c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lima_l2_cache_resume(struct lima_ip *ip)
|
||||
{
|
||||
return lima_l2_cache_hw_init(ip);
|
||||
}
|
||||
|
||||
void lima_l2_cache_suspend(struct lima_ip *ip)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int lima_l2_cache_init(struct lima_ip *ip)
|
||||
{
|
||||
int i, err;
|
||||
int i;
|
||||
u32 size;
|
||||
struct lima_device *dev = ip->dev;
|
||||
|
||||
|
@ -63,15 +89,7 @@ int lima_l2_cache_init(struct lima_ip *ip)
|
|||
1 << (size & 0xff),
|
||||
1 << ((size >> 24) & 0xff));
|
||||
|
||||
err = lima_l2_cache_flush(ip);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
l2_cache_write(LIMA_L2_CACHE_ENABLE,
|
||||
LIMA_L2_CACHE_ENABLE_ACCESS|LIMA_L2_CACHE_ENABLE_READ_ALLOCATE);
|
||||
l2_cache_write(LIMA_L2_CACHE_MAX_READS, 0x1c);
|
||||
|
||||
return 0;
|
||||
return lima_l2_cache_hw_init(ip);
|
||||
}
|
||||
|
||||
void lima_l2_cache_fini(struct lima_ip *ip)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue