mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
Revert "Revert "canvas: get canvas w/h for frame check [2/2]""
This reverts commit f9e4d0b2e6.
Change-Id: I9652945625684ca880215858621651c324b8ef63
(cherry picked from commit dd2a580802222ced106aae8e5351c0de945d5da2)
This commit is contained in:
@@ -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