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

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

Merge "mhi: core: Cache last processed event ring element"

parents 79cec43d b6fe0b71
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -656,6 +656,8 @@ struct mhi_event {
			     struct mhi_event *mhi_event,
			     u32 event_quota);
	struct mhi_controller *mhi_cntrl;
	struct mhi_tre last_cached_tre;
	u64 last_dev_rp;
};

struct mhi_chan {
+5 −0
Original line number Diff line number Diff line
@@ -1405,6 +1405,11 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl,
		MHI_VERB("Processing Event:0x%llx 0x%08x 0x%08x\n",
			local_rp->ptr, local_rp->dword[0], local_rp->dword[1]);

		mhi_event->last_cached_tre.ptr = local_rp->ptr;
		mhi_event->last_cached_tre.dword[0] = local_rp->dword[0];
		mhi_event->last_cached_tre.dword[1] = local_rp->dword[1];
		mhi_event->last_dev_rp = (u64)dev_rp;

		chan = MHI_TRE_GET_EV_CHID(local_rp);
		mhi_chan = &mhi_cntrl->mhi_chan[chan];