mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-21 16:19:23 +08:00

sync_begin - cache invalidate, should be called before cpu read sync_end - cache flush, should be called after cpu write MppBuffer sync flow: 1. hw access 2. sync_begin 3. cpu access (read / write) 4. sync_end 5. hw access NOTE: readonly option is faster for read only buffer. Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com> Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I253a6139e9bb30808c07075d64f17b5cfad8519a
25 lines
667 B
C
25 lines
667 B
C
/* SPDX-License-Identifier: Apache-2.0 OR MIT */
|
|
/*
|
|
* Copyright (c) 2023 Rockchip Electronics Co., Ltd.
|
|
*/
|
|
|
|
#ifndef __MPP_DMABUF_H__
|
|
#define __MPP_DMABUF_H__
|
|
|
|
#include "rk_type.h"
|
|
#include "mpp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
MPP_RET mpp_dmabuf_sync_begin(RK_S32 fd, RK_S32 ro, const char *caller);
|
|
MPP_RET mpp_dmabuf_sync_end(RK_S32 fd, RK_S32 ro, const char *caller);
|
|
MPP_RET mpp_dmabuf_sync_partial_begin(RK_S32 fd, RK_S32 ro, RK_U32 offset, RK_U32 length, const char *caller);
|
|
MPP_RET mpp_dmabuf_sync_partial_end(RK_S32 fd, RK_S32 ro, RK_U32 offset, RK_U32 length, const char *caller);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MPP_DMABUF_H__ */ |