summaryrefslogtreecommitdiff
path: root/drivers/staging/udlfb/udlfb.h
diff options
context:
space:
mode:
authorBernie Thompson <bernie@plugable.com>2010-02-15 06:46:08 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:43:00 -0800
commit7d9485e2c53caaaed9606a39de1c2746cc9ba262 (patch)
treeae7433e46e2e14d97d8ee7e4382f35b6b9a68de9 /drivers/staging/udlfb/udlfb.h
parent4574203f45eb26b3fd76a171a77dd298dc1dc1ae (diff)
Staging: udlfb: Add functions to expose sysfs metrics and controls
Add sysfs controls for edid and performance metrics There are 8 new files exposed in /sys/class/graphics/fb* edid - returns 128 byte edid blog, suitable for parsing with parse-edid metrics_bytes_identical metrics_bytes_rendered metrics_bytes_sent metrics_cpu_kcycles_used metrics_misc and metrics_reset, which resets all perf metrics to zero The 6 perf metrics are of type atomic_t. So these metrics return precise results for short benchmarks, but any test approx a minute or longer runtime may roll over. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/udlfb/udlfb.h')
-rw-r--r--drivers/staging/udlfb/udlfb.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h
index 13f992fe45f7..ef343a6052d6 100644
--- a/drivers/staging/udlfb/udlfb.h
+++ b/drivers/staging/udlfb/udlfb.h
@@ -33,8 +33,12 @@ struct dlfb_data {
char *bufend;
char *backing_buffer;
struct mutex bulk_mutex;
+ int fb_count;
+ atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */
atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */
+ atomic_t use_defio; /* 0 = rely on ioctls and blit/copy/fill rects */
char edid[128];
+ int sku_pixel_limit;
int screen_size;
int line_length;
struct completion done;
@@ -43,6 +47,17 @@ struct dlfb_data {
int base8;
int base8d;
u32 pseudo_palette[256];
+ /* blit-only rendering path metrics, exposed through sysfs */
+ atomic_t bytes_rendered; /* raw pixel-bytes driver asked to render */
+ atomic_t bytes_identical; /* saved effort with backbuffer comparison */
+ atomic_t bytes_sent; /* to usb, after compression including overhead */
+ atomic_t cpu_kcycles_used; /* transpired during pixel processing */
+ /* interface usage metrics. Clients can call driver via several */
+ atomic_t blit_count;
+ atomic_t copy_count;
+ atomic_t fill_count;
+ atomic_t damage_count;
+ atomic_t defio_fault_count;
};
#define NR_USB_REQUEST_I2C_SUB_IO 0x02
@@ -99,6 +114,9 @@ static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len)
#define dlfb_set_register insert_command
+/* remove once this gets added to sysfs.h */
+#define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store)
+
#define dl_err(format, arg...) \
dev_err(dev->gdev, "dlfb: " format, ## arg)
#define dl_warn(format, arg...) \