Rev 2351 | Rev 2360 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2351 | Rev 2352 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | #include "i915_drv.h" |
4 | #include "i915_drv.h" |
5 | #include "intel_drv.h" |
5 | #include "intel_drv.h" |
6 | #include "bitmap.h" |
6 | #include "bitmap.h" |
7 | 7 | ||
Line -... | Line 8... | ||
- | 8 | #define memmove __builtin_memmove |
|
- | 9 | ||
- | 10 | int gem_object_lock(struct drm_i915_gem_object *obj); |
|
- | 11 | ||
8 | #define DRIVER_CAPS_0 HW_BIT_BLIT | HW_TEX_BLIT; |
12 | #define DRIVER_CAPS_0 HW_BIT_BLIT | HW_TEX_BLIT; |
9 | #define DRIVER_CAPS_1 0 |
13 | #define DRIVER_CAPS_1 0 |
Line 10... | Line 14... | ||
10 | 14 | ||
Line 172... | Line 176... | ||
172 | 176 | ||
Line 173... | Line 177... | ||
173 | }; |
177 | }; |
Line -... | Line 178... | ||
- | 178 | ||
- | 179 | ||
- | 180 | int lock_surface(struct io_call_12 *pbitmap) |
|
- | 181 | { |
|
- | 182 | int ret; |
|
- | 183 | ||
- | 184 | drm_i915_private_t *dev_priv = main_device->dev_private; |
|
- | 185 | ||
- | 186 | bitmap_t *bitmap; |
|
- | 187 | ||
- | 188 | if(unlikely(pbitmap->handle == 0)) |
|
- | 189 | return -1; |
|
- | 190 | ||
- | 191 | bitmap = (bitmap_t*)hman_get_data(&bm_man, pbitmap->handle); |
|
- | 192 | ||
- | 193 | if(unlikely(bitmap==NULL)) |
|
- | 194 | return -1; |
|
- | 195 | ||
- | 196 | ret = gem_object_lock(bitmap->obj); |
|
- | 197 | if(ret !=0 ) |
|
- | 198 | { |
|
- | 199 | pbitmap->data = NULL; |
|
- | 200 | pbitmap->pitch = 0; |
|
- | 201 | ||
- | 202 | dbgprintf("%s fail\n", __FUNCTION__); |
|
- | 203 | return ret; |
|
- | 204 | }; |
|
- | 205 | ||
Line -... | Line 206... | ||
- | 206 | pbitmap->data = bitmap->uaddr; |
|
- | 207 | pbitmap->pitch = bitmap->pitch; |
|
Line 174... | Line 208... | ||
174 | 208 | ||
175 | 209 | return 0; |
|
176 | 210 | }; |