mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
osd: need information whether current OSD is blanked or not [1/1]
PD#SWPL-3254 Problem: need information whether current OSD is blanked or not Solution: add sysfs node osd_status Verify: verified on u212 Change-Id: Ie73417f08c648a750a881af375800aae57a48762 Signed-off-by: Jian Cao <jian.cao@amlogic.com>
This commit is contained in:
@@ -3079,6 +3079,15 @@ static ssize_t store_osd_plane_alpha(
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_osd_status(struct device *device,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct fb_info *fb_info = dev_get_drvdata(device);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "osd[%d] enable: %d\n",
|
||||
fb_info->node, osd_hw.enable[fb_info->node]);
|
||||
}
|
||||
|
||||
static inline int str2lower(char *str)
|
||||
{
|
||||
@@ -3288,6 +3297,8 @@ static struct device_attribute osd_attrs[] = {
|
||||
show_osd_dimm, store_osd_dimm),
|
||||
__ATTR(osd_plane_alpha, 0644,
|
||||
show_osd_plane_alpha, store_osd_plane_alpha),
|
||||
__ATTR(osd_status, 0444,
|
||||
show_osd_status, NULL),
|
||||
|
||||
};
|
||||
|
||||
@@ -3336,6 +3347,8 @@ static struct device_attribute osd_attrs_viu2[] = {
|
||||
show_osd_afbc_format, store_osd_afbc_format),
|
||||
__ATTR(osd_rotate, 0644,
|
||||
show_osd_rotate, store_osd_rotate),
|
||||
__ATTR(osd_status, 0444,
|
||||
show_osd_status, NULL),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
Reference in New Issue
Block a user