Skip to content

Commit

Permalink
pixel_stat: mm: cma: correct latency config
Browse files Browse the repository at this point in the history
This commit changes the latency settings to 500ms and
1.5 sec for low and mid bound. Also using ktime_get()
to collect the time base as we don't need to include
the system suspend time.

Bug: 177231781
Test: boot
Signed-off-by: Martin Liu <[email protected]>
Change-Id: I743fe1391c242c81cfca67c492476329c1d0f1d1
  • Loading branch information
Martin Liu authored and TreeHugger Robot committed Jun 8, 2021
1 parent 8237216 commit 69ec772
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/soc/google/pixel_stat/mm/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <linux/kobject.h>
#include <linux/slab.h>

#define DEF_LATENCY_MID_BOUND_MS 1500000
#define DEF_LATENCY_LOW_BOUND_MS 500000
#define DEF_LATENCY_MID_BOUND_MS 1500
#define DEF_LATENCY_LOW_BOUND_MS 500

enum LATENCY_LEVEL {
LATENCY_LOW = 0,
Expand Down Expand Up @@ -49,7 +49,7 @@ static struct cma_pixel_stat *stats[MAX_CMA_AREAS];

void vh_cma_alloc_start(void *data, s64 *ts)
{
*ts = ktime_to_ms(ktime_get_boottime());
*ts = ktime_to_ms(ktime_get());
}

struct cma *cma;
Expand All @@ -76,7 +76,7 @@ void vh_cma_alloc_finish(void *data, struct cma *cma, struct page *page,
.target = cma,
};

s64 delta = ktime_to_ms(ktime_get_boottime()) - ts;
s64 delta = ktime_to_ms(ktime_get()) - ts;

WARN_ON_ONCE(delta < 0);

Expand Down

0 comments on commit 69ec772

Please sign in to comment.