Merge "msm: kgsl: Use correct HFI queue IDs for legacy GMU firmware"

This commit is contained in:
qctecmdr Service 2018-10-11 13:18:13 -07:00 committed by Gerrit - the friendly Code Review server
commit 4b7d9d697b
2 changed files with 17 additions and 0 deletions

View File

@ -193,6 +193,7 @@ static int hfi_queue_write(struct gmu_device *gmu, uint32_t queue_idx,
void hfi_init(struct kgsl_hfi *hfi, struct gmu_memdesc *mem_addr,
uint32_t queue_sz_bytes)
{
struct adreno_device *adreno_dev = ADRENO_DEVICE(hfi->kgsldev);
int i;
struct hfi_queue_table *tbl;
struct hfi_queue_header *hdr;
@ -207,6 +208,17 @@ void hfi_init(struct kgsl_hfi *hfi, struct gmu_memdesc *mem_addr,
{ HFI_DSP_IDX_0, HFI_DSP_PRI_0, HFI_QUEUE_STATUS_DISABLED },
};
/*
* Overwrite the queue IDs for A630, A615 and A616 as they use
* legacy firmware. Legacy firmware has different queue IDs for
* message, debug and dispatch queues.
*/
if (adreno_is_a630(adreno_dev) || adreno_is_a615_family(adreno_dev)) {
queue[HFI_MSG_ID].idx = HFI_MSG_IDX_LEGACY;
queue[HFI_DBG_ID].idx = HFI_DBG_IDX_LEGACY;
queue[HFI_DSP_ID_0].idx = HFI_DSP_IDX_0_LEGACY;
}
/* Fill Table Header */
tbl = mem_addr->hostptr;
tbl->qtbl_hdr.version = 0;

View File

@ -42,6 +42,11 @@ struct hfi_queue_table;
#define HFI_DSP_IDX_BASE 3
#define HFI_DSP_IDX_0 3
#define HFI_CMD_IDX_LEGACY 0
#define HFI_DSP_IDX_0_LEGACY 1
#define HFI_MSG_IDX_LEGACY 4
#define HFI_DBG_IDX_LEGACY 5
#define HFI_QUEUE_STATUS_DISABLED 0
#define HFI_QUEUE_STATUS_ENABLED 1