FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-14-2009, 08:46 AM
Lo=EFc Minier
 
Default UBUNTU: LPIA: Poulsbo driver 2.3.0.32L.0029 update

Bug: #316780

Signed-off-by: Lo=EFc Minier <lool@dooz.org>
---
ubuntu/media/drm-poulsbo/Makefile | 2 +-
ubuntu/media/drm-poulsbo/Module.symvers | 340 ++++++++++----------
ubuntu/media/drm-poulsbo/drmP.h | 8 +
ubuntu/media/drm-poulsbo/drm_compat.c | 5 +
ubuntu/media/drm-poulsbo/drm_compat.h | 26 ++-
ubuntu/media/drm-poulsbo/drm_ttm.c | 6 +
ubuntu/media/drm-poulsbo/drm_vm.c | 387 ++++++++++++++++++-=
----
ubuntu/media/drm-poulsbo/drm_vm_nopage_compat.c | 279 ++++++++++++++++
ubuntu/media/drm-poulsbo/psb_drm.h | 2 +-
ubuntu/media/drm-poulsbo/psb_drv.c | 8 +
ubuntu/media/drm-poulsbo/psb_drv.h | 5 +-
ubuntu/media/drm-poulsbo/psb_fb.c | 22 ++-
ubuntu/media/drm-poulsbo/psb_gtt.c | 1 +
ubuntu/media/drm-poulsbo/psb_msvdx.c | 9 +-
ubuntu/media/drm-poulsbo/psb_schedule.c | 3 +-
15 files changed, 835 insertions(+), 268 deletions(-)
create mode 100644 ubuntu/media/drm-poulsbo/drm_vm_nopage_compat.c

diff --git a/ubuntu/media/drm-poulsbo/Makefile b/ubuntu/media/drm-poulsbo/M=
akefile
index 2550e51..075352e 100644
--- a/ubuntu/media/drm-poulsbo/Makefile
+++ b/ubuntu/media/drm-poulsbo/Makefile
@@ -8,7 +8,7 @@ drm-objs :=3D drm_auth.o drm_bufs.o drm_context.o drm_dma.o=
drm_drawable.o
drm_memory_debug.o ati_pcigart.o drm_sman.o
drm_hashtab.o drm_mm.o drm_object.o drm_compat.o
drm_fence.o drm_ttm.o drm_bo.o drm_bo_move.o drm_bo_lock.o
- drm_crtc.o drm_edid.o drm_modes.o drm_regman.o
+ drm_crtc.o drm_edid.o drm_modes.o drm_regman.o drm_vm_nopage_compat.o
=

psb-objs :=3D psb_drv.o psb_mmu.o psb_sgx.o psb_irq.o psb_fence.o psb_buff=
er.o
psb_gtt.o psb_setup.o psb_i2c.o psb_fb.o psb_msvdx.o
diff --git a/ubuntu/media/drm-poulsbo/Module.symvers b/ubuntu/media/drm-pou=
lsbo/Module.symvers
index e28928d..a69c52a 100644
--- a/ubuntu/media/drm-poulsbo/Module.symvers
+++ b/ubuntu/media/drm-poulsbo/Module.symvers
@@ -1,171 +1,169 @@
-0x374b6080 drm_agp_enable /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x9681710c drm_fence_buffer_objects /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0xcbd39421 drm_mm_takedown /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x949ed565 drm_bo_mem_space /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x4523014f drm_bo_same_page /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xdd6c0e4b drm_unlocked_ioctl /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x074519c2 drm_core_get_reg_ofs /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc968c39f drm_bind_ttm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x4a9656f3 drm_output_create /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x949332d8 drm_agp_unbind /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x89dee44a drm_bo_wait /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc572eb3a drm_pci_free /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x8887452c drm_idlelock_release /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x8c71d2fd drm_mode_detachmode_crtc /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0x9147871a drm_fence_reference_unlocked /usr/src/Build14/psb-kmd/drm EXPOR=
T_SYMBOL
-0xc0269560 drm_get_acpi_edid /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xa2eda2af drm_agp_bind /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7b84cfc9 drm_ddc_read /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0074a214 psbfb_remove /usr/src/Build14/psb-kmd/psb EXPORT_SYMBOL
-0xd9f99279 drm_idlelock_take /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xecb88906 drm_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x23d096b9 drm_mode_config_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xabb2fda9 drm_lookup_buffer_object /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0x5d08cf26 drm_remove_ref_object /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x65845ec2 drm_mode_config_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_SYM=
BOL
-0xbcc1d2e9 drm_fence_add_user_object /usr/src/Build14/psb-kmd/drm EXPORT_S=
YMBOL
-0x7991ca39 drm_vbl_send_signals /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x77bc9429 drm_init_mode /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc79167bd drm_irq_uninstall /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x602b5d78 drm_exit /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xcc2bf129 drm_mode_equal /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x561e1d24 drm_framebuffer_create /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0xbd47cc5e drm_core_ioremapfree /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL=
_GPL
-0x4b8082b9 drm_mm_put_block /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x9400f72f drm_get_dev /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x958b9ad2 drm_mode_remove /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x2e506b91 drm_ioctl /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x3d8b36f9 drm_mode_duplicate /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x6fc257c8 drm_mem_reg_ioremap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd24c386d idr_for_each /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x9d6775c2 drm_output_destroy /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xf1bf4e37 drm_agp_init_ttm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd3028e75 drm_sman_set_manager /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x95dfd0b5 drm_initial_config /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xfdfbad19 drm_sman_alloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x967e7712 drm_get_resource_start /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0x21451ac4 drm_sman_owner_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0x80c50ec3 drm_irq_install /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x23b4f5e3 drm_bo_read_unlock /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x80391d54 drm_fence_usage_deref_unlocked /usr/src/Build14/psb-kmd/drm EXP=
ORT_SYMBOL
-0xa2e328d5 drm_crtc_create /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd6448db6 drm_crtc_destroy /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x2c7cc63e drm_regs_add /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xaa04a2a0 drm_init_pat /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb8ac2985 drm_bo_vm_nopfn /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc4b88d39 drm_rmmap_locked /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x8aa3f9f4 drm_mode_validate_clocks /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0x0351e8d3 drm_add_user_object /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb522f97d drm_pick_crtcs /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe7cfbc7e drm_get_edid /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xef8a9172 drm_mode_attachmode_crtc /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0x2916bf63 drm_sman_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x049158c9 drm_fasync /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd34cb865 drm_bo_driver_finish /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb3a6456b drm_psb_debug /usr/src/Build14/psb-kmd/psb EXPORT_SYMBOL
-0x38a40c4f drm_crtc_in_use /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xa66b7943 drm_bo_kmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0836695c drm_sman_takedown /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x60a03838 drm_poll /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd7089f8a drm_regs_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7a93ffe3 drm_bo_move_accel_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_S=
YMBOL
-0x8ea685d3 drm_i_have_hw_lock /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x04642110 drm_mmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x387a4852 drm_bo_move_memcpy /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7b57f79a drm_agp_alloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc6102f55 drm_bo_usage_deref_unlocked /usr/src/Build14/psb-kmd/drm EXPORT=
_SYMBOL
-0x2eb2f903 drm_sman_free_key /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x68d3ccdf drm_sg_alloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x8ddceca3 drm_fence_object_emit /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xf7225dc3 drm_fence_object_wait /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc2390644 ati_pcigart_init_ttm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x20645642 drm_debug /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xc2d97d54 drm_find_matching_map /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe53dad64 drm_ati_pcigart_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xce080d24 drm_property_add_enum /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xba576ed3 drm_mode_width /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x5a1c23b1 drm_ati_pcigart_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_SYM=
BOL
-0x30ee067b drm_fence_usage_deref_locked /usr/src/Build14/psb-kmd/drm EXPOR=
T_SYMBOL
-0x4cf71cd2 idr_remove_all /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x1522ff1c drm_bo_clean_mm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x862230c6 drm_addbufs_fb /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x2ebeb6b2 drm_property_destroy /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xeb4ee560 drm_fence_object_signaled /usr/src/Build14/psb-kmd/drm EXPORT_S=
YMBOL
-0xa4ca8131 drm_property_create /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xdc661a69 drm_getsarea /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x15a1203b drm_addbufs_pci /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x93449b9b drm_addbufs_agp /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x6a337ba3 drm_calloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x23dc7de1 drm_core_get_map_ofs /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe6f2c757 drm_regs_fence /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xdaa7653a drm_bo_move_ttm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe22df699 drm_buffer_object_create /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0xdd8fe54b drm_free_memctl /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x3074f033 drm_order /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x6307ddaa drm_bo_usage_deref_locked /usr/src/Build14/psb-kmd/drm EXPORT_S=
YMBOL
-0x8c792097 drm_bo_kunmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xea10965a drm_regs_free /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb28ee9a8 drm_core_ioremap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL_GPL
-0x71f4da33 drm_fence_wait_polling /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0xa1ccb3ce drm_mode_rmmode /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe919dd5c drm_sman_owner_clean /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x305dfe25 drm_bo_do_validate /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xbf1041c6 drm_get_resource_len /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xdd7a3f4b drm_lookup_ref_object /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x5070a0ab drm_bo_read_lock /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xdf072f63 drm_crtc_probe_output_modes /usr/src/Build14/psb-kmd/drm EXPORT=
_SYMBOL
-0xdee943f9 drm_release /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x9207ec5f drm_mode_validate_size /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0x8873dc30 drm_mm_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x4bec7c9e drm_fence_fill_arg /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd960ae18 drm_disable_unused_functions /usr/src/Build14/psb-kmd/drm EXPOR=
T_SYMBOL
-0x99e1ddda drm_cleanup_pci /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7589bb4a drm_putback_buffer_objects /usr/src/Build14/psb-kmd/drm EXPORT_=
SYMBOL
-0x96987c63 drm_framebuffer_destroy /usr/src/Build14/psb-kmd/drm EXPORT_SYM=
BOL
-0xfb53c4cd drm_addmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0004d31e drm_mode_create /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb2e20675 drm_mode_destroy /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb879fb62 drm_bo_offset_end /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x06356c41 drm_add_edid_modes /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x55f060ee drm_sman_set_range /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x20af51d4 drm_rmmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd578de06 drm_get_drawable_info /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xf167f778 drm_agp_free /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x282b1899 drm_agp_bind_memory /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x609b8898 drm_bo_driver_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x05c116ce psbfb_probe /usr/src/Build14/psb-kmd/psb EXPORT_SYMBOL
-0xfc6e54b8 drm_lookup_user_object /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0xff8ec813 drm_regs_alloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x91e1396e drm_mode_probed_add /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd4216dce drm_mode_height /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x81e0a82e drm_agp_release /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0829b22a drm_fence_object_create /usr/src/Build14/psb-kmd/drm EXPORT_SYM=
BOL
-0x196c0211 drm_mem_reg_iounmap /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x09838841 drm_pci_alloc /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x930ea23c drm_fence_handler /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xb99820c9 drm_bo_init_mm /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xfcabad2c drm_bo_handle_validate /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0x2399d607 drm_bo_fill_rep_arg /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7f297356 drm_open /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0da88f6a drm_sg_cleanup /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x27d8d38c drm_output_rename /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x59a23695 drm_mode_set_name /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xd38e6e8f drm_locked_tasklet /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x23336410 drm_fence_object_flush /usr/src/Build14/psb-kmd/drm EXPORT_SYMB=
OL
-0x6884872f drm_mode_debug_printmodeline /usr/src/Build14/psb-kmd/drm EXPOR=
T_SYMBOL
-0x0c7e9508 drm_init_yres /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x311ebcb8 drm_init_xres /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xf1395144 drm_agp_acquire /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xe154a9e9 drm_core_reclaim_buffers /usr/src/Build14/psb-kmd/drm EXPORT_SY=
MBOL
-0xf6bd2837 drm_query_memctl /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x846da362 drm_fence_flush_old /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x5ce87594 drm_agp_info /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x61fc5864 drm_mode_set_crtcinfo /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x282fad09 drm_mode_vrefresh /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x03f29474 drm_mem_reg_is_pci /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x7861a0cb drm_crtc_set_mode /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x6d8171ce drm_mode_addmode /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x0aec7e20 drm_output_attach_property /usr/src/Build14/psb-kmd/drm EXPORT_=
SYMBOL
-0x945e2f21 drm_ttm_cache_flush /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0xaf29788e drm_sman_init /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
-0x1597222b drm_ttm_get_page /usr/src/Build14/psb-kmd/drm EXPORT_SYMBOL
+0x41bfddeb drm_agp_enable /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa7130ef9 drm_fence_buffer_objects /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xcbd39421 drm_mm_takedown /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x86c71e3e drm_bo_mem_space /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4523014f drm_bo_same_page /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x79815eb6 drm_bind_ttm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x114ad870 drm_unlocked_ioctl /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x175a8f25 drm_core_get_reg_ofs /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc8a297e1 drm_output_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaa627561 drm_agp_unbind /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6ff1ad66 drm_bo_wait /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x5be9c285 drm_pci_free /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe67aa926 drm_idlelock_release /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8d521d45 drm_mode_detachmode_crtc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc0269560 drm_get_acpi_edid /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xbfeb6176 drm_fence_reference_unlocked /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x788dff7a drm_agp_bind /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8d8c64ef drm_ddc_read /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0beaae52 psbfb_remove /home/toe/psb-kmd/psb EXPORT_SYMBOL
+0x74a97fad drm_idlelock_take /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4137b22f drm_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc3ebc294 drm_mode_config_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2eda3945 drm_lookup_buffer_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8a5ad3cd drm_remove_ref_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x154e2150 drm_mode_config_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x7aba7bf2 drm_fence_add_user_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x46a51a64 drm_vbl_send_signals /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x77bc9429 drm_init_mode /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe2170a8f drm_irq_uninstall /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x38fc6bb8 drm_exit /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xcc2bf129 drm_mode_equal /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x31ee7d7a drm_framebuffer_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0c5fdc46 drm_core_ioremapfree /home/toe/psb-kmd/drm EXPORT_SYMBOL_GPL
+0x4b8082b9 drm_mm_put_block /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xad41c8c9 drm_get_dev /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x265b1031 drm_mode_remove /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x727f3221 drm_ioctl /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xad417d41 drm_mode_duplicate /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x377fa39f drm_mem_reg_ioremap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x527e4001 drm_output_destroy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd7fffa10 drm_initial_config /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6e896d37 drm_agp_init_ttm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd3028e75 drm_sman_set_manager /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xfdfbad19 drm_sman_alloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb1d084a0 drm_get_resource_start /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x21451ac4 drm_sman_owner_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x9e1a02ac drm_irq_install /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd3aec72f drm_bo_read_unlock /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0fe271f0 drm_fence_usage_deref_unlocked /home/toe/psb-kmd/drm EXPORT_SYM=
BOL
+0x7997ef71 drm_crtc_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0019d590 drm_crtc_destroy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x113bf91b drm_regs_add /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaa04a2a0 drm_init_pat /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe9b13da2 drm_bo_vm_nopfn /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xfdac9ebb drm_mode_validate_clocks /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x19d44109 drm_rmmap_locked /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb581016c drm_add_user_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xf8a4b8b9 drm_pick_crtcs /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x127829bf drm_get_edid /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb721360d drm_mode_attachmode_crtc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2916bf63 drm_sman_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaccaa737 drm_fasync /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x39bf1080 drm_bo_driver_finish /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb3a6456b drm_psb_debug /home/toe/psb-kmd/psb EXPORT_SYMBOL
+0x3e6ee1ef drm_crtc_in_use /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x3b0d10ef drm_bo_kmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0836695c drm_sman_takedown /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb8e20e0e drm_poll /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x5e183339 drm_regs_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x008aa24e drm_bo_move_accel_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaadec8e8 drm_i_have_hw_lock /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb118d538 drm_mmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6e8e143b drm_bo_move_memcpy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x746b0735 drm_agp_alloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaa487532 drm_bo_usage_deref_unlocked /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2eb2f903 drm_sman_free_key /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa53980ee drm_sg_alloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xbcab2fa5 drm_fence_object_wait /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xcadd26cc drm_fence_object_emit /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xf977e811 ati_pcigart_init_ttm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x20645642 drm_debug /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xca37012d drm_find_matching_map /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x57b911e1 drm_ati_pcigart_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xce080d24 drm_property_add_enum /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xba576ed3 drm_mode_width /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe61d07f4 drm_fence_usage_deref_locked /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0d8a9570 drm_ati_pcigart_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd843b853 drm_bo_clean_mm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x80808cfe drm_addbufs_fb /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2151b130 drm_property_destroy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xea77c55b drm_fence_object_signaled /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4601bd00 drm_property_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x1b0388f8 drm_getsarea /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc51b8b3f drm_addbufs_pci /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2da49754 drm_addbufs_agp /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6a337ba3 drm_calloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x23dc7de1 drm_core_get_map_ofs /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe62aab88 drm_regs_fence /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6abc30d4 drm_bo_move_ttm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa41e733a drm_buffer_object_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xdd8fe54b drm_free_memctl /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x3074f033 drm_order /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa56b3da2 drm_regs_free /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x18a76b3d drm_bo_kunmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x5c8dd78b drm_bo_usage_deref_locked /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe126dc7f drm_core_ioremap /home/toe/psb-kmd/drm EXPORT_SYMBOL_GPL
+0xba02523d drm_fence_wait_polling /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8800292c drm_mode_rmmode /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe919dd5c drm_sman_owner_clean /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8fe9d391 drm_bo_do_validate /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8003444a drm_get_resource_len /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xad23ec17 drm_lookup_ref_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4791a9fe drm_bo_read_lock /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd7dfc576 drm_crtc_probe_output_modes /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x759bc49a drm_release /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x7117d258 drm_mode_validate_size /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8873dc30 drm_mm_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x77fc9572 drm_fence_fill_arg /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x90c609cd drm_disable_unused_functions /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6ef5cef8 drm_cleanup_pci /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xee4d3b12 drm_putback_buffer_objects /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x3ab1508e drm_framebuffer_destroy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x6d0ddb46 drm_addmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2f5df68d drm_mode_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x69d92887 drm_mode_destroy /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb879fb62 drm_bo_offset_end /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4acca023 drm_add_edid_modes /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x55f060ee drm_sman_set_range /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x2afec532 drm_rmmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa00148c8 drm_get_drawable_info /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x37e175d1 drm_agp_free /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x282b1899 drm_agp_bind_memory /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x1a67b7cb drm_bo_driver_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x8ea7ea2e psbfb_probe /home/toe/psb-kmd/psb EXPORT_SYMBOL
+0xacfec19b drm_regs_alloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x057c7703 drm_lookup_user_object /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xbc487b6f drm_mode_probed_add /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xd4216dce drm_mode_height /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc6df1250 drm_agp_release /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc6349b08 drm_fence_object_create /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4059bd6a drm_mem_reg_iounmap /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x955a8e91 drm_pci_alloc /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xa2500344 drm_fence_handler /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xabb70657 drm_bo_handle_validate /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x5de1e038 drm_bo_init_mm /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x7b30b68f drm_bo_fill_rep_arg /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x57c2a89e drm_open /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x10bdf987 drm_sg_cleanup /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc33732a5 drm_output_rename /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x59a23695 drm_mode_set_name /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x72067dc1 drm_locked_tasklet /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaefe2bca drm_fence_object_flush /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x46d51893 drm_mode_debug_printmodeline /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x311ebcb8 drm_init_xres /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x0c7e9508 drm_init_yres /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xe297cf82 drm_agp_acquire /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x58dde7ee drm_core_reclaim_buffers /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xf6bd2837 drm_query_memctl /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x300a064d drm_fence_flush_old /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb55721f1 drm_agp_info /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x282fad09 drm_mode_vrefresh /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x61fc5864 drm_mode_set_crtcinfo /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xc6a75842 drm_mem_reg_is_pci /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x4657f2fc drm_crtc_set_mode /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x44338411 drm_mode_addmode /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xb105fd90 drm_output_attach_property /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x945e2f21 drm_ttm_cache_flush /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0xaf29788e drm_sman_init /home/toe/psb-kmd/drm EXPORT_SYMBOL
+0x62e05388 drm_ttm_get_page /home/toe/psb-kmd/drm EXPORT_SYMBOL
diff --git a/ubuntu/media/drm-poulsbo/drmP.h b/ubuntu/media/drm-poulsbo/drm=
P.h
index abbc975..2449fe0 100644
--- a/ubuntu/media/drm-poulsbo/drmP.h
+++ b/ubuntu/media/drm-poulsbo/drmP.h
@@ -82,6 +82,14 @@
#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) &=
& defined(MODULE)))
#define __OS_HAS_MTRR (defined(CONFIG_MTRR))
=

+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 1
+#endif
+
#include "drm_os_linux.h"
#include "drm_hashtab.h"
#include "drm_internal.h"
diff --git a/ubuntu/media/drm-poulsbo/drm_compat.c b/ubuntu/media/drm-pouls=
bo/drm_compat.c
index de9257e..9022923 100644
--- a/ubuntu/media/drm-poulsbo/drm_compat.c
+++ b/ubuntu/media/drm-poulsbo/drm_compat.c
@@ -592,7 +592,12 @@ void drm_init_pat(void)
if (!boot_cpu_has(X86_FEATURE_PAT)) {
return;
}
+
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+ if (on_each_cpu(drm_pat_ipi_handler,NULL,1) !=3D 0) {
+ #else =

if (on_each_cpu(drm_pat_ipi_handler, NULL, 1, 1) !=3D 0) {
+ #endif
DRM_ERROR("Timed out setting up CPU PAT.
");
return;
} =

diff --git a/ubuntu/media/drm-poulsbo/drm_compat.h b/ubuntu/media/drm-pouls=
bo/drm_compat.h
index f7eb1e4..4895635 100644
--- a/ubuntu/media/drm-poulsbo/drm_compat.h
+++ b/ubuntu/media/drm-poulsbo/drm_compat.h
@@ -337,16 +337,17 @@ extern int drm_bo_map_bound(struct vm_area_struct *vm=
a);
#ifndef _PAGE_PAT
#define _PAGE_PAT 0x080 /* Note that this is the same value as _PAGE_PROT=
NONE */
=

+#endif
=

extern void drm_init_pat(void);
extern int drm_use_pat(void);
=

#endif
=

-#endif
-
/* fixme when functions are upstreamed - upstreamed for 2.6.23 */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
+//#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23))
+#if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) &&
+ (LINUX_VERSION_CODE !=3D KERNEL_VERSION(2,6,21)))
#define DRM_IDR_COMPAT_FN
#endif
#ifdef DRM_IDR_COMPAT_FN
@@ -360,4 +361,23 @@ void idr_remove_all(struct idr *idp);
void *idr_replace(struct idr *idp, void *ptr, int id);
#endif
=

+#ifndef VM_CAN_NONLINEAR
+#define DRM_VM_NOPAGE 1
+#endif
+
+#ifdef DRM_VM_NOPAGE
+
+extern struct page *drm_vm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+#endif
+
#endif
diff --git a/ubuntu/media/drm-poulsbo/drm_ttm.c b/ubuntu/media/drm-poulsbo/=
drm_ttm.c
index 5c8538d..2eb6a17 100644
--- a/ubuntu/media/drm-poulsbo/drm_ttm.c
+++ b/ubuntu/media/drm-poulsbo/drm_ttm.c
@@ -37,7 +37,11 @@ static void drm_ttm_ipi_handler(void *null)
=

void drm_ttm_cache_flush(void)
{
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+ if (on_each_cpu(drm_ttm_ipi_handler, NULL, 1) !=3D 0) =

+ #else =

if (on_each_cpu(drm_ttm_ipi_handler, NULL, 1, 1) !=3D 0)
+ #endif
DRM_ERROR("Timed out waiting for drm cache flush.
");
}
EXPORT_SYMBOL(drm_ttm_cache_flush);
@@ -117,8 +121,10 @@ static int drm_set_caching(struct drm_ttm *ttm, int no=
ncached)
}
}
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
if (do_tlbflush)
flush_agp_mappings();
+#endif
=

DRM_FLAG_MASKED(ttm->page_flags, noncached, DRM_TTM_PAGE_UNCACHED);
=

diff --git a/ubuntu/media/drm-poulsbo/drm_vm.c b/ubuntu/media/drm-poulsbo/d=
rm_vm.c
index fa98405..0959ebe 100644
--- a/ubuntu/media/drm-poulsbo/drm_vm.c
+++ b/ubuntu/media/drm-poulsbo/drm_vm.c
@@ -1,4 +1,4 @@
-/**
+/*
* file drm_vm.c
* Memory mapping for DRM
*
@@ -45,7 +45,6 @@ static int drm_bo_mmap_locked(struct vm_area_struct *vma,
struct file *filp,
drm_local_map_t *map);
=

-
pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma)
{
pgprot_t tmp =3D vm_get_page_prot(vma->vm_flags);
@@ -77,9 +76,9 @@ pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_st=
ruct *vma)
return tmp;
}
=

-
+#ifndef DRM_VM_NOPAGE
/**
- * c nopage method for AGP virtual memory.
+ * c fault method for AGP virtual memory.
*
* param vma virtual memory area.
* param address access address.
@@ -89,8 +88,7 @@ pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_st=
ruct *vma)
* map, get the page, increment the use count and return it.
*/
#if __OS_HAS_AGP
-static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
- unsigned long address)
+static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vm=
f)
{
struct drm_file *priv =3D vma->vm_file->private_data;
struct drm_device *dev =3D priv->head->dev;
@@ -102,19 +100,24 @@ static __inline__ struct page *drm_do_vm_nopage(struc=
t vm_area_struct *vma,
* Find the right map
*/
if (!drm_core_has_AGP(dev))
- goto vm_nopage_error;
+ goto vm_fault_error;
=

if (!dev->agp || !dev->agp->cant_use_aperture)
- goto vm_nopage_error;
+ goto vm_fault_error;
=

if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash))
- goto vm_nopage_error;
+ goto vm_fault_error;
=

r_list =3D drm_hash_entry(hash, struct drm_map_list, hash);
map =3D r_list->map;
=

if (map && map->type =3D=3D _DRM_AGP) {
- unsigned long offset =3D address - vma->vm_start;
+ /*
+ * Using vm_pgoff as a selector forces us to use this unusual
+ * addressing scheme.
+ */
+ unsigned long offset =3D (unsigned long)vmf->virtual_address -
+ vma->vm_start;
unsigned long baddr =3D map->offset + offset;
struct drm_agp_mem *agpmem;
struct page *page;
@@ -136,7 +139,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct =
vm_area_struct *vma,
}
=

if (!agpmem)
- goto vm_nopage_error;
+ goto vm_fault_error;
=

/*
* Get the page, inc the use count, and return it
@@ -144,25 +147,21 @@ static __inline__ struct page *drm_do_vm_nopage(struc=
t vm_area_struct *vma,
offset =3D (baddr - agpmem->bound) >> PAGE_SHIFT;
page =3D virt_to_page(__va(agpmem->memory->memory[offset]));
get_page(page);
+ vmf->page =3D page;
=

-#if 0
- /* page_count() not defined everywhere */
DRM_DEBUG
("baddr =3D 0x%lx page =3D 0x%p, offset =3D 0x%lx, count=3D%d
",
baddr, __va(agpmem->memory->memory[offset]), offset,
page_count(page));
-#endif
-
- return page;
+ return 0;
}
- vm_nopage_error:
- return NOPAGE_SIGBUS; /* Disallow mremap */
+vm_fault_error:
+ return VM_FAULT_SIGBUS; /* Disallow mremap */
}
#else /* __OS_HAS_AGP */
-static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
- unsigned long address)
+static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vm=
f)
{
- return NOPAGE_SIGBUS;
+ return VM_FAULT_SIGBUS;
}
#endif /* __OS_HAS_AGP */
=

@@ -176,29 +175,28 @@ static __inline__ struct page *drm_do_vm_nopage(struc=
t vm_area_struct *vma,
* Get the mapping, find the real physical page to map, get the page, and
* return it.
*/
-static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct =
*vma,
- unsigned long address)
+static int drm_do_vm_shm_fault(struct vm_area_struct *vma, struct vm_fault=
*vmf)
{
struct drm_map *map =3D (struct drm_map *) vma->vm_private_data;
unsigned long offset;
unsigned long i;
struct page *page;
=

- if (address > vma->vm_end)
- return NOPAGE_SIGBUS; /* Disallow mremap */
if (!map)
- return NOPAGE_SIGBUS; /* Nothing allocated */
+ return VM_FAULT_SIGBUS; /* Nothing allocated */
=

- offset =3D address - vma->vm_start;
+ offset =3D (unsigned long)vmf->virtual_address - vma->vm_start;
i =3D (unsigned long)map->handle + offset;
page =3D vmalloc_to_page((void *)i);
if (!page)
- return NOPAGE_SIGBUS;
+ return VM_FAULT_SIGBUS;
get_page(page);
+ vmf->page =3D page;
=

- DRM_DEBUG("shm_nopage 0x%lx
", address);
- return page;
+ DRM_DEBUG("shm_fault 0x%lx
", offset);
+ return 0;
}
+#endif
=

/**
* c close method for shared virtual memory.
@@ -280,8 +278,9 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
mutex_unlock(&dev->struct_mutex);
}
=

+#ifndef DRM_VM_NOPAGE
/**
- * c nopage method for DMA virtual memory.
+ * c fault method for DMA virtual memory.
*
* param vma virtual memory area.
* param address access address.
@@ -289,8 +288,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
*
* Determine the page number from the page offset and get it from drm_devi=
ce_dma:agelist.
*/
-static __inline__ struct page *drm_do_vm_dma_nopage(struct vm_area_struct =
*vma,
- unsigned long address)
+static int drm_do_vm_dma_fault(struct vm_area_struct *vma, struct vm_fault=
*vmf)
{
struct drm_file *priv =3D vma->vm_file->private_data;
struct drm_device *dev =3D priv->head->dev;
@@ -300,24 +298,23 @@ static __inline__ struct page *drm_do_vm_dma_nopage(s=
truct vm_area_struct *vma,
struct page *page;
=

if (!dma)
- return NOPAGE_SIGBUS; /* Error */
- if (address > vma->vm_end)
- return NOPAGE_SIGBUS; /* Disallow mremap */
+ return VM_FAULT_SIGBUS; /* Error */
if (!dma->pagelist)
- return NOPAGE_SIGBUS; /* Nothing allocated */
+ return VM_FAULT_SIGBUS; /* Nothing allocated */
=

- offset =3D address - vma->vm_start; /* vm_[pg]off[set] should be 0 */
- page_nr =3D offset >> PAGE_SHIFT;
+ offset =3D (unsigned long)vmf->virtual_address - vma->vm_start; /* vm_[pg=
]off[set] should be 0 */
+ page_nr =3D offset >> PAGE_SHIFT; /* page_nr could just be vmf->pgoff */
page =3D virt_to_page((dma->pagelist[page_nr] + (offset & (~PAGE_MASK))));
=

get_page(page);
+ vmf->page =3D page;
=

- DRM_DEBUG("dma_nopage 0x%lx (page %lu)
", address, page_nr);
- return page;
+ DRM_DEBUG("dma_fault 0x%lx (page %lu)
", offset, page_nr);
+ return 0;
}
=

/**
- * c nopage method for scatter-gather virtual memory.
+ * c fault method for scatter-gather virtual memory.
*
* param vma virtual memory area.
* param address access address.
@@ -325,8 +322,7 @@ static __inline__ struct page *drm_do_vm_dma_nopage(str=
uct vm_area_struct *vma,
*
* Determine the map offset from the page offset and get it from drm_sg_me=
m:agelist.
*/
-static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *=
vma,
- unsigned long address)
+static int drm_do_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault =
*vmf)
{
struct drm_map *map =3D (struct drm_map *) vma->vm_private_data;
struct drm_file *priv =3D vma->vm_file->private_data;
@@ -337,80 +333,62 @@ static __inline__ struct page *drm_do_vm_sg_nopage(st=
ruct vm_area_struct *vma,
unsigned long page_offset;
struct page *page;
=

- DRM_DEBUG("
");
if (!entry)
- return NOPAGE_SIGBUS; /* Error */
- if (address > vma->vm_end)
- return NOPAGE_SIGBUS; /* Disallow mremap */
+ return VM_FAULT_SIGBUS; /* Error */
if (!entry->pagelist)
- return NOPAGE_SIGBUS; /* Nothing allocated */
+ return VM_FAULT_SIGBUS; /* Nothing allocated */
=

- offset =3D address - vma->vm_start;
+ offset =3D (unsigned long)vmf->virtual_address - vma->vm_start;
map_offset =3D map->offset - (unsigned long)dev->sg->virtual;
page_offset =3D (offset >> PAGE_SHIFT) + (map_offset >> PAGE_SHIFT);
page =3D entry->pagelist[page_offset];
get_page(page);
+ vmf->page =3D page;
=

- return page;
-}
-
-static struct page *drm_vm_nopage(struct vm_area_struct *vma,
- unsigned long address, int *type)
-{
- if (type)
- *type =3D VM_FAULT_MINOR;
- return drm_do_vm_nopage(vma, address);
-}
-
-static struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
- unsigned long address, int *type)
-{
- if (type)
- *type =3D VM_FAULT_MINOR;
- return drm_do_vm_shm_nopage(vma, address);
-}
-
-static struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
- unsigned long address, int *type)
-{
- if (type)
- *type =3D VM_FAULT_MINOR;
- return drm_do_vm_dma_nopage(vma, address);
-}
-
-static struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
- unsigned long address, int *type)
-{
- if (type)
- *type =3D VM_FAULT_MINOR;
- return drm_do_vm_sg_nopage(vma, address);
+ return 0;
}
-
+#endif
=

/** AGP virtual memory operations */
static struct vm_operations_struct drm_vm_ops =3D {
+#ifdef DRM_VM_NOPAGE
.nopage =3D drm_vm_nopage,
+#else
+ .fault =3D drm_do_vm_fault,
+#endif
.open =3D drm_vm_open,
.close =3D drm_vm_close,
};
=

/** Shared virtual memory operations */
static struct vm_operations_struct drm_vm_shm_ops =3D {
+#ifdef DRM_VM_NOPAGE
.nopage =3D drm_vm_shm_nopage,
+#else
+ .fault =3D drm_do_vm_shm_fault,
+#endif
.open =3D drm_vm_open,
.close =3D drm_vm_shm_close,
};
=

/** DMA virtual memory operations */
static struct vm_operations_struct drm_vm_dma_ops =3D {
+#ifdef DRM_VM_NOPAGE
.nopage =3D drm_vm_dma_nopage,
+#else
+ .fault =3D drm_do_vm_dma_fault,
+#endif
.open =3D drm_vm_open,
.close =3D drm_vm_close,
};
=

/** Scatter-gather virtual memory operations */
static struct vm_operations_struct drm_vm_sg_ops =3D {
+#ifdef DRM_VM_NOPAGE
.nopage =3D drm_vm_sg_nopage,
+#else
+ .fault =3D drm_do_vm_sg_fault,
+#endif
.open =3D drm_vm_open,
.close =3D drm_vm_close,
};
@@ -715,11 +693,242 @@ EXPORT_SYMBOL(drm_mmap);
* These bits are not used by the mm subsystem code, and we consider them
* protected by the bo->mutex lock.
*/
-
#ifdef DRM_FULL_MM_COMPAT
-
#define DRM_NOPFN_EXTRA 15 /* Fault 16 pages at a time in */
=

+#if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+int drm_bo_vm_fault(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
+{
+ struct drm_buffer_object *bo =3D (struct drm_buffer_object *) vma->vm_pri=
vate_data;
+ unsigned long page_offset;
+ struct page *page =3D NULL;
+ struct drm_ttm *ttm =3D NULL;
+ struct drm_device *dev;
+ unsigned long pfn;
+ int err;
+ unsigned long bus_base;
+ unsigned long bus_offset;
+ unsigned long bus_size;
+ int i;
+ =

+ unsigned long ret =3D VM_FAULT_NOPAGE;
+
+ unsigned long address =3D (unsigned long)vmf->virtual_address;
+
+ if (address > vma->vm_end)
+ return VM_FAULT_SIGBUS;
+
+ dev =3D bo->dev;
+ err =3D drm_bo_read_lock(&dev->bm.bm_lock, 1);
+ if (err)
+ return VM_FAULT_NOPAGE;
+
+ err =3D mutex_lock_interruptible(&bo->mutex);
+ if (err) {
+ drm_bo_read_unlock(&dev->bm.bm_lock);
+ return VM_FAULT_NOPAGE;
+ }
+
+ err =3D drm_bo_wait(bo, 0, 0, 0);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+
+ /*
+ * If buffer happens to be in a non-mappable location,
+ * move it to a mappable.
+ */
+
+ if (!(bo->mem.flags & DRM_BO_FLAG_MAPPABLE)) {
+ uint32_t new_mask =3D bo->mem.mask |
+ DRM_BO_FLAG_MAPPABLE |
+ DRM_BO_FLAG_FORCE_MAPPABLE;
+ err =3D drm_bo_move_buffer(bo, new_mask, 0, 0);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+ }
+
+ err =3D drm_bo_pci_offset(dev, &bo->mem, &bus_base, &bus_offset,
+ &bus_size);
+
+ if (err) {
+ ret =3D VM_FAULT_SIGBUS;
+ goto out_unlock;
+ }
+
+ page_offset =3D (address - vma->vm_start) >> PAGE_SHIFT;
+
+ if (bus_size) {
+ struct drm_mem_type_manager *man =3D &dev->bm.man[bo->mem.mem_type];
+
+ pfn =3D ((bus_base + bus_offset) >> PAGE_SHIFT) + page_offset;
+ vma->vm_page_prot =3D drm_io_prot(man->drm_bus_maptype, vma);
+ } else {
+ ttm =3D bo->ttm;
+
+ drm_ttm_fixup_caching(ttm);
+ page =3D drm_ttm_get_page(ttm, page_offset);
+ if (!page) {
+ ret =3D VM_FAULT_OOM;
+ goto out_unlock;
+ }
+ pfn =3D page_to_pfn(page);
+ vma->vm_page_prot =3D (bo->mem.flags & DRM_BO_FLAG_CACHED) ?
+ vm_get_page_prot(vma->vm_flags) :
+ drm_io_prot(_DRM_TTM, vma);
+ }
+
+ err =3D vm_insert_pfn(vma, address, pfn);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_OOM : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+
+ for (i=3D0; i<DRM_NOPFN_EXTRA; ++i) {
+
+ if (++page_offset =3D=3D bo->mem.num_pages)
+ break;
+ address =3D vma->vm_start + (page_offset << PAGE_SHIFT);
+ if (address >=3D vma->vm_end)
+ break;
+ if (bus_size) {
+ pfn =3D ((bus_base + bus_offset) >> PAGE_SHIFT) =

+ + page_offset;
+ } else {
+ page =3D drm_ttm_get_page(ttm, page_offset);
+ if (!page)
+ break;
+ pfn =3D page_to_pfn(page);
+ }
+ if (vm_insert_pfn(vma, address, pfn))
+ break;
+ }
+out_unlock:
+ mutex_unlock(&bo->mutex);
+ drm_bo_read_unlock(&dev->bm.bm_lock);
+ return ret;
+}
+
+int drm_bo_vm_nopfn(struct vm_area_struct *vma,
+ struct vm_fault *vmf )
+{
+ struct drm_buffer_object *bo =3D (struct drm_buffer_object *) vma->vm_pri=
vate_data;
+ unsigned long page_offset;
+ struct page *page =3D NULL;
+ struct drm_ttm *ttm =3D NULL;
+ struct drm_device *dev;
+ unsigned long pfn;
+ int err;
+ unsigned long bus_base;
+ unsigned long bus_offset;
+ unsigned long bus_size;
+ int i;
+ unsigned long ret =3D VM_FAULT_NOPAGE;
+ =

+ unsigned long address =3D (unsigned long)vmf->virtual_address;
+
+ if (address > vma->vm_end)
+ return VM_FAULT_SIGBUS;
+
+ dev =3D bo->dev;
+ err =3D drm_bo_read_lock(&dev->bm.bm_lock, 1);
+ if (err)
+ return VM_FAULT_NOPAGE;
+
+ err =3D mutex_lock_interruptible(&bo->mutex);
+ if (err) {
+ drm_bo_read_unlock(&dev->bm.bm_lock);
+ return VM_FAULT_NOPAGE;
+ }
+
+ err =3D drm_bo_wait(bo, 0, 0, 0);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+
+ /*
+ * If buffer happens to be in a non-mappable location,
+ * move it to a mappable.
+ */
+
+ if (!(bo->mem.flags & DRM_BO_FLAG_MAPPABLE)) {
+ uint32_t new_mask =3D bo->mem.mask |
+ DRM_BO_FLAG_MAPPABLE |
+ DRM_BO_FLAG_FORCE_MAPPABLE;
+ err =3D drm_bo_move_buffer(bo, new_mask, 0, 0);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_SIGBUS : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+ }
+
+ err =3D drm_bo_pci_offset(dev, &bo->mem, &bus_base, &bus_offset,
+ &bus_size);
+
+ if (err) {
+ ret =3D VM_FAULT_SIGBUS;
+ goto out_unlock;
+ }
+
+ page_offset =3D (address - vma->vm_start) >> PAGE_SHIFT;
+
+ if (bus_size) {
+ struct drm_mem_type_manager *man =3D &dev->bm.man[bo->mem.mem_type];
+
+ pfn =3D ((bus_base + bus_offset) >> PAGE_SHIFT) + page_offset;
+ vma->vm_page_prot =3D drm_io_prot(man->drm_bus_maptype, vma);
+ } else {
+ ttm =3D bo->ttm;
+
+ drm_ttm_fixup_caching(ttm);
+ page =3D drm_ttm_get_page(ttm, page_offset);
+ if (!page) {
+ ret =3D VM_FAULT_OOM;
+ goto out_unlock;
+ }
+ pfn =3D page_to_pfn(page);
+ vma->vm_page_prot =3D (bo->mem.flags & DRM_BO_FLAG_CACHED) ?
+ vm_get_page_prot(vma->vm_flags) :
+ drm_io_prot(_DRM_TTM, vma);
+ }
+
+ err =3D vm_insert_pfn(vma, address, pfn);
+ if (err) {
+ ret =3D (err !=3D -EAGAIN) ? VM_FAULT_OOM : VM_FAULT_NOPAGE;
+ goto out_unlock;
+ }
+
+ for (i=3D0; i<DRM_NOPFN_EXTRA; ++i) {
+
+ if (++page_offset =3D=3D bo->mem.num_pages)
+ break;
+ address =3D vma->vm_start + (page_offset << PAGE_SHIFT);
+ if (address >=3D vma->vm_end)
+ break;
+ if (bus_size) {
+ pfn =3D ((bus_base + bus_offset) >> PAGE_SHIFT) =

+ + page_offset;
+ } else {
+ page =3D drm_ttm_get_page(ttm, page_offset);
+ if (!page)
+ break;
+ pfn =3D page_to_pfn(page);
+ }
+ if (vm_insert_pfn(vma, address, pfn))
+ break;
+ }
+out_unlock:
+ mutex_unlock(&bo->mutex);
+ drm_bo_read_unlock(&dev->bm.bm_lock);
+ return ret;
+}
+
+#else
unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
unsigned long address)
{
@@ -832,6 +1041,8 @@ out_unlock:
drm_bo_read_unlock(&dev->bm.bm_lock);
return ret;
}
+#endif
+
EXPORT_SYMBOL(drm_bo_vm_nopfn);
#endif
=

@@ -887,6 +1098,9 @@ static void drm_bo_vm_close(struct vm_area_struct *vma)
}
=

static struct vm_operations_struct drm_bo_vm_ops =3D {
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+ .fault =3D drm_bo_vm_fault,
+ #else
#ifdef DRM_FULL_MM_COMPAT
.nopfn =3D drm_bo_vm_nopfn,
#else
@@ -896,6 +1110,7 @@ static struct vm_operations_struct drm_bo_vm_ops =3D {
.nopage =3D drm_bo_vm_nopage,
#endif
#endif
+ #endif
.open =3D drm_bo_vm_open,
.close =3D drm_bo_vm_close,
};
diff --git a/ubuntu/media/drm-poulsbo/drm_vm_nopage_compat.c b/ubuntu/media=
/drm-poulsbo/drm_vm_nopage_compat.c
new file mode 100644
index 0000000..d0c7c5a
--- /dev/null
+++ b/ubuntu/media/drm-poulsbo/drm_vm_nopage_compat.c
@@ -0,0 +1,279 @@
+/**
+ * file drm_vm.c
+ * Memory mapping for DRM
+ *
+ * author Rickard E. (Rik) Faith <faith@valinux.com>
+ * author Gareth Hughes <gareth@valinux.com>
+ */
+
+/*
+ * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com
+ *
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software=
"),
+ * to deal in the Software without restriction, including without limitati=
on
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the ne=
xt
+ * paragraph) shall be included in all copies or substantial portions of t=
he
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS=
OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES =
OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drmP.h"
+
+#ifdef DRM_VM_NOPAGE
+/**
+ * c nopage method for AGP virtual memory.
+ *
+ * param vma virtual memory area.
+ * param address access address.
+ *
eturn pointer to the page structure.
+ *
+ * Find the right map and if it's AGP memory find the real physical page to
+ * map, get the page, increment the use count and return it.
+ */
+#if __OS_HAS_AGP
+static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
+ unsigned long address)
+{
+ struct drm_file *priv =3D vma->vm_file->private_data;
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,26))
+ struct drm_device *dev =3D priv->minor->dev;
+ #else
+ struct drm_device *dev =3D priv->head->dev;
+ #endif
+ struct drm_map *map =3D NULL;
+ struct drm_map_list *r_list;
+ struct drm_hash_item *hash;
+
+ /*
+ * Find the right map
+ */
+ if (!drm_core_has_AGP(dev))
+ goto vm_nopage_error;
+
+ if (!dev->agp || !dev->agp->cant_use_aperture)
+ goto vm_nopage_error;
+
+ if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash))
+ goto vm_nopage_error;
+
+ r_list =3D drm_hash_entry(hash, struct drm_map_list, hash);
+ map =3D r_list->map;
+
+ if (map && map->type =3D=3D _DRM_AGP) {
+ unsigned long offset =3D address - vma->vm_start;
+ unsigned long baddr =3D map->offset + offset;
+ struct drm_agp_mem *agpmem;
+ struct page *page;
+
+#ifdef __alpha__
+ /*
+ * Adjust to a bus-relative address
+ */
+ baddr -=3D dev->hose->mem_space->start;
+#endif
+
+ /*
+ * It's AGP memory - find the real physical page to map
+ */
+ list_for_each_entry(agpmem, &dev->agp->memory, head) {
+ if (agpmem->bound <=3D baddr &&
+ agpmem->bound + agpmem->pages * PAGE_SIZE > baddr)
+ break;
+ }
+
+ if (!agpmem)
+ goto vm_nopage_error;
+
+ /*
+ * Get the page, inc the use count, and return it
+ */
+ offset =3D (baddr - agpmem->bound) >> PAGE_SHIFT;
+ page =3D virt_to_page(__va(agpmem->memory->memory[offset]));
+ get_page(page);
+
+#if 0
+ /* page_count() not defined everywhere */
+ DRM_DEBUG
+ ("baddr =3D 0x%lx page =3D 0x%p, offset =3D 0x%lx, count=3D%d
",
+ baddr, __va(agpmem->memory->memory[offset]), offset,
+ page_count(page));
+#endif
+
+ return page;
+ }
+ vm_nopage_error:
+ return NOPAGE_SIGBUS; /* Disallow mremap */
+}
+#else /* __OS_HAS_AGP */
+static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
+ unsigned long address)
+{
+ return NOPAGE_SIGBUS;
+}
+#endif /* __OS_HAS_AGP */
+
+/**
+ * c nopage method for shared virtual memory.
+ *
+ * param vma virtual memory area.
+ * param address access address.
+ *
eturn pointer to the page structure.
+ *
+ * Get the mapping, find the real physical page to map, get the page, and
+ * return it.
+ */
+static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct =
*vma,
+ unsigned long address)
+{
+ struct drm_map *map =3D (struct drm_map *) vma->vm_private_data;
+ unsigned long offset;
+ unsigned long i;
+ struct page *page;
+
+ if (address > vma->vm_end)
+ return NOPAGE_SIGBUS; /* Disallow mremap */
+ if (!map)
+ return NOPAGE_SIGBUS; /* Nothing allocated */
+
+ offset =3D address - vma->vm_start;
+ i =3D (unsigned long)map->handle + offset;
+ page =3D vmalloc_to_page((void *)i);
+ if (!page)
+ return NOPAGE_SIGBUS;
+ get_page(page);
+
+ DRM_DEBUG("0x%lx
", address);
+ return page;
+}
+
+/**
+ * c nopage method for DMA virtual memory.
+ *
+ * param vma virtual memory area.
+ * param address access address.
+ *
eturn pointer to the page structure.
+ *
+ * Determine the page number from the page offset and get it from drm_devi=
ce_dma:agelist.
+ */
+static __inline__ struct page *drm_do_vm_dma_nopage(struct vm_area_struct =
*vma,
+ unsigned long address)
+{
+ struct drm_file *priv =3D vma->vm_file->private_data;
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,26))
+ struct drm_device *dev =3D priv->minor->dev;
+ #else
+ struct drm_device *dev =3D priv->head->dev;
+ #endif
+ struct drm_device_dma *dma =3D dev->dma;
+ unsigned long offset;
+ unsigned long page_nr;
+ struct page *page;
+
+ if (!dma)
+ return NOPAGE_SIGBUS; /* Error */
+ if (address > vma->vm_end)
+ return NOPAGE_SIGBUS; /* Disallow mremap */
+ if (!dma->pagelist)
+ return NOPAGE_SIGBUS; /* Nothing allocated */
+
+ offset =3D address - vma->vm_start; /* vm_[pg]off[set] should be 0 */
+ page_nr =3D offset >> PAGE_SHIFT;
+ page =3D virt_to_page((dma->pagelist[page_nr] + (offset & (~PAGE_MASK))));
+
+ get_page(page);
+
+ DRM_DEBUG("0x%lx (page %lu)
", address, page_nr);
+ return page;
+}
+
+/**
+ * c nopage method for scatter-gather virtual memory.
+ *
+ * param vma virtual memory area.
+ * param address access address.
+ *
eturn pointer to the page structure.
+ *
+ * Determine the map offset from the page offset and get it from drm_sg_me=
m:agelist.
+ */
+static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *=
vma,
+ unsigned long address)
+{
+ struct drm_map *map =3D (struct drm_map *) vma->vm_private_data;
+ struct drm_file *priv =3D vma->vm_file->private_data;
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,26))
+ struct drm_device *dev =3D priv->minor->dev;
+ #else
+ struct drm_device *dev =3D priv->head->dev;
+ #endif
+ struct drm_sg_mem *entry =3D dev->sg;
+ unsigned long offset;
+ unsigned long map_offset;
+ unsigned long page_offset;
+ struct page *page;
+
+ DRM_DEBUG("
");
+ if (!entry)
+ return NOPAGE_SIGBUS; /* Error */
+ if (address > vma->vm_end)
+ return NOPAGE_SIGBUS; /* Disallow mremap */
+ if (!entry->pagelist)
+ return NOPAGE_SIGBUS; /* Nothing allocated */
+
+ offset =3D address - vma->vm_start;
+ map_offset =3D map->offset - (unsigned long)dev->sg->virtual;
+ page_offset =3D (offset >> PAGE_SHIFT) + (map_offset >> PAGE_SHIFT);
+ page =3D entry->pagelist[page_offset];
+ get_page(page);
+
+ return page;
+}
+
+
+struct page *drm_vm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type)
+{
+ if (type)
+ *type =3D VM_FAULT_MINOR;
+ return drm_do_vm_nopage(vma, address);
+}
+
+struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type)
+{
+ if (type)
+ *type =3D VM_FAULT_MINOR;
+ return drm_do_vm_shm_nopage(vma, address);
+}
+
+struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type)
+{
+ if (type)
+ *type =3D VM_FAULT_MINOR;
+ return drm_do_vm_dma_nopage(vma, address);
+}
+
+struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type)
+{
+ if (type)
+ *type =3D VM_FAULT_MINOR;
+ return drm_do_vm_sg_nopage(vma, address);
+}
+#endif
diff --git a/ubuntu/media/drm-poulsbo/psb_drm.h b/ubuntu/media/drm-poulsbo/=
psb_drm.h
index ffd196b..518206b 100644
--- a/ubuntu/media/drm-poulsbo/psb_drm.h
+++ b/ubuntu/media/drm-poulsbo/psb_drm.h
@@ -34,7 +34,7 @@
*
*/
/* #define PSB_PACKAGE_VERSION "ED"__DATE__*/
-#define PSB_PACKAGE_VERSION "2.2.0.32L.0020"
+#define PSB_PACKAGE_VERSION "2.3.0.32L.0029"
=

#define DRM_PSB_SAREA_MAJOR 0
#define DRM_PSB_SAREA_MINOR 1
diff --git a/ubuntu/media/drm-poulsbo/psb_drv.c b/ubuntu/media/drm-poulsbo/=
psb_drv.c
index 831631e..017ddf3 100644
--- a/ubuntu/media/drm-poulsbo/psb_drv.c
+++ b/ubuntu/media/drm-poulsbo/psb_drv.c
@@ -268,7 +268,11 @@ static int psb_do_init(struct drm_device *dev)
if (!dev_priv->comm_page)
goto out_err;
=

+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
change_page_attr(dev_priv->comm_page, 1, PAGE_KERNEL_NOCACHE);
+#else
+ map_page_into_agp(dev_priv->comm_page);
+#endif
=

dev_priv->comm =3D kmap(dev_priv->comm_page);
memset((void *)dev_priv->comm, 0, PAGE_SIZE);
@@ -582,7 +586,11 @@ static int psb_driver_load(struct drm_device *dev, uns=
igned long chipset)
if (!dev_priv->scratch_page)
goto out_err;
=

+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
change_page_attr(dev_priv->scratch_page, 1, PAGE_KERNEL_NOCACHE);
+#else
+ map_page_into_agp(dev_priv->scratch_page);
+#endif
=

dev_priv->pg =3D psb_gtt_alloc(dev);
if (!dev_priv->pg)
diff --git a/ubuntu/media/drm-poulsbo/psb_drv.h b/ubuntu/media/drm-poulsbo/=
psb_drv.h
index 8eb76a4..6912df2 100644
--- a/ubuntu/media/drm-poulsbo/psb_drv.h
+++ b/ubuntu/media/drm-poulsbo/psb_drv.h
@@ -46,9 +46,9 @@ enum {
#define DRIVER_DESC "drm driver for the Intel GMA500"
#define DRIVER_AUTHOR "Tungsten Graphics Inc."
=

-#define PSB_DRM_DRIVER_DATE "20080731"
+#define PSB_DRM_DRIVER_DATE "20081219"
#define PSB_DRM_DRIVER_MAJOR 4
-#define PSB_DRM_DRIVER_MINOR 13
+#define PSB_DRM_DRIVER_MINOR 23
#define PSB_DRM_DRIVER_PATCHLEVEL 0
=

#define PSB_VDC_OFFSET 0x00000000
@@ -263,6 +263,7 @@ struct drm_psb_private {
int has_msvdx;
uint32_t gatt_free_offset;
atomic_t msvdx_mmu_invaldc;
+ int msvdx_power_saving;
=

/*
* Fencing / irq.
diff --git a/ubuntu/media/drm-poulsbo/psb_fb.c b/ubuntu/media/drm-poulsbo/p=
sb_fb.c
index 9e21914..a65a7f0 100644
--- a/ubuntu/media/drm-poulsbo/psb_fb.c
+++ b/ubuntu/media/drm-poulsbo/psb_fb.c
@@ -1015,7 +1015,24 @@ static unsigned long psbfb_nopfn(struct vm_area_stru=
ct *vma,
mutex_unlock(&vi->vm_mutex);
return ret;
}
+#if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+static int psbfb_fault(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
+{
+ struct psbfb_vm_info *vi =3D (struct psbfb_vm_info *)vma->vm_private_data;
+ struct vm_area_struct tmp_vma;
+ unsigned long ret;
=

+ unsigned long address =3D (unsigned long)vmf->virtual_address;
+
+ mutex_lock(&vi->vm_mutex);
+ tmp_vma =3D *vma;
+ tmp_vma.vm_private_data =3D vi->bo;
+ ret =3D drm_bo_vm_nopfn(&tmp_vma, address);
+ mutex_unlock(&vi->vm_mutex);
+ return ret;
+}
+#endif
static void psbfb_vm_open(struct vm_area_struct *vma)
{
struct psbfb_vm_info *vi =3D (struct psbfb_vm_info *)vma->vm_private_data;
@@ -1029,8 +1046,11 @@ static void psbfb_vm_close(struct vm_area_struct *vm=
a)
}
=

static struct vm_operations_struct psbfb_vm_ops =3D {
+ #if (LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,27))
+ .fault =3D psbfb_fault,
+ #else
.nopfn =3D psbfb_nopfn,
- .nopage =3D NULL,
+ #endif
.open =3D psbfb_vm_open,
.close =3D psbfb_vm_close,
};
diff --git a/ubuntu/media/drm-poulsbo/psb_gtt.c b/ubuntu/media/drm-poulsbo/=
psb_gtt.c
index ce8c616..91d54be 100644
--- a/ubuntu/media/drm-poulsbo/psb_gtt.c
+++ b/ubuntu/media/drm-poulsbo/psb_gtt.c
@@ -119,6 +119,7 @@ int psb_gtt_init(struct psb_gtt *pg, int resume)
=

pg->gtt_pages =3D gtt_pages;
pg->stolen_size =3D stolen_size;
+ if(!resume)
pg->gtt_map =3D
ioremap_nocache(pg->gtt_phys_start, gtt_pages << PAGE_SHIFT);
if (!pg->gtt_map) {
diff --git a/ubuntu/media/drm-poulsbo/psb_msvdx.c b/ubuntu/media/drm-poulsb=
o/psb_msvdx.c
index 678088d..74850a5 100644
--- a/ubuntu/media/drm-poulsbo/psb_msvdx.c
+++ b/ubuntu/media/drm-poulsbo/psb_msvdx.c
@@ -199,6 +199,8 @@ psb_submit_video_cmdbuf (struct drm_device *dev,
psb_schedule_watchdog (dev_priv);
=

spin_lock_irqsave (&dev_priv->msvdx_lock, irq_flags);
+ dev_priv->msvdx_power_saving =3D 0;
+
if (dev_priv->msvdx_needs_reset)
{
spin_unlock_irqrestore (&dev_priv->msvdx_lock, irq_flags);
@@ -647,7 +649,8 @@ psb_msvdx_lockup (struct drm_psb_private *dev_priv,
} =

else =

{
- if (dev_priv->msvdx_needs_reset =3D=3D 0)
+ //if (dev_priv->msvdx_needs_reset =3D=3D 0)
+ if (dev_priv->msvdx_power_saving =3D=3D 0)
{
if (dev_priv->msvdx_start_idle && (dev_priv->msvdx_finished_sequence =
=3D=3D dev_priv->msvdx_current_sequence))
{
@@ -656,7 +659,9 @@ psb_msvdx_lockup (struct drm_psb_private *dev_priv,
{
printk("set the msvdx clock to 0 in the %s
", __FUNCTION__);
PSB_WMSVDX32 (0, MSVDX_MAN_CLK_ENABLE);
- dev_priv->msvdx_needs_reset =3D 1;
+ // MSVDX needn't to be reset for the latter commands after pausing a=
nd resuming playing.
+ //dev_priv->msvdx_needs_reset =3D 1;
+ dev_priv->msvdx_power_saving =3D 1;
}
else
{
diff --git a/ubuntu/media/drm-poulsbo/psb_schedule.c b/ubuntu/media/drm-pou=
lsbo/psb_schedule.c
index 224ab08..54637dd 100644
--- a/ubuntu/media/drm-poulsbo/psb_schedule.c
+++ b/ubuntu/media/drm-poulsbo/psb_schedule.c
@@ -346,7 +346,8 @@ static void psb_schedule_raster(struct drm_psb_private =
*dev_priv,
PSB_DEBUG_RENDER("Raster busy.
");
return;
}
-#ifdef PSB_BLOCK_OVERLAP
+//#ifdef PSB_BLOCK_OVERLAP
+#if 1
if (scheduler->current_task[PSB_SCENE_ENGINE_TA] !=3D NULL) {
PSB_DEBUG_RENDER("TA busy.
");
return;
-- =

1.6.0.4

-- =

Lo=EFc Minier

-- =

kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org