diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 2dc8e9a0..29fec4fe 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -136,8 +136,10 @@ static int channel_gk20a_set_schedule_params(struct channel_gk20a *c, | |||
136 | u32 timeslice_timeout) | 136 | u32 timeslice_timeout) |
137 | { | 137 | { |
138 | void *inst_ptr; | 138 | void *inst_ptr; |
139 | struct gk20a_platform *platform = platform_get_drvdata(c->g->dev); | ||
139 | int shift = 3; | 140 | int shift = 3; |
140 | int value = timeslice_timeout; | 141 | int value = scale_ptimer(timeslice_timeout, |
142 | platform->ptimerscaling10x); | ||
141 | 143 | ||
142 | inst_ptr = c->inst_block.cpu_va; | 144 | inst_ptr = c->inst_block.cpu_va; |
143 | if (!inst_ptr) | 145 | if (!inst_ptr) |
@@ -2339,16 +2341,13 @@ static int gk20a_channel_set_priority(struct channel_gk20a *ch, | |||
2339 | /* set priority of graphics channel */ | 2341 | /* set priority of graphics channel */ |
2340 | switch (priority) { | 2342 | switch (priority) { |
2341 | case NVGPU_PRIORITY_LOW: | 2343 | case NVGPU_PRIORITY_LOW: |
2342 | /* 64 << 3 = 512us */ | 2344 | timeslice_timeout = ch->g->timeslice_low_priority_us; |
2343 | timeslice_timeout = 64; | ||
2344 | break; | 2345 | break; |
2345 | case NVGPU_PRIORITY_MEDIUM: | 2346 | case NVGPU_PRIORITY_MEDIUM: |
2346 | /* 128 << 3 = 1024us */ | 2347 | timeslice_timeout = ch->g->timeslice_medium_priority_us; |
2347 | timeslice_timeout = 128; | ||
2348 | break; | 2348 | break; |
2349 | case NVGPU_PRIORITY_HIGH: | 2349 | case NVGPU_PRIORITY_HIGH: |
2350 | /* 255 << 3 = 2048us */ | 2350 | timeslice_timeout = ch->g->timeslice_high_priority_us; |
2351 | timeslice_timeout = 255; | ||
2352 | break; | 2351 | break; |
2353 | default: | 2352 | default: |
2354 | pr_err("Unsupported priority"); | 2353 | pr_err("Unsupported priority"); |