media: update some config info

PD#138714 media: update some config info

Change-Id: I1aca777f405de64163db14394ab36140d39da6f7
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
Pengcheng Chen
2017-05-10 09:03:09 +08:00
committed by Jianxin Pan
parent a456d2e663
commit 57e8e34df1
15 changed files with 77 additions and 59 deletions

View File

@@ -201,6 +201,7 @@ CONFIG_AMLOGIC_PWM=y
CONFIG_AMLOGIC_MEDIA_ENABLE=y
CONFIG_AMLOGIC_MEDIA_COMMON=y
CONFIG_AMLOGIC_MEDIA_DRIVERS=y
CONFIG_AMLOGIC_MEDIA_VIDEO=y
CONFIG_AMLOGIC_MEDIA_CODEC_MM=y
CONFIG_AMLOGIC_MEDIA_CANVAS=y
CONFIG_AMLOGIC_MEDIA_GE2D=y
@@ -224,7 +225,7 @@ CONFIG_AMLOGIC_MEDIA_VIN=y
CONFIG_AMLOGIC_MEDIA_TVIN=y
CONFIG_AMLOGIC_MEDIA_VDIN=y
CONFIG_AMLOGIC_MEDIA_VIUIN=y
CONFIG_AMLOGIC_VIDEO_PROCESSOR=y
CONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR=y
CONFIG_AMLOGIC_V4L_VIDEO=y
CONFIG_AMLOGIC_V4L_VIDEO2=y
CONFIG_AMLOGIC_POST_PROCESS_MANAGER=y

View File

@@ -1,10 +1,10 @@
obj-$(CONFIG_AMLOGIC_MEDIA_COMMON) += common/
obj-$(CONFIG_AMLOGIC_MEDIA_DRIVERS) += frame_sync/
obj-$(CONFIG_AMLOGIC_MEDIA_DRIVERS) += video_sink/
obj-$(CONFIG_AMLOGIC_MEDIA_VIDEO) += frame_sync/
obj-$(CONFIG_AMLOGIC_MEDIA_VIDEO) += video_sink/
obj-$(CONFIG_AMLOGIC_VOUT) += vout/
obj-$(CONFIG_AMLOGIC_MEDIA_DRIVERS) += osd/
obj-$(CONFIG_AMLOGIC_MEDIA_DRIVERS) += osd_ext/
obj-$(CONFIG_AMLOGIC_MEDIA_FB) += osd/
obj-$(CONFIG_AMLOGIC_MEDIA_FB_EXT) += osd_ext/
obj-$(CONFIG_AMLOGIC_MEDIA_DEINTERLACE) += deinterlace/
obj-$(CONFIG_AMLOGIC_MEDIA_VIN) += vin/
obj-$(CONFIG_AMLOGIC_MEDIA_DRIVERS) += video_processor/
obj-$(CONFIG_AMLOGIC_MEDIA_VIDEO_PROCESSOR) += video_processor/
obj-$(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT) += enhancement/

View File

@@ -1,4 +1,4 @@
obj-y += frame_sync.o
obj-$(CONFIG_AMLOGIC_MEDIA_VIDEO) += frame_sync.o
frame_sync-objs += ptsserv.o
frame_sync-objs += timestamp.o
frame_sync-objs += tsync.o

View File

@@ -41,12 +41,12 @@
#ifdef CONFIG_AMLOGIC_VPU
#include <linux/amlogic/media/vpu/vpu.h>
#endif
#ifdef CONFIG_AMLOGIC_VECM
#include <linux/amlogic/amvecm/ve.h>
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
#include <linux/amlogic/media/amvecm/ve.h>
#endif
#ifdef CONFIG_AMLOGIC_VIDEO
#include <linux/amlogic/amports/video.h>
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#include <linux/amlogic/media/video_sink/video.h>
#endif
/* Local Headers */
#include "osd_canvas.h"
@@ -241,7 +241,7 @@ static unsigned int *filter_table[] = {
osd_filter_coefs_3point_bspline
};
#ifdef CONFIG_AMLOGIC_VECM
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
static bool osd_hdr_on;
#endif
@@ -620,7 +620,7 @@ u32 osd_get_hw_reset_flag(void)
/* same bit, but gxm only reset hardware, not top reg*/
if (osd_hw.osd_afbcd[OSD1].enable)
hw_reset_flag |= HW_RESET_AFBCD_HARDWARE;
#ifndef CONFIG_AMLOGIC_VECM
#ifndef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
break;
#else
case MESON_CPU_MAJOR_ID_GXL:
@@ -725,7 +725,7 @@ static int notify_to_amvideo(void)
"osd notify_to_amvideo vpp misc:0x%08x, mask:0x%08x\n",
para[0], para[1]);
#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
amvideo_notifier_call_chain(
AMVIDEO_UPDATE_OSD_MODE,
(void *)&para[0]);
@@ -1204,7 +1204,7 @@ void osd_setup_hw(u32 index,
osd_antiflicker_update_pan(yoffset, yres);
if (osd_hw.clone[index])
osd_clone_pan(index, yoffset, 0);
#ifdef CONFIG_AM_FB_EXT
#ifdef CONFIG_AMLOGIC_MEDIA_FB_EXT
osd_ext_clone_pan(index);
#endif
osd_wait_vsync_hw();
@@ -2214,7 +2214,7 @@ static void osd_pan_display_fence(struct osd_fence_map_s *fence_map)
else
osd_log_err("------NOT signal out_fence ERROR\n");
}
#ifdef CONFIG_AM_FB_EXT
#ifdef CONFIG_AMLOGIC_MEDIA_FB_EXT
if (ret)
osd_ext_clone_pan(index);
#endif
@@ -2248,7 +2248,7 @@ void osd_pan_display_hw(u32 index, unsigned int xoffset, unsigned int yoffset)
add_to_update_list(index, DISP_GEOMETRY);
osd_wait_vsync_hw();
}
#ifdef CONFIG_AM_FB_EXT
#ifdef CONFIG_AMLOGIC_MEDIA_FB_EXT
osd_ext_clone_pan(index);
#endif
osd_log_dbg2("offset[%d-%d]x[%d-%d]y[%d-%d]\n",
@@ -3604,7 +3604,7 @@ void osd_init_hw(u32 logo_loaded)
osd_hw.updated[OSD2] = 0;
osd_hw.urgent[OSD1] = 1;
osd_hw.urgent[OSD2] = 1;
#ifdef CONFIG_AMLOGIC_VECM
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
osd_hdr_on = false;
#endif
osd_hw.hw_reset_flag = HW_RESET_NONE;
@@ -3880,7 +3880,7 @@ void osd_resume_hw(void)
void osd_shutdown_hw(void)
{
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
enable_rdma(0);
#endif
#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA

View File

@@ -29,7 +29,6 @@
#define PAT_VAL 0x00000000
#define PAT_START_PTR 1
#define PAT_END_PTR 1
#define HOLD_LINES 14
#define Y_STEP 0
extern int osd_set_prot(unsigned char x_rev,

View File

@@ -44,8 +44,8 @@
#include "osd_backup.h"
#ifdef CONFIG_AMLOGIC_MEDIA_RDMA
#include <linux/amlogic/media/rdma/rdma_mgr.h>
#ifdef CONFIG_AMLOGIC_VECM
#include <linux/amlogic/amvecm/ve.h>
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
#include <linux/amlogic/media/amvecm/ve.h>
#endif
#endif
@@ -504,7 +504,7 @@ void set_reset_rdma_trigger_line(void)
aml_write_vcbus(VPP_INT_LINE_NUM, trigger_line);
}
#ifdef CONFIG_AMLOGIC_VECM
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
static void hdr_restore_osd_csc(void)
{
u32 i = 0;
@@ -696,7 +696,7 @@ static void osd_reset_rdma_func(u32 reset_bit)
VIU_SW_RESET, 1);
rdma_write_reg(osd_reset_rdma_handle,
VIU_SW_RESET, 0);
#ifdef CONFIG_AMLOGIC_VECM
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
hdr_restore_osd_csc();
#endif
set_reset_rdma_trigger_line();

View File

@@ -10,8 +10,8 @@ config AMLOGIC_MEDIA_FB_EXT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
depends on AMLOGIC_MEDIA_CANVAS
depends on AMLOGIC_VOUT2
#depends on AMLOGIC_MEDIA_CANVAS
#depends on AMLOGIC_VOUT2
help
This is the frame buffer device driver.
endmenu

View File

@@ -40,7 +40,8 @@
#include <linux/uaccess.h>
/* Amlogic Headers */
#include <linux/amlogic/display/vout_notify.h>
#include <linux/amlogic/media/vout/vinfo.h>
#include <linux/amlogic/media/vout/vout_notify.h>
/* Local Headers */
#include <osd/osd.h>

View File

@@ -23,7 +23,6 @@
#include <linux/fb.h>
/* Amlogic Headers */
#include <linux/amlogic/display/vinfo.h>
/* Local Headers */
#include <osd/osd.h>

View File

@@ -26,8 +26,6 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/kthread.h>
#include <sw_sync.h>
#include <sync.h>
/* Android Headers */
#include <sw_sync.h>
@@ -40,8 +38,8 @@
#include <linux/amlogic/media/canvas/canvas.h>
#include <linux/amlogic/media/canvas/canvas_mgr.h>
#endif
#ifdef CONFIG_AMLOGIC_VIDEO
#include <linux/amlogic/amports/vframe_receiver.h>
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#include <linux/amlogic/media/amports/vframe_receiver.h>
#endif
/* Local Headers */
@@ -81,14 +79,14 @@ struct mutex ext_post_fence_list_lock;
static void osd_ext_pan_display_fence(struct osd_fence_map_s *fence_map);
#endif
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#define PROVIDER_NAME "osd_ext"
static struct vframe_s vf;
static struct vframe_provider_s osd_ext_vf_prov;
static unsigned char osd_ext_vf_prov_init;
#endif
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
static int g_vf_visual_width;
static int g_vf_width;
static int g_vf_height;
@@ -368,7 +366,7 @@ int osd_ext_sync_request(u32 index, u32 yres, u32 xoffset, u32 yoffset,
}
#endif
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
static struct vframe_s *osd_ext_vf_peek(void *arg)
{
if ((osd_ext_vf_need_update && (vf.width > 0) && (vf.height > 0)))
@@ -799,7 +797,7 @@ void osd_ext_enable_hw(u32 index, int enable)
static void osd_ext_set_free_scale_enable_mode0(u32 index, u32 enable)
{
static struct pandata_s save_disp_data = { 0, 0, 0, 0 };
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#ifdef CONFIG_AMLOGIC_POST_PROCESS_MANAGER
int mode_changed = 0;
@@ -815,7 +813,7 @@ static void osd_ext_set_free_scale_enable_mode0(u32 index, u32 enable)
if (index == OSD1) {
if (enable) {
osd_ext_vf_need_update = true;
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
if ((osd_ext_hw.free_src_data[OSD1].x_end > 0)
&& (osd_ext_hw.free_src_data[OSD1].x_end > 0)) {
vf.width =
@@ -875,7 +873,7 @@ static void osd_ext_set_free_scale_enable_mode0(u32 index, u32 enable)
add_to_update_list(OSD1, DISP_GEOMETRY);
add_to_update_list(OSD1, OSD_COLOR_MODE);
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
vf_unreg_provider(&osd_ext_vf_prov);
#endif
@@ -886,7 +884,7 @@ static void osd_ext_set_free_scale_enable_mode0(u32 index, u32 enable)
}
osd_ext_enable_hw(osd_ext_hw.enable[index], index);
#ifdef CONFIG_AMLOGIC_VIDEO
#ifdef CONFIG_AMLOGIC_MEDIA_VIDEO
#ifdef CONFIG_AMLOGIC_POST_PROCESS_MANAGER
if (mode_changed) {
/* extern void vf_ppmgr_reset(int type); */

View File

@@ -27,7 +27,6 @@
#define PAT_VAL 0x00000000
#define PAT_START_PTR 1
#define PAT_END_PTR 1
#define HOLD_LINES 28
#define Y_STEP 0
extern int osd_ext_set_prot(unsigned char x_rev,

View File

@@ -4,14 +4,14 @@
menu "Amlogic Video Processor Support"
config AMLOGIC_VIDEO_PROCESSOR
config AMLOGIC_MEDIA_VIDEO_PROCESSOR
bool "Amlogic Video Processor Driver"
default n
help
Amlogic Video Processor module support.
Video Processor module includes ION_VIDEO, PPMGR, VIDEO_DEV and etc.
if AMLOGIC_VIDEO_PROCESSOR
if AMLOGIC_MEDIA_VIDEO_PROCESSOR
source "drivers/amlogic/media/video_processor/video_dev/Kconfig"
source "drivers/amlogic/media/video_processor/ppmgr/Kconfig"

View File

@@ -1,6 +1,26 @@
#
# Amlogic video Sink configuation
#
menu "Amlogic Video Sink Driver Support"
config AMLOGIC_MEDIA_VIDEO
bool "Amlogic Video Sink Driver"
default n
help
Amlogic Video Sink module support.
This module driver include basic
video, vpp etc.
if AMLOGIC_MEDIA_VIDEO
config AMLOGIC_MEDIA_VSYNC_RDMA
bool "VSYNC CBUS RDMA"
default n
depends on AMLOGIC_MEDIA_RDMA
help
Select to enable VSYNC CBUS RDMA.
endif
endmenu

View File

@@ -439,7 +439,7 @@ int get_video_debug_flags(void)
static int vsync_enter_line_max;
static int vsync_exit_line_max;
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
static int vsync_rdma_line_max;
#endif
static u32 framepacking_support __nosavedata;
@@ -603,7 +603,7 @@ bool to_notify_trick_wait;
/* display canvas */
#define DISPLAY_CANVAS_BASE_INDEX 0x60
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
static struct vframe_s *cur_rdma_buf;
/*
void vsync_rdma_config(void);
@@ -1967,7 +1967,7 @@ static void vsync_toggle_frame(struct vframe_s *vf)
}
} else {
new_frame_count++;
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if (is_vsync_rdma_enable()) {
#ifdef RDMA_RECYCLE_ORDERED_VFRAMES
if (dispbuf_to_put_num < DISPBUF_TO_PUT_MAX) {
@@ -2031,7 +2031,7 @@ static void vsync_toggle_frame(struct vframe_s *vf)
}
if ((vf->canvas0Addr != 0) &&
(VSYNC_RD_MPEG_REG(DI_IF1_GEN_REG) & 0x1) == 0) {
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if (vf->canvas0Addr != (u32)-1) {
canvas_copy(vf->canvas0Addr & 0xff,
disp_canvas_index[rdma_canvas_id][0]);
@@ -3118,7 +3118,7 @@ static int detect_vout_type(void)
default:
break;
}
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if (is_vsync_rdma_enable()) {
if (vout_type == VOUT_TYPE_TOP_FIELD)
vout_type = VOUT_TYPE_BOT_FIELD;
@@ -3506,7 +3506,7 @@ void set_vsync_pts_inc_mode(int inc)
}
EXPORT_SYMBOL(set_vsync_pts_inc_mode);
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
void vsync_rdma_process(void)
{
vsync_rdma_config();
@@ -3651,7 +3651,7 @@ static irqreturn_t vsync_isr(int irq, void *dev_id)
if (enc_line > vsync_enter_line_max)
vsync_enter_line_max = enc_line;
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
vsync_rdma_config_pre();
if (to_notify_trick_wait) {
@@ -3744,7 +3744,7 @@ static irqreturn_t vsync_isr(int irq, void *dev_id)
goto exit;
if (atomic_read(&video_pause_flag))
goto exit;
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if (is_vsync_rdma_enable())
rdma_canvas_id = next_rdma_canvas_id;
else {
@@ -3942,7 +3942,7 @@ static irqreturn_t vsync_isr(int irq, void *dev_id)
if (trickmode_fffb == 1) {
trickmode_vpts = vf->pts;
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if ((VSYNC_RD_MPEG_REG(DI_IF1_GEN_REG) & 0x1)
== 0)
to_notify_trick_wait = true;
@@ -4535,7 +4535,7 @@ cur_dev->vpp_off,0,VPP_VD2_ALPHA_BIT,9);//vd2 alpha must set
if (cur_dispbuf && cur_dispbuf->process_fun) {
/* for new deinterlace driver */
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
if (debug_flag & DEBUG_FLAG_PRINT_RDMA) {
if (enable_rdma_log_count > 0)
pr_info("call process_fun\n");
@@ -4552,7 +4552,7 @@ cur_dev->vpp_off,0,VPP_VD2_ALPHA_BIT,9);//vd2 alpha must set
exit:
vpp_misc_save = READ_VCBUS_REG(VPP_MISC + cur_dev->vpp_off);
vpp_misc_set = vpp_misc_save;
#ifdef CONFIG_AM_VECM
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM
vpp_misc_set |= VPP_CM_ENABLE;
#endif
if (update_osd_vpp_misc) {
@@ -4732,7 +4732,7 @@ cur_dev->vpp_off,0,VPP_VD2_ALPHA_BIT,9);//vd2 alpha must set
VSYNC_WR_MPEG_REG(AFBC_ENABLE, 0);
}
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
cur_rdma_buf = cur_dispbuf;
/* vsync_rdma_config(); */
vsync_rdma_process();
@@ -4892,7 +4892,7 @@ static void video_vf_unreg_provider(void)
atomic_set(&video_unreg_flag, 1);
spin_lock_irqsave(&lock, flags);
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
dispbuf_to_put_num = DISPBUF_TO_PUT_MAX;
while (dispbuf_to_put_num > 0) {
dispbuf_to_put_num--;
@@ -4951,7 +4951,7 @@ static void video_vf_light_unreg_provider(void)
ulong flags;
spin_lock_irqsave(&lock, flags);
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
dispbuf_to_put_num = DISPBUF_TO_PUT_MAX;
while (dispbuf_to_put_num > 0) {
dispbuf_to_put_num--;
@@ -8085,7 +8085,7 @@ static int __init video_init(void)
vout_hook();
#endif
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
dispbuf_to_put_num = DISPBUF_TO_PUT_MAX;
while (dispbuf_to_put_num > 0) {
dispbuf_to_put_num--;
@@ -8208,7 +8208,7 @@ module_param(vsync_enter_line_max, uint, 0664);
MODULE_PARM_DESC(vsync_exit_line_max, "\n vsync_exit_line_max\n");
module_param(vsync_exit_line_max, uint, 0664);
#ifdef CONFIG_VSYNC_RDMA
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
MODULE_PARM_DESC(vsync_rdma_line_max, "\n vsync_rdma_line_max\n");
module_param(vsync_rdma_line_max, uint, 0664);
#endif

View File

@@ -71,6 +71,7 @@ extern bool pre_scaler_en;
#define VD1_FMT_CHROMA_WIDTH_BIT 0
#define VIU_MISC_AFBC_VD1 (1 << 20)
#define VPP_CM_ENABLE (1 << 28)
#define VPP_VD2_ALPHA_WID 9
#define VPP_VD2_ALPHA_MASK 0x1ff
@@ -263,5 +264,5 @@ extern enum vmode_e get_logo_vmode(void);
int query_video_status(int type, int *value);
int get_video0_frame_info(struct vframe_s *vf);
int amvideo_notifier_call_chain(unsigned long val, void *v);
#endif /* VIDEO_H */