aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-05-20 05:14:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-06-11 08:45:28 -0400
commit3495dcefeb3b5ab825788206d5b696be14f4de19 (patch)
tree5cf0f41b702ee1645e388814ff60fdc343b0b864 /drivers/media
parent6ba8d13b0cff80ea6da18563fc2aa2cde2771be4 (diff)
[media] s5p-fimc: Fix data structures documentation and cleanup debug trace
Correct inconsistencies in data structures' documentation. Remove meaningless debug traces. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-capture.c9
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.c6
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.h25
3 files changed, 12 insertions, 28 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index 7e66455be0da..44fc26f5b05a 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -262,12 +262,7 @@ static unsigned int get_plane_size(struct fimc_frame *fr, unsigned int plane)
262{ 262{
263 if (!fr || plane >= fr->fmt->memplanes) 263 if (!fr || plane >= fr->fmt->memplanes)
264 return 0; 264 return 0;
265
266 dbg("%s: w: %d. h: %d. depth[%d]: %d",
267 __func__, fr->width, fr->height, plane, fr->fmt->depth[plane]);
268
269 return fr->f_width * fr->f_height * fr->fmt->depth[plane] / 8; 265 return fr->f_width * fr->f_height * fr->fmt->depth[plane] / 8;
270
271} 266}
272 267
273static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers, 268static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,
@@ -283,12 +278,8 @@ static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,
283 278
284 *num_planes = fmt->memplanes; 279 *num_planes = fmt->memplanes;
285 280
286 dbg("%s, buffer count=%d, plane count=%d",
287 __func__, *num_buffers, *num_planes);
288
289 for (i = 0; i < fmt->memplanes; i++) { 281 for (i = 0; i < fmt->memplanes; i++) {
290 sizes[i] = get_plane_size(&ctx->d_frame, i); 282 sizes[i] = get_plane_size(&ctx->d_frame, i);
291 dbg("plane: %u, plane_size: %lu", i, sizes[i]);
292 allocators[i] = ctx->fimc_dev->alloc_ctx; 283 allocators[i] = ctx->fimc_dev->alloc_ctx;
293 } 284 }
294 285
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c
index f1c7119c0977..c427edd3cd5e 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.c
+++ b/drivers/media/video/s5p-fimc/fimc-core.c
@@ -231,11 +231,7 @@ static int fimc_get_scaler_factor(u32 src, u32 tar, u32 *ratio, u32 *shift)
231 return 0; 231 return 0;
232 } 232 }
233 } 233 }
234
235 *shift = 0, *ratio = 1; 234 *shift = 0, *ratio = 1;
236
237 dbg("s: %d, t: %d, shift: %d, ratio: %d",
238 src, tar, *shift, *ratio);
239 return 0; 235 return 0;
240} 236}
241 237
@@ -267,10 +263,8 @@ int fimc_set_scaler_info(struct fimc_ctx *ctx)
267 err("invalid source size: %d x %d", sx, sy); 263 err("invalid source size: %d x %d", sx, sy);
268 return -EINVAL; 264 return -EINVAL;
269 } 265 }
270
271 sc->real_width = sx; 266 sc->real_width = sx;
272 sc->real_height = sy; 267 sc->real_height = sy;
273 dbg("sx= %d, sy= %d, tx= %d, ty= %d", sx, sy, tx, ty);
274 268
275 ret = fimc_get_scaler_factor(sx, tx, &sc->pre_hratio, &sc->hfactor); 269 ret = fimc_get_scaler_factor(sx, tx, &sc->pre_hratio, &sc->hfactor);
276 if (ret) 270 if (ret)
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index 3beb1e5320ce..8f0f168a9ac3 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -135,9 +135,10 @@ enum fimc_color_fmt {
135 * @name: format description 135 * @name: format description
136 * @fourcc: the fourcc code for this format, 0 if not applicable 136 * @fourcc: the fourcc code for this format, 0 if not applicable
137 * @color: the corresponding fimc_color_fmt 137 * @color: the corresponding fimc_color_fmt
138 * @depth: per plane driver's private 'number of bits per pixel'
139 * @memplanes: number of physically non-contiguous data planes 138 * @memplanes: number of physically non-contiguous data planes
140 * @colplanes: number of physically contiguous data planes 139 * @colplanes: number of physically contiguous data planes
140 * @depth: per plane driver's private 'number of bits per pixel'
141 * @flags: flags indicating which operation mode format applies to
141 */ 142 */
142struct fimc_fmt { 143struct fimc_fmt {
143 enum v4l2_mbus_pixelcode mbus_code; 144 enum v4l2_mbus_pixelcode mbus_code;
@@ -171,7 +172,7 @@ struct fimc_dma_offset {
171}; 172};
172 173
173/** 174/**
174 * struct fimc_effect - the configuration data for the "Arbitrary" image effect 175 * struct fimc_effect - color effect information
175 * @type: effect type 176 * @type: effect type
176 * @pat_cb: cr value when type is "arbitrary" 177 * @pat_cb: cr value when type is "arbitrary"
177 * @pat_cr: cr value when type is "arbitrary" 178 * @pat_cr: cr value when type is "arbitrary"
@@ -184,7 +185,6 @@ struct fimc_effect {
184 185
185/** 186/**
186 * struct fimc_scaler - the configuration data for FIMC inetrnal scaler 187 * struct fimc_scaler - the configuration data for FIMC inetrnal scaler
187 *
188 * @scaleup_h: flag indicating scaling up horizontally 188 * @scaleup_h: flag indicating scaling up horizontally
189 * @scaleup_v: flag indicating scaling up vertically 189 * @scaleup_v: flag indicating scaling up vertically
190 * @copy_mode: flag indicating transparent DMA transfer (no scaling 190 * @copy_mode: flag indicating transparent DMA transfer (no scaling
@@ -220,7 +220,6 @@ struct fimc_scaler {
220 220
221/** 221/**
222 * struct fimc_addr - the FIMC physical address set for DMA 222 * struct fimc_addr - the FIMC physical address set for DMA
223 *
224 * @y: luminance plane physical address 223 * @y: luminance plane physical address
225 * @cb: Cb plane physical address 224 * @cb: Cb plane physical address
226 * @cr: Cr plane physical address 225 * @cr: Cr plane physical address
@@ -234,6 +233,7 @@ struct fimc_addr {
234/** 233/**
235 * struct fimc_vid_buffer - the driver's video buffer 234 * struct fimc_vid_buffer - the driver's video buffer
236 * @vb: v4l videobuf buffer 235 * @vb: v4l videobuf buffer
236 * @list: linked list structure for buffer queue
237 * @paddr: precalculated physical address set 237 * @paddr: precalculated physical address set
238 * @index: buffer index for the output DMA engine 238 * @index: buffer index for the output DMA engine
239 */ 239 */
@@ -254,11 +254,10 @@ struct fimc_vid_buffer {
254 * @offs_v: image vertical pixel offset 254 * @offs_v: image vertical pixel offset
255 * @width: image pixel width 255 * @width: image pixel width
256 * @height: image pixel weight 256 * @height: image pixel weight
257 * @paddr: image frame buffer physical addresses
258 * @buf_cnt: number of buffers depending on a color format
259 * @payload: image size in bytes (w x h x bpp) 257 * @payload: image size in bytes (w x h x bpp)
260 * @color: color format 258 * @paddr: image frame buffer physical addresses
261 * @dma_offset: DMA offset in bytes 259 * @dma_offset: DMA offset in bytes
260 * @fmt: fimc color format pointer
262 */ 261 */
263struct fimc_frame { 262struct fimc_frame {
264 u32 f_width; 263 u32 f_width;
@@ -390,21 +389,22 @@ struct fimc_ctx;
390 389
391/** 390/**
392 * struct fimc_dev - abstraction for FIMC entity 391 * struct fimc_dev - abstraction for FIMC entity
393 *
394 * @slock: the spinlock protecting this data structure 392 * @slock: the spinlock protecting this data structure
395 * @lock: the mutex protecting this data structure 393 * @lock: the mutex protecting this data structure
396 * @pdev: pointer to the FIMC platform device 394 * @pdev: pointer to the FIMC platform device
397 * @pdata: pointer to the device platform data 395 * @pdata: pointer to the device platform data
396 * @variant: the IP variant information
398 * @id: FIMC device index (0..FIMC_MAX_DEVS) 397 * @id: FIMC device index (0..FIMC_MAX_DEVS)
399 * @num_clocks: the number of clocks managed by this device instance 398 * @num_clocks: the number of clocks managed by this device instance
400 * @clock[]: the clocks required for FIMC operation 399 * @clock: clocks required for FIMC operation
401 * @regs: the mapped hardware registers 400 * @regs: the mapped hardware registers
402 * @regs_res: the resource claimed for IO registers 401 * @regs_res: the resource claimed for IO registers
403 * @irq: interrupt number of the FIMC subdevice 402 * @irq: FIMC interrupt number
404 * @irq_queue: 403 * @irq_queue: interrupt handler waitqueue
405 * @m2m: memory-to-memory V4L2 device information 404 * @m2m: memory-to-memory V4L2 device information
406 * @vid_cap: camera capture device information 405 * @vid_cap: camera capture device information
407 * @state: flags used to synchronize m2m and capture mode operation 406 * @state: flags used to synchronize m2m and capture mode operation
407 * @alloc_ctx: videobuf2 memory allocator context
408 */ 408 */
409struct fimc_dev { 409struct fimc_dev {
410 spinlock_t slock; 410 spinlock_t slock;
@@ -427,8 +427,7 @@ struct fimc_dev {
427 427
428/** 428/**
429 * fimc_ctx - the device context data 429 * fimc_ctx - the device context data
430 * 430 * @slock: spinlock protecting this data structure
431 * @lock: mutex protecting this data structure
432 * @s_frame: source frame properties 431 * @s_frame: source frame properties
433 * @d_frame: destination frame properties 432 * @d_frame: destination frame properties
434 * @out_order_1p: output 1-plane YCBCR order 433 * @out_order_1p: output 1-plane YCBCR order