7a6f23b349c68791735ddc882a159f27f46db751
[openembedded.git] /
1 From 9500c899f05048d17ced4340ecfd377656a23934 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
3 Date: Fri, 17 Apr 2009 18:34:33 +0200
4 Subject: [PATCH 58/69] DSS2: Don't touch plane coordinates when changing fb->ovl mapping
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 When attaching overlays to a framebuffer via the 'overlays' sysfs file
10 do not touch the planes' coordinates. Without this change attaching
11 VID2 to a framebuffer which already has VID1 attached would cause VID1
12 to be reset to position 0,0 and scaled to 1:1 size. Also call
13 omapfb_apply_changes() only once after all the overlays have been
14 attached to avoid fiddling with all the overlays several times.
15
16 Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
17 ---
18  drivers/video/omap2/omapfb/omapfb-sysfs.c |   13 ++++++-------
19  1 files changed, 6 insertions(+), 7 deletions(-)
20
21 diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
22 index 13028ae..702199d 100644
23 --- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
24 +++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
25 @@ -183,6 +183,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
26         struct omap_overlay *ovl;
27         int num_ovls, r, i;
28         int len;
29 +       bool added = false;
30  
31         num_ovls = 0;
32  
33 @@ -284,15 +285,13 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
34  
35                 ofbi->overlays[ofbi->num_overlays++] = ovl;
36  
37 -               r = omapfb_apply_changes(fbi, 1);
38 +               added = true;
39 +       }
40 +
41 +       if (added) {
42 +               r = omapfb_apply_changes(fbi, 0);
43                 if (r)
44                         goto out;
45 -
46 -               if (ovl->manager) {
47 -                       r = ovl->manager->apply(ovl->manager);
48 -                       if (r)
49 -                               goto out;
50 -               }
51         }
52  
53         r = count;
54 -- 
55 1.6.2.4
56