Rev 3037 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3037 | Rev 3263 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | #include |
41 | #include |
42 | #include "intel_drv.h" |
42 | #include "intel_drv.h" |
43 | #include |
43 | #include |
44 | #include "i915_drv.h" |
44 | #include "i915_drv.h" |
Line -... | Line 45... | ||
- | 45 | ||
- | 46 | static struct drm_i915_gem_object *fb_obj; |
|
- | 47 | ||
- | 48 | struct drm_i915_gem_object *get_fb_obj() |
|
- | 49 | { |
|
- | 50 | return fb_obj; |
|
Line 45... | Line 51... | ||
45 | 51 | }; |
|
46 | 52 | ||
47 | struct fb_info *framebuffer_alloc(size_t size, struct device *dev) |
53 | struct fb_info *framebuffer_alloc(size_t size, struct device *dev) |
48 | { |
54 | { |
Line 142... | Line 148... | ||
142 | lfb_vm_node.mm = NULL; |
148 | lfb_vm_node.mm = NULL; |
Line 143... | Line 149... | ||
143 | 149 | ||
144 | obj->gtt_space = &lfb_vm_node; |
150 | obj->gtt_space = &lfb_vm_node; |
145 | obj->gtt_offset = 0; |
151 | obj->gtt_offset = 0; |
- | 152 | obj->pin_count = 2; |
|
- | 153 | obj->cache_level = I915_CACHE_NONE; |
|
- | 154 | obj->base.write_domain = 0; |
|
- | 155 | obj->base.read_domains = I915_GEM_DOMAIN_GTT; |
|
146 | obj->pin_count = 2; |
156 | |
147 | } |
157 | } |
Line 148... | Line 158... | ||
148 | /***********************************************************************/ |
158 | /***********************************************************************/ |
149 | 159 | ||
Line 180... | Line 190... | ||
180 | dev_priv->mm.gtt->gtt_mappable_entries << PAGE_SHIFT; |
190 | dev_priv->mm.gtt->gtt_mappable_entries << PAGE_SHIFT; |
Line 181... | Line 191... | ||
181 | 191 | ||
182 | info->fix.smem_start = dev->mode_config.fb_base + obj->gtt_offset; |
192 | info->fix.smem_start = dev->mode_config.fb_base + obj->gtt_offset; |
Line 183... | Line 193... | ||
183 | info->fix.smem_len = size; |
193 | info->fix.smem_len = size; |
184 | 194 | ||
Line 185... | Line 195... | ||
185 | info->screen_base = 0xFE000000; |
195 | info->screen_base = (void*) 0xFE000000; |
Line 186... | Line 196... | ||
186 | info->screen_size = size; |
196 | info->screen_size = size; |
Line 198... | Line 208... | ||
198 | 208 | ||
199 | 209 | ||
Line -... | Line 210... | ||
- | 210 | mutex_unlock(&dev->struct_mutex); |
|
- | 211 | // vga_switcheroo_client_fb_set(dev->pdev, info); |
|
200 | mutex_unlock(&dev->struct_mutex); |
212 | |
Line 201... | Line 213... | ||
201 | // vga_switcheroo_client_fb_set(dev->pdev, info); |
213 | fb_obj = obj; |
202 | 214 | ||
203 | return 0; |
215 | return 0; |