21 #define DSS_SUBSYS_NAME "OVERLAY"
23 #include <linux/module.h>
53 if (buf[size-1] ==
'\n')
67 if (len > 0 && mgr ==
NULL)
90 r = old_mgr->
apply(old_mgr);
98 DSSERR(
"Failed to attach overlay\n");
146 const char *buf,
size_t size)
156 if (last - buf >= size)
185 const char *buf,
size_t size)
195 if (last - buf >= size)
250 const char *buf,
size_t size)
288 info.pre_mult_alpha);
292 const char *buf,
size_t size)
332 const char *buf,
size_t size)
368 #define OVERLAY_ATTR(_name, _mode, _show, _store) \
369 struct overlay_attribute overlay_attr_##_name = \
370 __ATTR(_name, _mode, _show, _store)
374 overlay_manager_show, overlay_manager_store);
378 overlay_position_show, overlay_position_store);
380 overlay_output_size_show, overlay_output_size_store);
382 overlay_enabled_show, overlay_enabled_store);
384 overlay_global_alpha_show, overlay_global_alpha_store);
386 overlay_pre_mult_alpha_show,
387 overlay_pre_mult_alpha_store);
389 overlay_zorder_show, overlay_zorder_store);
391 static struct attribute *overlay_sysfs_attrs[] = {
392 &overlay_attr_name.attr,
393 &overlay_attr_manager.attr,
394 &overlay_attr_input_size.attr,
395 &overlay_attr_screen_width.attr,
396 &overlay_attr_position.attr,
397 &overlay_attr_output_size.attr,
398 &overlay_attr_enabled.attr,
399 &overlay_attr_global_alpha.attr,
400 &overlay_attr_pre_mult_alpha.attr,
401 &overlay_attr_zorder.attr,
414 if (!overlay_attr->
show)
417 return overlay_attr->
show(overlay, buf);
421 const char *buf,
size_t size)
429 if (!overlay_attr->
store)
432 return overlay_attr->
store(overlay, buf, size);
435 static const struct sysfs_ops overlay_sysfs_ops = {
436 .show = overlay_attr_show,
437 .store = overlay_attr_store,
440 static struct kobj_type overlay_ktype = {
441 .sysfs_ops = &overlay_sysfs_ops,
442 .default_attrs = overlay_sysfs_attrs,
449 &pdev->
dev.kobj,
"overlay%d", ovl->
id);