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

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

Merge "msm: kgsl: Add kgsl device to kgsl_hfi structure"

parents 76da404a a05d2988
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1419,6 +1419,7 @@ static int gmu_probe(struct kgsl_device *device,
	tasklet_init(&hfi->tasklet, hfi_receiver, (unsigned long)gmu);
	tasklet_init(&hfi->tasklet, hfi_receiver, (unsigned long)gmu);
	INIT_LIST_HEAD(&hfi->msglist);
	INIT_LIST_HEAD(&hfi->msglist);
	spin_lock_init(&hfi->msglock);
	spin_lock_init(&hfi->msglock);
	hfi->kgsldev = device;


	/* Retrieves GMU/GPU power level configurations*/
	/* Retrieves GMU/GPU power level configurations*/
	ret = gmu_pwrlevel_probe(gmu, node);
	ret = gmu_pwrlevel_probe(gmu, node);
+1 −2
Original line number Original line Diff line number Diff line
@@ -105,7 +105,6 @@ static int hfi_queue_read(struct gmu_device *gmu, uint32_t queue_idx,
static int hfi_queue_write(struct gmu_device *gmu, uint32_t queue_idx,
static int hfi_queue_write(struct gmu_device *gmu, uint32_t queue_idx,
		uint32_t *msg)
		uint32_t *msg)
{
{
	struct kgsl_device *device = kgsl_get_device(KGSL_DEVICE_3D0);
	struct hfi_queue_table *tbl = gmu->hfi_mem->hostptr;
	struct hfi_queue_table *tbl = gmu->hfi_mem->hostptr;
	struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
	struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
	uint32_t *queue;
	uint32_t *queue;
@@ -168,7 +167,7 @@ static int hfi_queue_write(struct gmu_device *gmu, uint32_t queue_idx,
	wmb();
	wmb();


	/* Send interrupt to GMU to receive the message */
	/* Send interrupt to GMU to receive the message */
	adreno_write_gmureg(ADRENO_DEVICE(device),
	adreno_write_gmureg(ADRENO_DEVICE(hfi->kgsldev),
		ADRENO_REG_GMU_HOST2GMU_INTR_SET, 0x1);
		ADRENO_REG_GMU_HOST2GMU_INTR_SET, 0x1);


	return 0;
	return 0;
+2 −0
Original line number Original line Diff line number Diff line
@@ -590,6 +590,7 @@ struct pending_cmd {


/**
/**
 * struct kgsl_hfi - HFI control structure
 * struct kgsl_hfi - HFI control structure
 * @kgsldev: Point to the kgsl device
 * @hfi_interrupt_num: number of GMU asserted HFI interrupt
 * @hfi_interrupt_num: number of GMU asserted HFI interrupt
 * @msglock: spinlock to protect access to outstanding command message list
 * @msglock: spinlock to protect access to outstanding command message list
 * @cmdq_mutex: mutex to protect command queue access from multiple senders
 * @cmdq_mutex: mutex to protect command queue access from multiple senders
@@ -601,6 +602,7 @@ struct pending_cmd {
 *	value of the counter is used as sequence number for HFI message
 *	value of the counter is used as sequence number for HFI message
 */
 */
struct kgsl_hfi {
struct kgsl_hfi {
	struct kgsl_device *kgsldev;
	int hfi_interrupt_num;
	int hfi_interrupt_num;
	spinlock_t msglock;
	spinlock_t msglock;
	struct mutex cmdq_mutex;
	struct mutex cmdq_mutex;