1: int32_t AG903_PgpMgrGetVRAMStatus(
AG903_PgpMgrVRAMInputHandle *handle, _Bool *is_vram_out, uint32_t *queue_cnt, uint32_t *exec_cmd)
2: {
3: uint32_t tmp_vram, tmp_queue, tmp_st;
4:
5:
6:
if ((handle == NULL) || (handle->id !=
AG903_PGP_MGR_VRAM_INPUT_HANDLE_ID)) {
7:
return -
AG903_EINVAL;
8: }
9:
10:
11:
if (handle->port_no == -1) {
12:
return -
AG903_EINVAL;
13: }
14:
15:
16:
AG903_PgpPrmGetPGPVInSTATE(handle->port_no, &tmp_vram, &tmp_queue, &tmp_st);
17:
18:
19:
if ((PgpContext.exec_vram[handle->port_no] != handle) && (tmp_st !=
AG903_PGP_MGR_VI_CMD_NONE)) {
20:
return -
AG903_EINVAL;
21: }
22:
if (is_vram_out != NULL) {
23: *is_vram_out = tmp_vram;
24: }
25:
if (queue_cnt != NULL) {
26: *queue_cnt = tmp_queue;
27: }
28:
if (exec_cmd != NULL) {
29: *exec_cmd = tmp_st;
30: }
31:
return AG903_ENONE;
32: }