Lines Matching refs:idx
177 uint32_t idx, val = 0xCDCDCDCD, align, arg; in atom_get_src_int() local
183 idx = U16(*ptr); in atom_get_src_int()
186 DEBUG("REG[0x%04X]", idx); in atom_get_src_int()
187 idx += gctx->reg_block; in atom_get_src_int()
190 val = gctx->card->reg_read(gctx->card, idx); in atom_get_src_int()
214 idx, 0); in atom_get_src_int()
218 idx = U8(*ptr); in atom_get_src_int()
222 val = get_unaligned_le32((u32 *)&ctx->ps[idx]); in atom_get_src_int()
224 DEBUG("PS[0x%02X,0x%04X]", idx, val); in atom_get_src_int()
227 idx = U8(*ptr); in atom_get_src_int()
230 DEBUG("WS[0x%02X]", idx); in atom_get_src_int()
231 switch (idx) { in atom_get_src_int()
260 val = ctx->ws[idx]; in atom_get_src_int()
264 idx = U16(*ptr); in atom_get_src_int()
268 DEBUG("ID[0x%04X+%04X]", idx, gctx->data_block); in atom_get_src_int()
270 DEBUG("ID[0x%04X]", idx); in atom_get_src_int()
272 val = U32(idx + gctx->data_block); in atom_get_src_int()
275 idx = U8(*ptr); in atom_get_src_int()
277 if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { in atom_get_src_int()
279 gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); in atom_get_src_int()
282 val = gctx->scratch[(gctx->fb_base / 4) + idx]; in atom_get_src_int()
284 DEBUG("FB[0x%02X]", idx); in atom_get_src_int()
314 idx = U8(*ptr); in atom_get_src_int()
317 DEBUG("PLL[0x%02X]", idx); in atom_get_src_int()
318 val = gctx->card->pll_read(gctx->card, idx); in atom_get_src_int()
321 idx = U8(*ptr); in atom_get_src_int()
324 DEBUG("MC[0x%02X]", idx); in atom_get_src_int()
325 val = gctx->card->mc_read(gctx->card, idx); in atom_get_src_int()
450 val, idx; in atom_put_dst() local
459 idx = U16(*ptr); in atom_put_dst()
461 DEBUG("REG[0x%04X]", idx); in atom_put_dst()
462 idx += gctx->reg_block; in atom_put_dst()
465 if (idx == 0) in atom_put_dst()
466 gctx->card->reg_write(gctx->card, idx, in atom_put_dst()
469 gctx->card->reg_write(gctx->card, idx, val); in atom_put_dst()
491 idx, val); in atom_put_dst()
495 idx = U8(*ptr); in atom_put_dst()
497 DEBUG("PS[0x%02X]", idx); in atom_put_dst()
498 ctx->ps[idx] = cpu_to_le32(val); in atom_put_dst()
501 idx = U8(*ptr); in atom_put_dst()
503 DEBUG("WS[0x%02X]", idx); in atom_put_dst()
504 switch (idx) { in atom_put_dst()
530 ctx->ws[idx] = val; in atom_put_dst()
534 idx = U8(*ptr); in atom_put_dst()
536 if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { in atom_put_dst()
538 gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); in atom_put_dst()
540 gctx->scratch[(gctx->fb_base / 4) + idx] = val; in atom_put_dst()
541 DEBUG("FB[0x%02X]", idx); in atom_put_dst()
544 idx = U8(*ptr); in atom_put_dst()
546 DEBUG("PLL[0x%02X]", idx); in atom_put_dst()
547 gctx->card->pll_write(gctx->card, idx, val); in atom_put_dst()
550 idx = U8(*ptr); in atom_put_dst()
552 DEBUG("MC[0x%02X]", idx); in atom_put_dst()
553 gctx->card->mc_write(gctx->card, idx, val); in atom_put_dst()
619 int idx = U8((*ptr)++); in atom_op_calltable() local
622 if (idx < ATOM_TABLE_NAMES_CNT) in atom_op_calltable()
623 SDEBUG(" table: %d (%s)\n", idx, atom_table_names[idx]); in atom_op_calltable()
625 SDEBUG(" table: %d\n", idx); in atom_op_calltable()
626 if (U16(ctx->ctx->cmd_table + 4 + 2 * idx)) in atom_op_calltable()
627 r = amdgpu_atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); in atom_op_calltable()
868 int idx = U8(*ptr); in atom_op_setdatablock() local
870 SDEBUG(" block: %d\n", idx); in atom_op_setdatablock()
871 if (!idx) in atom_op_setdatablock()
873 else if (idx == 255) in atom_op_setdatablock()
876 ctx->ctx->data_block = U16(ctx->ctx->data_table + 4 + 2 * idx); in atom_op_setdatablock()
1399 int idx = CU16(ctx->data_table + offset); in amdgpu_atom_parse_data_header() local
1406 *size = CU16(idx); in amdgpu_atom_parse_data_header()
1408 *frev = CU8(idx + 2); in amdgpu_atom_parse_data_header()
1410 *crev = CU8(idx + 3); in amdgpu_atom_parse_data_header()
1411 *data_start = idx; in amdgpu_atom_parse_data_header()
1419 int idx = CU16(ctx->cmd_table + offset); in amdgpu_atom_parse_cmd_header() local
1426 *frev = CU8(idx + 2); in amdgpu_atom_parse_cmd_header()
1428 *crev = CU8(idx + 3); in amdgpu_atom_parse_cmd_header()