Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop

This commit is contained in:
fang
2011-08-18 11:40:54 +08:00
4 changed files with 124 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.27
# Tue Aug 9 21:44:30 2011
# Tue Aug 16 20:21:21 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -209,6 +209,7 @@ CONFIG_ARCH_RK29=y
# CONFIG_MACH_RK29_A22 is not set
# CONFIG_MACH_RK29_PHONEPADSDK is not set
CONFIG_MACH_RK29_newton=y
# CONFIG_MACH_RK29_P91 is not set
# CONFIG_DDR_TYPE_DDRII is not set
# CONFIG_DDR_TYPE_LPDDR is not set
# CONFIG_DDR_TYPE_DDR3_800D is not set
@@ -897,6 +898,9 @@ CONFIG_RK29_NEWTON=y
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_RK29_SUPPORT_MODEM is not set
# CONFIG_MODEM_ROCKCHIP_DEMO is not set
# CONFIG_MODEM_LONGCHEER_U6300V is not set
# CONFIG_MODEM_THINKWILL_MW100G is not set
# CONFIG_RK29_GPS is not set
#
@@ -1086,6 +1090,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_D70_L3188A is not set
CONFIG_TOUCHSCREEN_GT819=y
CONFIG_TOUCHSCREEN_FT5406=y
# CONFIG_ATMEL_MXT1386 is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_LPSENSOR_ISL29028 is not set
# CONFIG_INPUT_LPSENSOR_CM3602 is not set
@@ -1366,6 +1371,8 @@ CONFIG_SOC_CAMERA_OV3640=y
CONFIG_OV3640_AUTOFOCUS=y
# CONFIG_OV3640_FIXEDFOCUS is not set
# CONFIG_SOC_CAMERA_OV5642 is not set
# CONFIG_OV5642_AUTOFOCUS is not set
# CONFIG_OV5642_FIXEDFOCUS is not set
# CONFIG_SOC_CAMERA_OV5640 is not set
# CONFIG_SOC_CAMERA_S5K6AA is not set
# CONFIG_SOC_CAMERA_GT2005 is not set
@@ -1526,11 +1533,14 @@ CONFIG_DISPLAY_SUPPORT=y
# CONFIG_DEFAULT_OUT_HDMI is not set
# CONFIG_LCD_AT070TNA2 is not set
CONFIG_LCD_AT070TN93=y
# CONFIG_LCD_TX23D88VM is not set
#
# HDMI
#
# CONFIG_HDMI is not set
# CONFIG_ANX7150 is not set
# CONFIG_ANX9030 is not set
#
# Console display driver support

View File

@@ -34,7 +34,7 @@
#include <linux/mm.h>
#include <linux/poll.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/timer.h>
#include <asm/uaccess.h>
@@ -120,7 +120,7 @@ typedef struct vpu_device {
typedef struct vpu_service_info {
spinlock_t lock;
struct workqueue_struct *workqueue;
struct timer_list timer; /* timer for power off */
struct list_head waiting; /* link to link_reg in struct vpu_reg */
struct list_head running; /* link to link_reg in struct vpu_reg */
struct list_head done; /* link to link_reg in struct vpu_reg */
@@ -148,8 +148,6 @@ static vpu_service_info service;
static vpu_device dec_dev;
static vpu_device enc_dev;
static void vpu_service_power_off_work_func(struct work_struct *work);
static DECLARE_DELAYED_WORK(vpu_service_power_off_work, vpu_service_power_off_work_func);
#define POWER_OFF_DELAY 3*HZ /* 3s */
static void vpu_get_clk(void)
@@ -168,12 +166,42 @@ static void vpu_put_clk(void)
clk_put(hclk_cpu_vcodec);
}
static void vpu_service_power_on(void)
static void vpu_service_power_off(void)
{
if (service.enabled)
if (!service.enabled)
return;
service.enabled = false;
printk("vpu: power off\n");
while(atomic_read(&service.task_running)) {
pr_alert("power off when task running!!\n");
udelay(10);
}
pmu_set_power_domain(PD_VCODEC, false);
udelay(10);
clk_disable(hclk_cpu_vcodec);
clk_disable(aclk_ddr_vepu);
clk_disable(hclk_vepu);
clk_disable(aclk_vepu);
}
static void vpu_service_power_off_work_func(unsigned long data)
{
printk("vpu: delayed power off work\n");
vpu_service_power_off();
}
static void vpu_service_power_on(void)
{
if (service.enabled) {
mod_timer(&service.timer, jiffies + POWER_OFF_DELAY);
return;
}
service.enabled = true;
printk("vpu: power on\n");
clk_enable(aclk_vepu);
clk_enable(hclk_vepu);
clk_enable(hclk_cpu_vcodec);
@@ -181,34 +209,10 @@ static void vpu_service_power_on(void)
pmu_set_power_domain(PD_VCODEC, true);
udelay(10);
clk_enable(aclk_ddr_vepu);
service.enabled = true;
}
static void vpu_service_power_off(void)
{
if (!service.enabled)
return;
while(atomic_read(&service.task_running)) {
pr_alert("power off when task running!!\n");
udelay(10);
}
printk("vpu: power off\n");
pmu_set_power_domain(PD_VCODEC, false);
udelay(10);
clk_disable(hclk_cpu_vcodec);
clk_disable(aclk_ddr_vepu);
clk_disable(hclk_vepu);
clk_disable(aclk_vepu);
service.enabled = false;
}
static void vpu_service_power_off_work_func(struct work_struct *work)
{
pr_debug("work\n");
vpu_service_power_off();
init_timer(&service.timer);
service.timer.expires = jiffies + POWER_OFF_DELAY;
service.timer.function = vpu_service_power_off_work_func;
add_timer(&service.timer);
}
static vpu_reg *reg_init(vpu_session *session, void __user *src, unsigned long size)
@@ -393,21 +397,11 @@ static void try_set_reg(void)
((VPU_PP == reg->type) && (NULL == service.reg_pproc)) ||
((VPU_ENC == reg->type) && (NULL == service.reg_codec))) {
reg_from_wait_to_run(reg);
if (!cancel_delayed_work(&vpu_service_power_off_work)) {
if (!in_interrupt()) {
flush_delayed_work(&vpu_service_power_off_work);
} else {
pr_err("try_set_reg in inturrpt but cancel power off failed\n");
}
}
vpu_service_power_on();
reg_copy_to_hw(reg);
}
spin_unlock_irqrestore(&service.lock, flag);
} else {
spin_unlock_irqrestore(&service.lock, flag);
queue_delayed_work(service.workqueue, &vpu_service_power_off_work, POWER_OFF_DELAY);
}
spin_unlock_irqrestore(&service.lock, flag);
}
static int return_reg(vpu_reg *reg, u32 __user *dst)
@@ -682,7 +676,7 @@ static struct miscdevice vpu_service_misc_device = {
static void vpu_service_shutdown(struct platform_device *pdev)
{
pr_cont("shutdown...");
cancel_delayed_work(&vpu_service_power_off_work);
del_timer(&service.timer);
vpu_service_power_off();
pr_cont("done\n");
}
@@ -691,7 +685,7 @@ static int vpu_service_suspend(struct platform_device *pdev, pm_message_t state)
{
bool enabled;
pr_info("suspend...");
cancel_delayed_work(&vpu_service_power_off_work);
del_timer(&service.timer);
enabled = service.enabled;
vpu_service_power_off();
service.enabled = enabled;
@@ -981,11 +975,6 @@ static int __init vpu_service_init(void)
service.reg_pproc = NULL;
atomic_set(&service.task_running, 0);
service.enabled = false;
service.workqueue = create_singlethread_workqueue("vpu_service");
if (!service.workqueue) {
pr_err("create_singlethread_workqueue failed\n");
return -ENOMEM;
}
vpu_get_clk();
vpu_service_power_on();
@@ -1018,6 +1007,7 @@ static int __init vpu_service_init(void)
platform_device_register(&vpu_service_device);
platform_driver_probe(&vpu_service_driver, NULL);
get_hw_info();
del_timer(&service.timer);
vpu_service_power_off();
pr_info("init success\n");
@@ -1030,19 +1020,18 @@ err_req_vepu_irq:
err_req_vdpu_irq:
pr_info("init failed\n");
err_reserve_io:
del_timer(&service.timer);
vpu_service_power_off();
vpu_service_release_io();
vpu_put_clk();
destroy_workqueue(service.workqueue);
pr_info("init failed\n");
return ret;
}
static void __exit vpu_service_exit(void)
{
cancel_delayed_work(&vpu_service_power_off_work);
del_timer(&service.timer);
vpu_service_power_off();
destroy_workqueue(service.workqueue);
platform_device_unregister(&vpu_service_device);
platform_driver_unregister(&vpu_service_driver);
misc_deregister(&vpu_service_misc_device);
@@ -1066,7 +1055,6 @@ static int proc_vpu_service_show(struct seq_file *s, void *v)
vpu_reg *reg, *reg_tmp;
vpu_session *session, *session_tmp;
cancel_delayed_work_sync(&vpu_service_power_off_work);
vpu_service_power_on();
seq_printf(s, "\nENC Registers:\n");
n = enc_dev.iosize >> 2;
@@ -1095,7 +1083,6 @@ static int proc_vpu_service_show(struct seq_file *s, void *v)
}
}
spin_unlock_irqrestore(&service.lock, flag);
queue_delayed_work(service.workqueue, &vpu_service_power_off_work, POWER_OFF_DELAY);
return 0;
}

View File

@@ -794,9 +794,15 @@ int ipp_blit(const struct rk29_ipp_req *req)
}
if(!((req->src0.fmt != IPP_Y_CBCR_H2V1)&&(req->src0.w == 176)&&(req->src0.h == 144)&&(req->dst0.w == 480)&&(req->dst0.h == 800)))
/*only support 1/2 to 4 times scaling,but two cases can pass
1.176*144->480*800, YUV420
2.128*128->480*800, YUV420
*/
if(!((req->src0.fmt == IPP_Y_CBCR_H2V2)&&
(((req->src0.w == 176)&&(req->src0.h == 144))||((req->src0.w == 128)&&(req->src0.h == 128)))&&
((req->dst0.w == 480)&&(req->dst0.h == 800))))
{
//only support 1/2 to 4 times scaling,but 176*144->480*800 can pass
if(post_scale_w<0x3ff || post_scale_w>0x1fff || post_scale_h<0x400 || post_scale_h>0x2000 )
{
printk("invalid post_scale para!\n");
@@ -1269,21 +1275,21 @@ uint32_t size = 8*1024*1024;
ipp_req.src0.YrgbMst = src_addr;
ipp_req.src0.CbrMst = src_addr + size;
ipp_req.src0.w = 480;
ipp_req.src0.h = 320;
ipp_req.src0.w = 128;
ipp_req.src0.h = 128;
ipp_req.src0.fmt = IPP_Y_CBCR_H2V2;
ipp_req.dst0.YrgbMst = dst_addr;
ipp_req.dst0.CbrMst = dst_addr + size;
ipp_req.dst0.w = 240;
ipp_req.dst0.h = 160;
ipp_req.dst0.w = 480;
ipp_req.dst0.h = 800;
ipp_req.src_vir_w = 480;
ipp_req.dst_vir_w = 240;
ipp_req.src_vir_w = 128;
ipp_req.dst_vir_w = 480;
ipp_req.timeout = 100;
ipp_req.flag = IPP_ROT_0;
ipp_req.deinterlace_enable =1;
ipp_req.deinterlace_enable =0;
ipp_req.deinterlace_para0 = 16;
ipp_req.deinterlace_para1 = 16;
ipp_req.deinterlace_para2 = 0;
@@ -1291,11 +1297,13 @@ uint32_t size = 8*1024*1024;
ipp_req.complete = ipp_test_complete;
/*0 test whether IPP_CONFIG is set correctly*/
/*
ipp_blit_sync(&ipp_req);
ipp_req.dst0.w = 480;
ipp_req.dst0.h = 320;
ipp_req.dst_vir_w = 480;
ipp_blit_sync(&ipp_req);
*/
/*1 test ipp_blit_sync*/
/*
@@ -1407,6 +1415,45 @@ uint32_t size = 8*1024*1024;
while(ret>0);
*/
/*8 test special up scaling*/
ipp_req.src0.fmt = IPP_Y_CBCR_H2V2;
ipp_req.src0.w = 128;
ipp_req.src0.h = 128;
ipp_req.dst0.w = 480;
ipp_req.dst0.h = 800;
ipp_req.src_vir_w = 128;
ipp_req.dst_vir_w = 480;
ret = -1;
ret = ipp_blit_sync(&ipp_req);
printk("128x128->480x800: %d \n",ret);
ipp_req.src0.w = 160;
ipp_req.src0.h = 160;
ipp_req.src_vir_w = 160;
ret = -1;
ret = ipp_blit_sync(&ipp_req);
printk("160x160->480x800: %d \n",ret);
ipp_req.src0.w = 176;
ipp_req.src0.h = 144;
ipp_req.src_vir_w = 176;
ret = -1;
ret = ipp_blit_sync(&ipp_req);
printk("176x144->480x800: %d \n",ret);
ipp_req.src0.fmt = IPP_Y_CBCR_H2V1;
ret = -1;
ret = ipp_blit_sync(&ipp_req);
printk("fmt:422 176x144->480x800 : %d \n",ret);
ipp_req.src0.fmt = IPP_Y_CBCR_H2V2;
ipp_req.dst0.w = 800;
ipp_req.dst0.h = 480;
ipp_req.dst_vir_w = 800;
ret = -1;
ret = ipp_blit_sync(&ipp_req);
printk("176x144->800x480: %d \n",ret);
free_pages(srcY, 9);
//test deinterlace

View File

@@ -9,6 +9,7 @@ arch/arm/mach-rk29/vpu.c
arch/arm/mach-rk29/vpu_mem.c
drivers/staging/rk29/ipp/rk29-ipp.c
sound/soc/codecs/rt5625.c
)
DIRS=(
@@ -88,6 +89,11 @@ for d in ${DIRS[@]}; do
[ -d $d ] && find $d -type f -name '*.uu' -print0 | xargs -0 rm -f
done
#zwp
mv sound/soc/codecs/rt5625.c sound/soc/codecs/rt5625.c.bak
mv sound/soc/codecs/rt5625.c.enc sound/soc/codecs/rt5625.c
####
echo build kernel on $kerndir with $defconfig
make clean >/dev/null 2>&1
make $defconfig >/dev/null 2>&1
@@ -109,6 +115,11 @@ for d in ${DIRS[@]}; do
done
done
#zwp
mv sound/soc/codecs/rt5625.c sound/soc/codecs/rt5625.c.enc
mv sound/soc/codecs/rt5625.c.bak sound/soc/codecs/rt5625.c
####
make distclean >/dev/null 2>&1
popd >/dev/null
@@ -124,6 +135,8 @@ done
for file in ${EXCLUDES[@]}; do
echo "$file" >> $ex
done
echo sound/soc/codecs/rt5625.c >>$ex
echo sound/soc/codecs/rt5625.c.enc >>$ex
echo TAR $(pwd)/$package
tar cf $package --numeric-owner --exclude-from $ex --exclude=.git --exclude=`basename $0` $(basename $kerndir)
tar rf $package --numeric-owner --exclude=.git toolchain/arm-eabi-4.4.0