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

Commit ee92efa5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Free up preemption buffers on ringbuffer close"

parents eff966c1 d8c1f327
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1687,16 +1687,6 @@ static int adreno_init(struct kgsl_device *device)

	}

	if (ADRENO_FEATURE(adreno_dev, ADRENO_PREEMPTION)) {
		int r = 0;

		if (gpudev->preemption_init)
			r = gpudev->preemption_init(adreno_dev);

		if (!WARN(r, "adreno: GPU preemption is disabled"))
			set_bit(ADRENO_DEVICE_PREEMPTION, &adreno_dev->priv);
	}

	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -913,6 +913,7 @@ struct adreno_gpudev {
				struct adreno_device *adreno_dev,
				unsigned int *cmds);
	int (*preemption_init)(struct adreno_device *adreno_dev);
	void (*preemption_close)(struct adreno_device *adreno_dev);
	void (*preemption_schedule)(struct adreno_device *adreno_dev);
	int (*preemption_context_init)(struct kgsl_context *context);
	void (*preemption_context_destroy)(struct kgsl_context *context);
+1 −0
Original line number Diff line number Diff line
@@ -3185,6 +3185,7 @@ struct adreno_gpudev adreno_a5xx_gpudev = {
	.preemption_post_ibsubmit =
			a5xx_preemption_post_ibsubmit,
	.preemption_init = a5xx_preemption_init,
	.preemption_close = a5xx_preemption_close,
	.preemption_schedule = a5xx_preemption_schedule,
	.enable_64bit = a5xx_enable_64bit,
	.clk_set_options = a5xx_clk_set_options,
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ void a5xx_preemption_trigger(struct adreno_device *adreno_dev);
void a5xx_preemption_schedule(struct adreno_device *adreno_dev);
void a5xx_preemption_start(struct adreno_device *adreno_dev);
int a5xx_preemption_init(struct adreno_device *adreno_dev);
void a5xx_preemption_close(struct adreno_device *adreno_dev);
int a5xx_preemption_yield_enable(unsigned int *cmds);

unsigned int a5xx_preemption_post_ibsubmit(struct adreno_device *adreno_dev,
+3 −3
Original line number Diff line number Diff line
@@ -562,9 +562,9 @@ static void a5xx_preemption_iommu_close(struct adreno_device *adreno_dev)
}
#endif

static void a5xx_preemption_close(struct kgsl_device *device)
void a5xx_preemption_close(struct adreno_device *adreno_dev)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct adreno_preemption *preempt = &adreno_dev->preempt;
	struct adreno_ringbuffer *rb;
	unsigned int i;
@@ -618,7 +618,7 @@ int a5xx_preemption_init(struct adreno_device *adreno_dev)

err:
	if (ret)
		a5xx_preemption_close(device);
		a5xx_preemption_close(adreno_dev);

	return ret;
}
Loading