Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions br-ext-chip-hisilicon/configs/hi3520dv200_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ BR2_OPENIPC_FLASH_SIZE="8"
# Packages
BR2_PACKAGE_DROPBEAR_OPENIPC=y
BR2_PACKAGE_GLIBC_COMPAT=y
BR2_PACKAGE_HIFB_DEMO=y
BR2_PACKAGE_HISILICON_OSDRV_HI3520DV200=y
BR2_PACKAGE_IPCTOOL=y
BR2_PACKAGE_JSONFILTER=y
Expand Down
1 change: 1 addition & 0 deletions general/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/gpio-motors/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/grainmedia-osdrv-gm8136/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisi-gpio/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/herald/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/hifb-demo/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-opensdk/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-hi3516av100/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-hi3516cv100/Config.in"
Expand Down
18 changes: 18 additions & 0 deletions general/package/hifb-demo/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
config BR2_PACKAGE_HIFB_DEMO
bool "hifb-demo"
depends on BR2_PACKAGE_HISILICON_OSDRV_HI3520DV200
help
Standalone demo program for the Hisilicon hifb framebuffer
driver on hi3520dv200. Brings up the MPP system (SAMPLE_COMM_SYS_Init
bootstrap ported from the upstream vendor MPP sample tree), enables
the VO HD device, opens /dev/fb0, mmaps it, and draws SMPTE color
bars plus an animated rectangle so the wired display output (HDMI,
VGA or CVBS depending on board) can be visually verified.

Run on the camera as:
LD_PRELOAD=/usr/lib/libjpeg.so:/usr/lib/libVoiceEngine.so:\
/usr/lib/libanr.so:/usr/lib/libaec.so:/usr/lib/libresampler.so:\
/usr/lib/libvqev2.so:/usr/lib/libmem.so:/usr/lib/libtde.so \
hifb_demo

https://github.com/OpenIPC/firmware
30 changes: 30 additions & 0 deletions general/package/hifb-demo/hifb-demo.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
################################################################################
#
# hifb-demo
#
################################################################################

HIFB_DEMO_VERSION = 1.0
HIFB_DEMO_SITE_METHOD = local
HIFB_DEMO_SITE = $(HIFB_DEMO_PKGDIR)
HIFB_DEMO_LICENSE = MIT
HIFB_DEMO_DEPENDENCIES = hisilicon-osdrv-hi3520dv200

HIFB_DEMO_CFLAGS = -Os -Wall -Wno-unused-function \
-I$(HIFB_DEMO_PKGDIR)/include
HIFB_DEMO_LDFLAGS = -L$(STAGING_DIR)/usr/lib -lmpi \
-Wl,--unresolved-symbols=ignore-in-shared-libs

define HIFB_DEMO_BUILD_CMDS
$(TARGET_CC) $(HIFB_DEMO_CFLAGS) -o $(@D)/hifb_demo \
$(HIFB_DEMO_PKGDIR)/src/hifb_demo.c \
$(HIFB_DEMO_PKGDIR)/src/sample_comm_sys.c \
$(HIFB_DEMO_PKGDIR)/src/sample_comm_vo.c \
$(HIFB_DEMO_LDFLAGS)
endef

define HIFB_DEMO_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -D $(@D)/hifb_demo $(TARGET_DIR)/usr/bin/hifb_demo
endef

$(eval $(generic-package))
69 changes: 69 additions & 0 deletions general/package/hifb-demo/include/hi_comm_sys.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/******************************************************************************
Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd.
******************************************************************************
File Name : hi3511_sys.h
Version : Initial Draft
Author : Hi3511 MPP Team
Created : 2007/1/30
Last Modified :
Description : Hi3511 chip specific configure data structure
Function List :
History :
1.Date : 2007/1/30
Author : c42025
Modification: Created file

2.Date : 2007/11/30
Author : c42025
Modification: modify according review comments

3.Date : 2008/03/03
Author : c42025
Modification: modify HI_TRACE_SYS

4.Date : 2008/03/05
Author : c42025
Modification: modify 'HI_LOG_LEVEL_ERROR' to 'EN_ERR_LEVEL_ERROR'

******************************************************************************/
#ifndef __HI_COMM_SYS_H__
#define __HI_COMM_SYS_H__

#include "hi_type.h"
#include "hi_errno.h"
#include "hi_debug.h"

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* End of #ifdef __cplusplus */

#define HI_TRACE_SYS(level, fmt...) HI_TRACE(level, HI_ID_SYS,##fmt)
typedef struct hiMPP_SYS_CONF_S
{
/* stride of picture buffer must be aligned with this value.
* you can choose a value from 1 to 1024, and it must be multiple of 16.
*/
HI_U32 u32AlignWidth;

}MPP_SYS_CONF_S;


#define HI_ERR_SYS_NULL_PTR HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
#define HI_ERR_SYS_NOTREADY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
#define HI_ERR_SYS_NOT_PERM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
#define HI_ERR_SYS_NOMEM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
#define HI_ERR_SYS_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
#define HI_ERR_SYS_BUSY HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
#define HI_ERR_SYS_NOT_SUPPORT HI_DEF_ERR(HI_ID_SYS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)


#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* __HI_COMM_SYS_H__ */

122 changes: 122 additions & 0 deletions general/package/hifb-demo/include/hi_comm_vb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/******************************************************************************
Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd.
******************************************************************************
File Name : hi_common.h
Version : Initial Draft
Author : Hi3511 MPP Team
Created : 2006/11/09
Last Modified :
Description : The common data type defination for VB module.
Function List :
History :
1.Date : 2006/11/03
Author : c42025
Modification: Created file

2.Date : 2007/11/30
Author : c42025
Modification: modify according review comments

3.Date : 2008/06/18
Author : c42025
Modification: add VB_UID_PCIV

4.Date : 2008/10/31
Author : z44949
Modification : Translate the chinese comment

5.Date : 2008/10/31
Author : p00123320
Modification : change commentary of u32MaxPoolCnt in VB_CONF_S
******************************************************************************/
#ifndef __HI_COMM_VB_H__
#define __HI_COMM_VB_H__

#include "hi_type.h"
#include "hi_errno.h"
#include "hi_debug.h"

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* End of #ifdef __cplusplus */


#define VB_MAX_POOLS 256
#define VB_MAX_COMM_POOLS 16



/* user ID for VB */
#define VB_MAX_USER 19

#define VB_UID_VIU 0
#define VB_UID_VOU 1
#define VB_UID_DSU 2
#define VB_UID_VENC 3
#define VB_UID_VDEC 4
#define VB_UID_VDA 5
#define VB_UID_H264E 6
#define VB_UID_JPEGE 7
#define VB_UID_MPEG4E 8
#define VB_UID_H264D 9
#define VB_UID_JPEGD 10
#define VB_UID_MPEG4D 11
#define VB_UID_VPSS 12
#define VB_UID_GRP 13
#define VB_UID_MPI 14
#define VB_UID_PCIV 15
#define VB_UID_AI 16
#define VB_UID_AENC 17
#define VB_UID_RC 18

#define VB_INVALID_POOLID (-1UL)
#define VB_INVALID_HANDLE (-1UL)

typedef HI_U32 VB_POOL;
typedef HI_U32 VB_BLK;

#define RESERVE_MMZ_NAME "window"


typedef struct hiVB_CONF_S
{
HI_U32 u32MaxPoolCnt; /* max count of pools, (0,VB_MAX_POOLS] */
struct hiVB_CPOOL_S
{
HI_U32 u32BlkSize;
HI_U32 u32BlkCnt;
HI_CHAR acMmzName[MAX_MMZ_NAME_LEN];
}astCommPool[VB_MAX_COMM_POOLS];
} VB_CONF_S;


typedef struct hiVB_POOL_STATUS_S
{
HI_U32 bIsCommPool;
HI_U32 u32BlkCnt;
HI_U32 u32FreeBlkCnt;
}VB_POOL_STATUS_S;

#define HI_ERR_VB_NULL_PTR HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
#define HI_ERR_VB_NOMEM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
#define HI_ERR_VB_NOBUF HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF)
#define HI_ERR_VB_UNEXIST HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
#define HI_ERR_VB_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
#define HI_ERR_VB_NOTREADY HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
#define HI_ERR_VB_BUSY HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
#define HI_ERR_VB_NOT_PERM HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)

#define HI_ERR_VB_2MPOOLS HI_DEF_ERR(HI_ID_VB, EN_ERR_LEVEL_ERROR, EN_ERR_BUTT + 1)

#define HI_TRACE_VB(level,fmt...) HI_TRACE(level, HI_ID_VB,##fmt)

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* __HI_COMm_VB_H_ */

Loading
Loading