diff --git a/Documentation/devicetree/bindings/gpu/adreno.txt b/Documentation/devicetree/bindings/gpu/adreno.txt index ec5cfa5991b..2f094b74083 100644 --- a/Documentation/devicetree/bindings/gpu/adreno.txt +++ b/Documentation/devicetree/bindings/gpu/adreno.txt @@ -65,7 +65,7 @@ Optional Properties: - qcom,initial-powerlevel: This value indicates which qcom,gpu-pwrlevel should be used at start time and when coming back out of resume - qcom,bus-control: Boolean. Enables an independent bus vote from the gpu frequency -- qcom,idle-timeout: This property represents the time in microseconds for idle timeout. +- qcom,idle-timeout: This property represents the time in milliseconds for idle timeout. - qcom,chipid: If it exists this property is used to replace the chip identification read from the GPU hardware. This is used to override faulty hardware readings. diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index 5131fbda409..da6433f2b77 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -1735,7 +1735,7 @@ static int adreno_of_get_pdata(struct platform_device *pdev) if (adreno_of_read_property(pdev->dev.of_node, "qcom,idle-timeout", &pdata->idle_timeout)) - pdata->idle_timeout = HZ/12; + pdata->idle_timeout = 80; pdata->strtstp_sleepwake = of_property_read_bool(pdev->dev.of_node, "qcom,strtstp-sleepwake"); diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c index 12c40c1ae7f..2a42e64dbb8 100644 --- a/drivers/gpu/msm/adreno_dispatch.c +++ b/drivers/gpu/msm/adreno_dispatch.c @@ -267,7 +267,7 @@ static struct kgsl_cmdbatch *_get_cmdbatch(struct adreno_context *drawctxt) * it hasn't already been started */ if (!timer_pending(&cmdbatch->timer)) - mod_timer(&cmdbatch->timer, jiffies + (5 * HZ)); + mod_timer(&cmdbatch->timer, jiffies + msecs_to_jiffies(5000)); return ERR_PTR(-EAGAIN); } diff --git a/drivers/gpu/msm/adreno_profile.c b/drivers/gpu/msm/adreno_profile.c index 04669761714..c1dc87b4b4e 100644 --- a/drivers/gpu/msm/adreno_profile.c +++ b/drivers/gpu/msm/adreno_profile.c @@ -909,7 +909,7 @@ static int profile_pipe_print(struct file *filep, char __user *ubuf, kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 10); + schedule_timeout(msecs_to_jiffies(100)); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); if (signal_pending(current)) { diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h index c69bbee746c..58187e95384 100644 --- a/drivers/gpu/msm/kgsl_device.h +++ b/drivers/gpu/msm/kgsl_device.h @@ -30,9 +30,6 @@ #define KGSL_TIMEOUT_DEFAULT 0xFFFFFFFF #define KGSL_TIMEOUT_PART 50 /* 50 msec */ -#define FIRST_TIMEOUT (HZ / 2) - - /* KGSL device state is initialized to INIT when platform_probe * * sucessfully initialized the device. Once a device has been opened * * (started) it becomes active. NAP implies that only low latency * diff --git a/drivers/gpu/msm/kgsl_pwrctrl.c b/drivers/gpu/msm/kgsl_pwrctrl.c index aef82be96c8..90c54a3df90 100644 --- a/drivers/gpu/msm/kgsl_pwrctrl.c +++ b/drivers/gpu/msm/kgsl_pwrctrl.c @@ -498,7 +498,7 @@ static int kgsl_pwrctrl_idle_timer_store(struct device *dev, unsigned int val = 0; struct kgsl_device *device = kgsl_device_from_dev(dev); struct kgsl_pwrctrl *pwr; - const long div = 1000/HZ; + const long div = 1000/msecs_to_jiffies(1000); int ret; if (device == NULL) @@ -525,7 +525,7 @@ static int kgsl_pwrctrl_idle_timer_show(struct device *dev, char *buf) { struct kgsl_device *device = kgsl_device_from_dev(dev); - int mul = 1000/HZ; + int mul = 1000/msecs_to_jiffies(1000); if (device == NULL) return 0; /* Show the idle_timeout converted to msec */ @@ -1114,7 +1114,7 @@ int kgsl_pwrctrl_init(struct kgsl_device *device) pwr->power_flags = 0; pwr->idle_needed = pdata->idle_needed; - pwr->interval_timeout = pdata->idle_timeout; + pwr->interval_timeout = msecs_to_jiffies(pdata->idle_timeout); pwr->strtstp_sleepwake = pdata->strtstp_sleepwake; pwr->ebi1_clk = clk_get(&pdev->dev, "bus_clk"); if (IS_ERR(pwr->ebi1_clk)) @@ -1715,7 +1715,7 @@ static int _check_active_count(struct kgsl_device *device, int count) int kgsl_active_count_wait(struct kgsl_device *device, int count) { int result = 0; - long wait_jiffies = HZ; + long wait_jiffies = msecs_to_jiffies(1000); BUG_ON(!mutex_is_locked(&device->mutex));