mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-20 15:55:13 +08:00
[buf_slot]: add slot global index to better understand of buffer slot behave
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@954 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -36,10 +36,12 @@
|
|||||||
#define BUF_SLOT_DBG_FRAME (0x00000200)
|
#define BUF_SLOT_DBG_FRAME (0x00000200)
|
||||||
#define BUF_SLOT_DBG_BUF_UESD (0x00000400)
|
#define BUF_SLOT_DBG_BUF_UESD (0x00000400)
|
||||||
#define BUF_SLOT_DBG_OPS_HISTORY (0x10000000)
|
#define BUF_SLOT_DBG_OPS_HISTORY (0x10000000)
|
||||||
|
#define BUF_SLOT_DBG_ALL (0x10000011)
|
||||||
|
|
||||||
#define buf_slot_dbg(flag, fmt, ...) _mpp_dbg(buf_slot_debug, flag, fmt, ## __VA_ARGS__)
|
#define buf_slot_dbg(flag, fmt, ...) _mpp_dbg(buf_slot_debug, flag, fmt, ## __VA_ARGS__)
|
||||||
|
|
||||||
static RK_U32 buf_slot_debug = 0;
|
static RK_U32 buf_slot_debug = 0;
|
||||||
|
static RK_U32 buf_slot_idx = 0;
|
||||||
|
|
||||||
#define slot_assert(impl, cond) do { \
|
#define slot_assert(impl, cond) do { \
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
@@ -180,6 +182,7 @@ struct MppBufSlotEntry_t {
|
|||||||
|
|
||||||
struct MppBufSlotsImpl_t {
|
struct MppBufSlotsImpl_t {
|
||||||
Mutex *lock;
|
Mutex *lock;
|
||||||
|
RK_U32 slots_idx;
|
||||||
|
|
||||||
// status tracing
|
// status tracing
|
||||||
RK_U32 decode_count;
|
RK_U32 decode_count;
|
||||||
@@ -269,7 +272,7 @@ static void _dump_slots(const char *caller, MppBufSlotsImpl *impl)
|
|||||||
RK_S32 i;
|
RK_S32 i;
|
||||||
MppBufSlotEntry *slot = impl->slots;
|
MppBufSlotEntry *slot = impl->slots;
|
||||||
|
|
||||||
mpp_log("\ncaller %s is dumping slots\n", caller);
|
mpp_log("\ncaller %s is dumping slots\n", caller, impl->slots_idx);
|
||||||
mpp_log("slots %p buffer count %d buffer size %d\n", impl, impl->buf_count, impl->buf_size);
|
mpp_log("slots %p buffer count %d buffer size %d\n", impl, impl->buf_count, impl->buf_size);
|
||||||
mpp_log("decode count %d\n", impl->decode_count);
|
mpp_log("decode count %d\n", impl->decode_count);
|
||||||
mpp_log("display count %d\n", impl->display_count);
|
mpp_log("display count %d\n", impl->display_count);
|
||||||
@@ -406,8 +409,8 @@ static void slot_ops_with_log(MppBufSlotsImpl *impl, MppBufSlotEntry *slot, MppB
|
|||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
slot->status = status;
|
slot->status = status;
|
||||||
buf_slot_dbg(BUF_SLOT_DBG_OPS_RUNTIME, "index %2d op: %s status in %08x out %08x",
|
buf_slot_dbg(BUF_SLOT_DBG_OPS_RUNTIME, "slot %3d index %2d op: %s status in %08x out %08x",
|
||||||
index, op_string[op], before.val, status.val);
|
impl->slots_idx, index, op_string[op], before.val, status.val);
|
||||||
add_slot_log(impl->logs, index, op, before, status);
|
add_slot_log(impl->logs, index, op, before, status);
|
||||||
if (error)
|
if (error)
|
||||||
dump_slots(impl);
|
dump_slots(impl);
|
||||||
@@ -524,6 +527,7 @@ MPP_RET mpp_buf_slot_init(MppBufSlots *slots)
|
|||||||
impl->hal_len_align = NULL;
|
impl->hal_len_align = NULL;
|
||||||
impl->numerator = 10;
|
impl->numerator = 10;
|
||||||
impl->denominator = 5;
|
impl->denominator = 5;
|
||||||
|
impl->slots_idx = buf_slot_idx++;
|
||||||
|
|
||||||
*slots = impl;
|
*slots = impl;
|
||||||
return MPP_OK;
|
return MPP_OK;
|
||||||
|
Reference in New Issue
Block a user