forked from rubenslte/android_kernel_samsung_msm8226
msm: kgsl: Fix direct references to HZ
Make the various timeout values HZ agnostic by using the proper macros and values instead. Change-Id: I906b948657c8873518042c7465272c98c5391e59 Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
0d6ad27e9d
commit
ea32a15a69
@@ -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.
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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 *
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user