AG903ライブラリリファレンス
Body Source
AG903_PgpMgrReleaseAssignment 関数
本文ソース
コピコード
1: int32_t AG903_PgpMgrReleaseAssignment(
void
*handle) 2: { 3: uint32_t id; 4:
AG903_PgpMgrVRAMInputHandle
*vram_handle; 5: 6:
if
(handle == NULL) { 7:
return
-
AG903_EINVAL
; 8: } 9: 10: id = ((
AG903_PgpMgrPipelineHandle
*)handle)->id; 11:
if
((id !=
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) && (id !=
AG903_PGP_MGR_FRAME_CALC_HANDLE_ID
)) { 12:
return
-
AG903_EINVAL
; 13: } 14: 15:
if
(id ==
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) { 16:
AG903_PgpMgrPipelineHandle
*p = (
AG903_PgpMgrPipelineHandle
*)handle; 17: 18:
if
(p->is_assign ==
false
) { 19:
return
-
AG903_EINVAL
; 20: } 21:
if
(PgpContext.exec_pipeline[p->pipeline_no] == p) { 22: 23:
PGPPrmParamPGPnSTATE
state; 24:
AG903_PgpPrmGetPGPnSTATE
(p->pipeline_no, &state); 25:
if
(state.st !=
AG903_PGP_MGR_STATE_IDLE
) { 26:
return
-
AG903_EBUSY
; 27: } 28: PgpContext.exec_pipeline[p->pipeline_no] = NULL; 29: } 30: 31:
if
(PgpContext.assign_pipeline[p->pipeline_no] == handle) { 32: PgpContext.assign_pipeline[p->pipeline_no] = NULL; 33: } 34: 35: vram_handle = (
AG903_PgpMgrVRAMInputHandle
*)p->input_handle; 36:
if
((vram_handle != NULL) && (vram_handle->id ==
AG903_PGP_MGR_VRAM_INPUT_HANDLE_ID
)) { 37: vram_handle->ref_cnt--; 38: } 39: p->is_assign =
false
; 40: p->pipeline_no = -1; 41: p->input_handle = NULL; 42: }
else
{ 43:
AG903_PgpMgrFrameCalcHandle
*f = (
AG903_PgpMgrFrameCalcHandle
*)handle; 44:
AG903_PgpMgrPipelineHandle
*master = (
AG903_PgpMgrPipelineHandle
*)f->master_handle; 45:
AG903_PgpMgrPipelineHandle
*slave = (
AG903_PgpMgrPipelineHandle
*)f->slave_handle; 46: 47:
if
(master->is_assign ==
false
) { 48:
return
-
AG903_EINVAL
; 49: } 50:
if
(PgpContext.exec_pipeline[master->pipeline_no] == master) { 51: 52:
PGPPrmParamPGPnSTATE
state; 53:
AG903_PgpPrmGetPGPnSTATE
(master->pipeline_no, &state); 54:
if
(state.st !=
AG903_PGP_MGR_STATE_IDLE
) { 55:
return
-
AG903_EBUSY
; 56: } 57: PgpContext.exec_pipeline[master->pipeline_no] = NULL; 58: } 59: 60:
if
(PgpContext.assign_pipeline[master->pipeline_no] == master) { 61: PgpContext.assign_pipeline[master->pipeline_no] = NULL; 62: } 63: 64: vram_handle = (
AG903_PgpMgrVRAMInputHandle
*)master->input_handle; 65:
if
((vram_handle != NULL) && (vram_handle->id ==
AG903_PGP_MGR_VRAM_INPUT_HANDLE_ID
)) { 66: vram_handle->ref_cnt--; 67: } 68: master->is_assign =
false
; 69: master->pipeline_no = -1; 70: master->input_handle = NULL; 71: 72:
if
(slave->id ==
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) { 73:
if
(PgpContext.assign_pipeline[slave->pipeline_no] == slave) { 74: PgpContext.assign_pipeline[slave->pipeline_no] = NULL; 75: } 76:
if
(PgpContext.exec_pipeline[slave->pipeline_no] == slave) { 77: PgpContext.exec_pipeline[slave->pipeline_no] = NULL; 78: } 79: 80: vram_handle = (
AG903_PgpMgrVRAMInputHandle
*)slave->input_handle; 81:
if
((vram_handle != NULL) && (vram_handle->id ==
AG903_PGP_MGR_VRAM_INPUT_HANDLE_ID
)) { 82: vram_handle->ref_cnt--; 83: } 84: slave->is_assign =
false
; 85: slave->pipeline_no = -1; 86: slave->input_handle = NULL; 87: } 88: } 89: 90:
return
AG903_ENONE
; 91: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.
内容
|
インデックス
|
ホーム