dlfb_handle_damage(dev, area->dx, area->dy,
area->width, area->height, info->screen_base);
#endif
- atomic_inc(&dev->copy_count);
}
#endif
- atomic_inc(&dev->blit_count);
}
static void dlfb_ops_fillrect(struct fb_info *info,
rect->height, info->screen_base);
#endif
- atomic_inc(&dev->fill_count);
-
}
static void dlfb_get_edid(struct dlfb_data *dev)
dlfb_handle_damage(dev, area->x, area->y, area->w, area->h,
info->screen_base);
- atomic_inc(&dev->damage_count);
}
return 0;
atomic_read(&dev->cpu_kcycles_used));
}
-static ssize_t metrics_misc_show(struct device *fbdev,
- struct device_attribute *a, char *buf) {
- struct fb_info *fb_info = dev_get_drvdata(fbdev);
- struct dlfb_data *dev = fb_info->par;
- return snprintf(buf, PAGE_SIZE,
- "Calls to\ndamage: %u\nblit: %u\n"
- "defio faults: %u\ncopy: %u\n"
- "fill: %u\n\n"
- "active framebuffer clients: %d\n"
- "urbs available %d(%d)\n"
- "Shadow framebuffer in use? %s\n"
- "Any lost pixels? %s\n",
- atomic_read(&dev->damage_count),
- atomic_read(&dev->blit_count),
- atomic_read(&dev->defio_fault_count),
- atomic_read(&dev->copy_count),
- atomic_read(&dev->fill_count),
- dev->fb_count,
- dev->urbs.available, dev->urbs.limit_sem.count,
- (dev->backing_buffer) ? "yes" : "no",
- atomic_read(&dev->lost_pixels) ? "yes" : "no");
-}
-
static ssize_t edid_show(struct file *filp, struct kobject *kobj,
struct bin_attribute *a,
char *buf, loff_t off, size_t count) {
atomic_set(&dev->bytes_identical, 0);
atomic_set(&dev->bytes_sent, 0);
atomic_set(&dev->cpu_kcycles_used, 0);
- atomic_set(&dev->blit_count, 0);
- atomic_set(&dev->copy_count, 0);
- atomic_set(&dev->fill_count, 0);
- atomic_set(&dev->defio_fault_count, 0);
- atomic_set(&dev->damage_count, 0);
return count;
}
__ATTR_RO(metrics_bytes_identical),
__ATTR_RO(metrics_bytes_sent),
__ATTR_RO(metrics_cpu_kcycles_used),
- __ATTR_RO(metrics_misc),
__ATTR(metrics_reset, S_IWUGO, NULL, metrics_reset_store),
__ATTR_RW(use_defio),
};
int bytes_sent = 0;
int bytes_identical = 0;
int bytes_rendered = 0;
- int fault_count = 0;
if (!atomic_read(&dev->use_defio))
return;
&cmd, cur->index << PAGE_SHIFT,
PAGE_SIZE, &bytes_identical, &bytes_sent);
bytes_rendered += PAGE_SIZE;
- fault_count++;
}
if (cmd > (char *) urb->transfer_buffer) {
} else
dlfb_urb_completion(urb);
- atomic_add(fault_count, &dev->defio_fault_count);
atomic_add(bytes_sent, &dev->bytes_sent);
atomic_add(bytes_identical, &dev->bytes_identical);
atomic_add(bytes_rendered, &dev->bytes_rendered);