mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
canvas: get canvas w/h for frame check [2/2]
PD#SWPL-1738 Problem: support frame crc32 check and dump yuv. Solution: support frame check and yuv dump in media_module, add interface to get canvas width/height. Verify: u212 Change-Id: Ieadc95521c4a21bec5685f8c8926d3bb2f92637b Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
This commit is contained in:
committed by
Dongjin Kim
parent
976f4f980c
commit
36142d5de6
@@ -334,6 +334,27 @@ unsigned int canvas_get_addr(u32 index)
|
||||
}
|
||||
EXPORT_SYMBOL(canvas_get_addr);
|
||||
|
||||
unsigned int canvas_get_width(u32 index)
|
||||
{
|
||||
struct canvas_device_info *info = &canvas_info;
|
||||
|
||||
if (!CANVAS_VALID(index))
|
||||
return 0;
|
||||
|
||||
return info->canvasPool[index].width;
|
||||
}
|
||||
EXPORT_SYMBOL(canvas_get_width);
|
||||
|
||||
unsigned int canvas_get_height(u32 index)
|
||||
{
|
||||
struct canvas_device_info *info = &canvas_info;
|
||||
|
||||
if (!CANVAS_VALID(index))
|
||||
return 0;
|
||||
|
||||
return info->canvasPool[index].height;
|
||||
}
|
||||
EXPORT_SYMBOL(canvas_get_height);
|
||||
/*********************************************************/
|
||||
#define to_canvas(kobj) container_of(kobj, struct canvas_s, kobj)
|
||||
static ssize_t addr_show(struct canvas_s *canvas, char *buf)
|
||||
|
||||
@@ -86,4 +86,8 @@ extern void canvas_update_addr(u32 index, u32 addr);
|
||||
|
||||
extern unsigned int canvas_get_addr(u32 index);
|
||||
|
||||
extern unsigned int canvas_get_width(u32 index);
|
||||
|
||||
extern unsigned int canvas_get_height(u32 index);
|
||||
|
||||
#endif /* CANVAS_H */
|
||||
|
||||
Reference in New Issue
Block a user