mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
camera rk30 : update a temp version.fix failed of 720p preview.
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_0 0x500000
|
||||
#elif (PMEM_SENSOR_FULL_RESOLUTION_CIF_0 == 0x200000) /* 1280*720*1.5*4(preview) + 3M(capture raw) + 3M(jpeg encode output) */
|
||||
#define PMEM_CAM_NECESSARY_CIF_0 0xc00000
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_0 0x400000
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_0 0x600000
|
||||
#elif ((PMEM_SENSOR_FULL_RESOLUTION_CIF_0 == 0x100000) || (PMEM_SENSOR_FULL_RESOLUTION_CIF_0 == 0x130000))
|
||||
#define PMEM_CAM_NECESSARY_CIF_0 0x800000 /* 800*600*1.5*4(preview) + 2M(capture raw) + 2M(jpeg encode output) */
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_0 0x400000
|
||||
@@ -217,7 +217,7 @@
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_1 0x500000
|
||||
#elif (PMEM_SENSOR_FULL_RESOLUTION_CIF_1== 0x200000) /* 1280*720*1.5*4(preview) + 3M(capture raw) + 3M(jpeg encode output) */
|
||||
#define PMEM_CAM_NECESSARY_CIF_1 0xc00000
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_1 0x400000
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_1 0x600000
|
||||
#elif ((PMEM_SENSOR_FULL_RESOLUTION_CIF_1 == 0x100000) || (PMEM_SENSOR_FULL_RESOLUTION_CIF_1 == 0x130000))
|
||||
#define PMEM_CAM_NECESSARY_CIF_1 0x800000 /* 800*600*1.5*4(preview) + 2M(capture raw) + 2M(jpeg encode output) */
|
||||
#define PMEM_CAMIPP_NECESSARY_CIF_1 0x400000
|
||||
|
||||
@@ -183,8 +183,9 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
*v0.x.6 : this driver improve test framerate method;
|
||||
*v0.x.7 : digital zoom use the ipp to do scale and crop , otherwise ipp just do the scale. Something wrong with digital zoom if
|
||||
we do crop with cif and do scale with ipp , we will fix this next version.
|
||||
*v0.x.8 : temp version,reinit capture list when setup video buf.
|
||||
*/
|
||||
#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 2, 7)
|
||||
#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 2, 8)
|
||||
|
||||
/* limit to rk29 hardware capabilities */
|
||||
#define RK_CAM_BUS_PARAM (SOCAM_MASTER |\
|
||||
@@ -383,6 +384,7 @@ static int rk_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
|
||||
}
|
||||
//must be reinit,or will be somthing wrong in irq process.
|
||||
pcdev->active = NULL;
|
||||
INIT_LIST_HEAD(&pcdev->capture);
|
||||
RKCAMERA_DG("%s..%d.. videobuf size:%d, vipmem_buf size:%d, count:%d \n",__FUNCTION__,__LINE__, *size,pcdev->vipmem_size, *count);
|
||||
|
||||
return 0;
|
||||
@@ -654,6 +656,10 @@ static irqreturn_t rk_camera_irq(int irq, void *data)
|
||||
pcdev->frame_inval = 0;
|
||||
}
|
||||
vb = pcdev->active;
|
||||
if(!vb){
|
||||
printk("no acticve buffer!!!\n");
|
||||
goto RK_CAMERA_IRQ_END;
|
||||
}
|
||||
/* ddl@rock-chips.com : this vb may be deleted from queue */
|
||||
if ((vb->state == VIDEOBUF_QUEUED) || (vb->state == VIDEOBUF_ACTIVE)) {
|
||||
list_del_init(&vb->queue);
|
||||
@@ -661,9 +667,14 @@ static irqreturn_t rk_camera_irq(int irq, void *data)
|
||||
pcdev->active = NULL;
|
||||
if (!list_empty(&pcdev->capture)) {
|
||||
pcdev->active = list_entry(pcdev->capture.next, struct videobuf_buffer, queue);
|
||||
if (pcdev->active) {
|
||||
if (pcdev->active && (pcdev->active->state == VIDEOBUF_QUEUED)) {
|
||||
rk_videobuf_capture(pcdev->active,pcdev);
|
||||
}
|
||||
else if(pcdev->active){
|
||||
printk("vb state is wrong ,del it \n");
|
||||
list_del_init(&(pcdev->active->queue));
|
||||
pcdev->active = NULL;
|
||||
}
|
||||
}
|
||||
if (pcdev->active == NULL) {
|
||||
RKCAMERA_DG("%s video_buf queue is empty!\n",__FUNCTION__);
|
||||
|
||||
Reference in New Issue
Block a user