~ubuntu-branches/ubuntu/oneiric/xserver-xorg-video-intel/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/109_dont_reconstruct_glyph_cache_on_rotate.patch

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers, Timo Aaltonen, Christopher James Halse Rogers
  • Date: 2011-06-02 18:27:35 UTC
  • mfrom: (1.5.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110602182735-ettcix23ikesyg79
Tags: 2:2.15.0-3ubuntu1
[ Timo Aaltonen ]
* Merge from Debian unstable, remaining changes:
  - 101_copy-fb.patch
    + Plymouth integration patch
  - 120_check_privates.patch
    + Check for null privates pointer on render_dest_picture.
  - debian/xserver-xorg-video-intel.preinst.in:
  - debian/xserver-xorg-video-intel.postinst.in:
    + Remove obsolete /etc/modprobe.d/i915-kms.conf file on upgrades.  
      KMS is the kernel default.
* Dropped patches:
  102_gen6_invalidate_texture_cache.patch
  107_solid_nullptr_check.patch
  108_undo_dmg_trans_before_append.patch
  109_dont_reconstruct_glyph_cache_on_rotate.patch
  111_fix_clipped_window_plane_offset.patch
  112_fix_error_in_4c4ad555.patch
  113_remove_broken_max_base_addresses.patch
  114_warnings_cleanup_part_2.patch
  115_quell_vblank_counter_failed.patch
  117_946gz_isreally_965g.patch
  119_disable_relaxed_fencing.path
  - all upstream.
[ Christopher James Halse Rogers ]
* debian/patches/101_copy-fb.patch
  - Refresh for new upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
commit 3e28a0c0b43823d3104fe8fc50b5994b41fc0cc1
2
 
Author: Chris Wilson <chris@chris-wilson.co.uk>
3
 
Date:   Thu Jan 20 15:07:26 2011 +0000
4
 
 
5
 
    Create the UXA generational resources during screen create
6
 
    
7
 
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8
 
 
9
 
diff --git a/src/intel.h b/src/intel.h
10
 
index e7c47db..4c755fc 100644
11
 
--- a/src/intel.h
12
 
+++ b/src/intel.h
13
 
@@ -661,7 +661,7 @@ static inline Bool pixmap_is_scanout(PixmapPtr pixmap)
14
 
 const OptionInfoRec *intel_uxa_available_options(int chipid, int busid);
15
 
 
16
 
 Bool intel_uxa_init(ScreenPtr pScreen);
17
 
-void intel_uxa_create_screen_resources(ScreenPtr pScreen);
18
 
+Bool intel_uxa_create_screen_resources(ScreenPtr pScreen);
19
 
 void intel_uxa_block_handler(intel_screen_private *intel);
20
 
 Bool intel_get_aperture_space(ScrnInfoPtr scrn, drm_intel_bo ** bo_table,
21
 
                              int num_bos);
22
 
diff --git a/src/intel_driver.c b/src/intel_driver.c
23
 
index 2cd5f1f..ebed258 100644
24
 
--- a/src/intel_driver.c
25
 
+++ b/src/intel_driver.c
26
 
@@ -234,9 +234,7 @@ static Bool i830CreateScreenResources(ScreenPtr screen)
27
 
        if (!(*screen->CreateScreenResources) (screen))
28
 
                return FALSE;
29
 
 
30
 
-       intel_uxa_create_screen_resources(screen);
31
 
-
32
 
-       return TRUE;
33
 
+       return intel_uxa_create_screen_resources(screen);
34
 
 }
35
 
 
36
 
 static void PreInitCleanup(ScrnInfoPtr scrn)
37
 
@@ -1046,7 +1044,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
38
 
        I830UeventInit(scrn);
39
 
 #endif
40
 
 
41
 
-       return uxa_resources_init(screen);
42
 
+       return TRUE;
43
 
 }
44
 
 
45
 
 static void i830AdjustFrame(int scrnIndex, int x, int y, int flags)
46
 
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
47
 
index 8f58c29..9341b91 100644
48
 
--- a/src/intel_uxa.c
49
 
+++ b/src/intel_uxa.c
50
 
@@ -1089,12 +1089,15 @@ static Bool intel_uxa_destroy_pixmap(PixmapPtr pixmap)
51
 
        return TRUE;
52
 
 }
53
 
 
54
 
-void intel_uxa_create_screen_resources(ScreenPtr screen)
55
 
+Bool intel_uxa_create_screen_resources(ScreenPtr screen)
56
 
 {
57
 
        ScrnInfoPtr scrn = xf86Screens[screen->myNum];
58
 
        intel_screen_private *intel = intel_get_screen_private(scrn);
59
 
        dri_bo *bo = intel->front_buffer;
60
 
 
61
 
+       if (!uxa_resources_init(screen))
62
 
+               return FALSE;
63
 
+
64
 
        drm_intel_gem_bo_map_gtt(bo);
65
 
 
66
 
        if (intel->use_shadow) {
67
 
@@ -1111,6 +1114,8 @@ void intel_uxa_create_screen_resources(ScreenPtr screen)
68
 
                                           NULL);
69
 
                scrn->displayWidth = intel->front_pitch / intel->cpp;
70
 
        }
71
 
+
72
 
+       return TRUE;
73
 
 }
74
 
 
75
 
 static void
76
 
 
77
 
From c6dc27562abbc8ca9e873ad502ca49ae010461d2 Mon Sep 17 00:00:00 2001
78
 
From: Chris Wilson <chris@chris-wilson.co.uk>
79
 
Date: Mon, 24 Jan 2011 20:25:27 +0000
80
 
Subject: uxa: Only recreate the glyph cache on *generational* updates
81
 
 
82
 
The screen resources are recreated when the screen is rotated as well,
83
 
without being finalized. In this case, we do not need to reconstuct the
84
 
cache (or if we did, we would need to tear it down first).
85
 
 
86
 
Reported-by: Till Matthiesen <entropy@everymail.net>
87
 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33412
88
 
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
89
 
---
90
 
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
91
 
index 420e891..0f5ddda 100644
92
 
--- a/uxa/uxa-glyphs.c
93
 
+++ b/uxa/uxa-glyphs.c
94
 
@@ -111,6 +111,9 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
95
 
        uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
96
 
        int i;
97
 
 
98
 
+       if (!uxa_screen->glyph_cache_initialized)
99
 
+               return;
100
 
+
101
 
        for (i = 0; i < UXA_NUM_GLYPH_CACHE_FORMATS; i++) {
102
 
                uxa_glyph_cache_t *cache = &uxa_screen->glyphCaches[i];
103
 
 
104
 
@@ -120,6 +123,7 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
105
 
                if (cache->glyphs)
106
 
                        free(cache->glyphs);
107
 
        }
108
 
+       uxa_screen->glyph_cache_initialized = FALSE;
109
 
 }
110
 
 
111
 
 void uxa_glyphs_fini(ScreenPtr pScreen)
112
 
@@ -145,6 +149,10 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
113
 
        };
114
 
        int i;
115
 
 
116
 
+       if (uxa_screen->glyph_cache_initialized)
117
 
+               return TRUE;
118
 
+
119
 
+       uxa_screen->glyph_cache_initialized = TRUE;
120
 
        memset(uxa_screen->glyphCaches, 0, sizeof(uxa_screen->glyphCaches));
121
 
 
122
 
        for (i = 0; i < sizeof(formats)/sizeof(formats[0]); i++) {
123
 
@@ -214,17 +222,7 @@ Bool uxa_glyphs_init(ScreenPtr pScreen)
124
 
        if (uxa_get_screen(pScreen)->force_fallback)
125
 
                return TRUE;
126
 
 
127
 
-       /* We are trying to initialise per screen resources prior to the
128
 
-        * complete initialisation of the screen. So ensure the components
129
 
-        * that we depend upon are initialsed prior to our use.
130
 
-        */
131
 
-       if (!CreateScratchPixmapsForScreen(pScreen->myNum))
132
 
-               return FALSE;
133
 
-
134
 
-       if (!uxa_realize_glyph_caches(pScreen))
135
 
-               return FALSE;
136
 
-
137
 
-       return TRUE;
138
 
+       return uxa_realize_glyph_caches(pScreen);
139
 
 }
140
 
 
141
 
 /* The most efficient thing to way to upload the glyph to the screen
142
 
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
143
 
index 92536cc..ac206af 100644
144
 
--- a/uxa/uxa-priv.h
145
 
+++ b/uxa/uxa-priv.h
146
 
@@ -139,6 +139,7 @@ typedef struct {
147
 
        unsigned offScreenCounter;
148
 
 
149
 
        uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHE_FORMATS];
150
 
+       Bool glyph_cache_initialized;
151
 
 
152
 
        PicturePtr solid_clear, solid_black, solid_white;
153
 
        uxa_solid_cache_t solid_cache[UXA_NUM_SOLID_CACHE];
154
 
--
155
 
cgit v0.8.3-6-g21f6