25 #include <linux/device.h>
28 #include <linux/kernel.h>
30 #include <linux/omapfb.h>
70 rg = omapfb_get_mem_region(ofbi->
region);
84 omapfb_put_mem_region(rg);
103 const char *buf,
size_t count)
120 omapfb_get_mem_region(ofbi->
region);
122 memcpy(&new_var, &fbi->
var,
sizeof(new_var));
136 omapfb_put_mem_region(ofbi->
region);
160 for (ovlnum = 0; ovlnum < fbdev->
num_overlays; ++ovlnum)
165 t == 0 ?
"" :
",", ovlnum);
170 omapfb_unlock(fbdev);
181 for (i = 0; i < fbdev->
num_fbs; i++) {
194 const char *buf,
size_t count)
208 if (buf[len - 1] ==
'\n')
216 char *
p = (
char *)buf;
219 while (p < buf + len) {
233 for (i = 0; i < num_ovls; ++
i) {
234 if (ovls[i] == fbdev->
overlays[ovlnum]) {
241 ovls[num_ovls++] = fbdev->
overlays[ovlnum];
247 for (i = 0; i < num_ovls; ++
i) {
248 struct omapfb_info *ofbi2 = get_overlay_fb(fbdev, ovls[i]);
249 if (ofbi2 && ofbi2 != ofbi) {
250 dev_err(fbdev->
dev,
"overlay already in use\n");
264 for (t = 0; t < num_ovls; ++
t) {
265 if (ovl == ovls[t]) {
276 omapfb_get_mem_region(ofbi->
region);
278 omapfb_overlay_enable(ovl, 0);
283 omapfb_put_mem_region(ofbi->
region);
294 for (i = 0; i < num_ovls; ++
i) {
317 omapfb_get_mem_region(ofbi->
region);
321 omapfb_put_mem_region(ofbi->
region);
329 omapfb_unlock(fbdev);
348 t == 0 ?
"" :
",", ofbi->
rotation[t]);
363 int num_ovls = 0,
r,
i;
369 if (buf[len - 1] ==
'\n')
376 char *p = (
char *)buf;
378 while (p < buf + len) {
387 if (rot < 0 || rot > 3) {
392 if (ofbi->
rotation[num_ovls] != rot)
395 rotation[num_ovls++] =
rot;
407 for (i = 0; i < num_ovls; ++
i)
410 omapfb_get_mem_region(ofbi->
region);
414 omapfb_put_mem_region(ofbi->
region);
439 const char *buf,
size_t count)
449 r = kstrtoul(buf, 0, &size);
468 for (i = 0; i < fbdev->
num_fbs; i++) {
485 if (size != ofbi->
region->size) {
488 dev_err(dev,
"realloc fbmem failed\n");
537 const char *buf,
size_t count)
561 store_overlays_rotate),
572 DBG(
"create sysfs for fbs\n");
573 for (i = 0; i < fbdev->
num_fbs; i++) {
575 for (t = 0; t <
ARRAY_SIZE(omapfb_attrs); t++) {
594 DBG(
"remove sysfs for fbs\n");
595 for (i = 0; i < fbdev->
num_fbs; i++) {
596 for (t = 0; t <
ARRAY_SIZE(omapfb_attrs); t++)