Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fa2d336 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Remove the busy waiting loop from idle_check"

parents 11c21390 c3c3b9b5
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -859,7 +859,6 @@ void a3xx_cp_callback(struct adreno_device *adreno_dev, int irq)
{
{
	struct kgsl_device *device = &adreno_dev->dev;
	struct kgsl_device *device = &adreno_dev->dev;


	device->pwrctrl.irq_last = 1;
	queue_work(device->work_queue, &device->event_work);
	queue_work(device->work_queue, &device->event_work);
	adreno_dispatcher_schedule(device);
	adreno_dispatcher_schedule(device);
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -1290,7 +1290,6 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,
		adreno_getreg(adreno_dev, ADRENO_REG_RBBM_STATUS) << 2,
		adreno_getreg(adreno_dev, ADRENO_REG_RBBM_STATUS) << 2,
		0x00000000, 0x80000000);
		0x00000000, 0x80000000);
done:
done:
	device->pwrctrl.irq_last = 0;
	trace_kgsl_issueibcmds(device, context->id, cmdbatch,
	trace_kgsl_issueibcmds(device, context->id, cmdbatch,
		cmdbatch->timestamp, cmdbatch->flags, ret,
		cmdbatch->timestamp, cmdbatch->flags, ret,
		drawctxt->type);
		drawctxt->type);
+2 −27
Original line number Original line Diff line number Diff line
@@ -1201,8 +1201,6 @@ void kgsl_pwrctrl_close(struct kgsl_device *device)
 */
 */
void kgsl_idle_check(struct work_struct *work)
void kgsl_idle_check(struct work_struct *work)
{
{
	int delay = INIT_UDELAY;
	int requested_state;
	struct kgsl_device *device = container_of(work, struct kgsl_device,
	struct kgsl_device *device = container_of(work, struct kgsl_device,
							idle_check_ws);
							idle_check_ws);
	WARN_ON(device == NULL);
	WARN_ON(device == NULL);
@@ -1215,30 +1213,9 @@ void kgsl_idle_check(struct work_struct *work)


	if (device->state == KGSL_STATE_ACTIVE
	if (device->state == KGSL_STATE_ACTIVE
		   || device->state ==  KGSL_STATE_NAP) {
		   || device->state ==  KGSL_STATE_NAP) {
		/*
		 * If no user is explicitly trying to use the GPU
		 * (active_cnt is zero), then loop with increasing delay,
		 * waiting for the GPU to become idle.
		 */
		while (!atomic_read(&device->active_cnt) &&
			(delay < MAX_UDELAY)) {
			requested_state = device->requested_state;
			if (!kgsl_pwrctrl_sleep(device))
				break;
			/*
			 * If no new commands have been issued since the
			 * last interrupt, stay in this loop waiting for
			 * the GPU to become idle.
			 */
			if (!device->pwrctrl.irq_last)
				break;
			kgsl_pwrctrl_request_state(device, requested_state);
			mutex_unlock(&device->mutex);
			udelay(delay);
			delay *= 2;
			mutex_lock(&device->mutex);
		}


		if (!atomic_read(&device->active_cnt))
			kgsl_pwrctrl_sleep(device);


		kgsl_pwrctrl_request_state(device, KGSL_STATE_NONE);
		kgsl_pwrctrl_request_state(device, KGSL_STATE_NONE);
		if (device->state == KGSL_STATE_ACTIVE) {
		if (device->state == KGSL_STATE_ACTIVE) {
@@ -1255,8 +1232,6 @@ void kgsl_idle_check(struct work_struct *work)
				kgsl_pwrctrl_busy_time(device, true);
				kgsl_pwrctrl_busy_time(device, true);
				device->pwrctrl.clk_stats.no_nap_cnt = 0;
				device->pwrctrl.clk_stats.no_nap_cnt = 0;
			}
			}
		} else {
			device->pwrctrl.irq_last = 0;
		}
		}
	}
	}


+0 −1
Original line number Original line Diff line number Diff line
@@ -106,7 +106,6 @@ struct kgsl_pwrctrl {
	struct kgsl_clk_stats clk_stats;
	struct kgsl_clk_stats clk_stats;
	struct pm_qos_request pm_qos_req_dma;
	struct pm_qos_request pm_qos_req_dma;
	unsigned int pm_qos_latency;
	unsigned int pm_qos_latency;
	unsigned int irq_last;
	bool bus_control;
	bool bus_control;
	int bus_mod;
	int bus_mod;
	unsigned int bus_index[KGSL_MAX_PWRLEVELS];
	unsigned int bus_index[KGSL_MAX_PWRLEVELS];