Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254618
b: refs/heads/master
c: 3495dce
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jun 11, 2011
1 parent 4b926b1 commit 918c5b0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ba8d13b0cff80ea6da18563fc2aa2cde2771be4
refs/heads/master: 3495dcefeb3b5ab825788206d5b696be14f4de19
9 changes: 0 additions & 9 deletions trunk/drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,7 @@ static unsigned int get_plane_size(struct fimc_frame *fr, unsigned int plane)
{
if (!fr || plane >= fr->fmt->memplanes)
return 0;

dbg("%s: w: %d. h: %d. depth[%d]: %d",
__func__, fr->width, fr->height, plane, fr->fmt->depth[plane]);

return fr->f_width * fr->f_height * fr->fmt->depth[plane] / 8;

}

static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,
Expand All @@ -283,12 +278,8 @@ static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,

*num_planes = fmt->memplanes;

dbg("%s, buffer count=%d, plane count=%d",
__func__, *num_buffers, *num_planes);

for (i = 0; i < fmt->memplanes; i++) {
sizes[i] = get_plane_size(&ctx->d_frame, i);
dbg("plane: %u, plane_size: %lu", i, sizes[i]);
allocators[i] = ctx->fimc_dev->alloc_ctx;
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/media/video/s5p-fimc/fimc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,7 @@ static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
return 0;
}
}

*shift = 0, *ratio = 1;

dbg("s: %d, t: %d, shift: %d, ratio: %d",
src, tar, *shift, *ratio);
return 0;
}

Expand Down Expand Up @@ -267,10 +263,8 @@ int fimc_set_scaler_info(struct fimc_ctx *ctx)
err("invalid source size: %d x %d", sx, sy);
return -EINVAL;
}

sc->real_width = sx;
sc->real_height = sy;
dbg("sx= %d, sy= %d, tx= %d, ty= %d", sx, sy, tx, ty);

ret = fimc_get_scaler_factor(sx, tx, &sc->pre_hratio, &sc->hfactor);
if (ret)
Expand Down
25 changes: 12 additions & 13 deletions trunk/drivers/media/video/s5p-fimc/fimc-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ enum fimc_color_fmt {
* @name: format description
* @fourcc: the fourcc code for this format, 0 if not applicable
* @color: the corresponding fimc_color_fmt
* @depth: per plane driver's private 'number of bits per pixel'
* @memplanes: number of physically non-contiguous data planes
* @colplanes: number of physically contiguous data planes
* @depth: per plane driver's private 'number of bits per pixel'
* @flags: flags indicating which operation mode format applies to
*/
struct fimc_fmt {
enum v4l2_mbus_pixelcode mbus_code;
Expand Down Expand Up @@ -171,7 +172,7 @@ struct fimc_dma_offset {
};

/**
* struct fimc_effect - the configuration data for the "Arbitrary" image effect
* struct fimc_effect - color effect information
* @type: effect type
* @pat_cb: cr value when type is "arbitrary"
* @pat_cr: cr value when type is "arbitrary"
Expand All @@ -184,7 +185,6 @@ struct fimc_effect {

/**
* struct fimc_scaler - the configuration data for FIMC inetrnal scaler
*
* @scaleup_h: flag indicating scaling up horizontally
* @scaleup_v: flag indicating scaling up vertically
* @copy_mode: flag indicating transparent DMA transfer (no scaling
Expand Down Expand Up @@ -220,7 +220,6 @@ struct fimc_scaler {

/**
* struct fimc_addr - the FIMC physical address set for DMA
*
* @y: luminance plane physical address
* @cb: Cb plane physical address
* @cr: Cr plane physical address
Expand All @@ -234,6 +233,7 @@ struct fimc_addr {
/**
* struct fimc_vid_buffer - the driver's video buffer
* @vb: v4l videobuf buffer
* @list: linked list structure for buffer queue
* @paddr: precalculated physical address set
* @index: buffer index for the output DMA engine
*/
Expand All @@ -254,11 +254,10 @@ struct fimc_vid_buffer {
* @offs_v: image vertical pixel offset
* @width: image pixel width
* @height: image pixel weight
* @paddr: image frame buffer physical addresses
* @buf_cnt: number of buffers depending on a color format
* @payload: image size in bytes (w x h x bpp)
* @color: color format
* @paddr: image frame buffer physical addresses
* @dma_offset: DMA offset in bytes
* @fmt: fimc color format pointer
*/
struct fimc_frame {
u32 f_width;
Expand Down Expand Up @@ -390,21 +389,22 @@ struct fimc_ctx;

/**
* struct fimc_dev - abstraction for FIMC entity
*
* @slock: the spinlock protecting this data structure
* @lock: the mutex protecting this data structure
* @pdev: pointer to the FIMC platform device
* @pdata: pointer to the device platform data
* @variant: the IP variant information
* @id: FIMC device index (0..FIMC_MAX_DEVS)
* @num_clocks: the number of clocks managed by this device instance
* @clock[]: the clocks required for FIMC operation
* @clock: clocks required for FIMC operation
* @regs: the mapped hardware registers
* @regs_res: the resource claimed for IO registers
* @irq: interrupt number of the FIMC subdevice
* @irq_queue:
* @irq: FIMC interrupt number
* @irq_queue: interrupt handler waitqueue
* @m2m: memory-to-memory V4L2 device information
* @vid_cap: camera capture device information
* @state: flags used to synchronize m2m and capture mode operation
* @alloc_ctx: videobuf2 memory allocator context
*/
struct fimc_dev {
spinlock_t slock;
Expand All @@ -427,8 +427,7 @@ struct fimc_dev {

/**
* fimc_ctx - the device context data
*
* @lock: mutex protecting this data structure
* @slock: spinlock protecting this data structure
* @s_frame: source frame properties
* @d_frame: destination frame properties
* @out_order_1p: output 1-plane YCBCR order
Expand Down

0 comments on commit 918c5b0

Please sign in to comment.