you can use fb sysfs
/kernel/drivers/video/fbsysfs.c

static ssize_t show_virtual(struct device *device,
    struct device_attribute *attr, char *buf)
{
struct fb_info *fb_info = dev_get_drvdata(device);
return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual,
fb_info->var.yres_virtual);
}

olivia mckenzy於 2012年3月17日星期六UTC+8上午3時43分40秒寫道:
>
> Hi, i wanted to know if there is a way to obtain the screen resolution 
> in a device driver, i thought of reading a file but it seems not to be 
> a great solution, what i want is to use the xres and the yres of the 
> screen resolution in a touchscreen driver to calibrate the touchscreen 
> inside the driver, i already made the manual calibration inside the 
> driver, but it has to be automatically so that's why i need the 
> resolution, is there a way to obtain that?, if someone could help me, 
> it would be great, thanks in advanced.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to