[PATCH] gma500: Fix hardware cursor support for poulsbo

Guillaume Clément gclement at baobob.org
Wed May 16 14:01:48 PDT 2012


Le dimanche 13 mai 2012 15:07:46 Patrik Jakobsson a écrit :
> Poulsbo needs a physical address in the cursor base register. We allocate a
> stolen memory buffer and copy the cursor image provided by userspace into
> it. When/If we get our own userspace driver we can map this stolen memory
> directly. The patch also adds a mark in chip ops so we can identify devices
> that has this requirement.
> 

Hello,


This patch works overall for me, (applied it to linux-3.4-rc7) but I'm 
experiencing a kernel error if I do some specific actions (like beginning a 
drag&drop from the KDE menu)

The error corresponds to 
	BUG_ON(!vaddr);
on kunmap (see below for the full stack trace).

It looks like on others parts of the kernel, kunmap is fed the same input as 
kmap and not the return value of kmap.

By switching in psb_intel_crtc_cursor_set : 

+                       kunmap(tmp_src);

to :

+                       kunmap(gt->pages[i]);


I don't experience the problem anymore.




The stack trace for reference :



ay 16 22:35:55 thor kernel: [   98.169193] ------------[ cut here 
]------------
May 16 22:35:55 thor kernel: [   98.169212] kernel BUG at mm/highmem.c:268!
May 16 22:35:55 thor kernel: [   98.169227] invalid opcode: 0000 [#1] PREEMPT 
SMP 
May 16 22:35:55 thor kernel: [   98.169248] Modules linked in: nfsd exportfs 
nfs nfs_acl lockd auth_rpcgss fscache sunrpc joydev hid_multitouch usbhid hid 
arc4 eeepc_wmi asus_wmi pci_hotplug sparse_keymap ath9k ath9k_common 
snd_hda_codec_realtek ath9k_hw ath mac80211 gma500_gfx(O) snd_hda_intel 
i2c_algo_bit drm_kms_helper snd_hda_codec drm snd_pcm snd_page_alloc snd_hwdep 
snd_timer uhci_hcd serio_raw cfg80211 snd agpgart acpi_cpufreq microcode 
ehci_hcd coretemp usbcore psmouse pcspkr rfkill atl1c lpc_sch i2c_core 
usb_common soundcore thermal evdev mperf battery processor wmi video ac ext4 
jbd2 mbcache crc16 sd_mod pata_acpi ata_generic pata_sch libata scsi_mod 
button
May 16 22:35:55 thor kernel: [   98.169529] 
May 16 22:35:55 thor kernel: [   98.169549] Pid: 641, comm: X Tainted: G           
O 3.4.0-1-mainline #1 ASUSTeK Computer INC. T91MT/T91MT
May 16 22:35:55 thor kernel: [   98.169578] EIP: 0060:[<c01fce99>] EFLAGS: 
00013246 CPU: 1                                                                                                          
May 16 22:35:55 thor kernel: [   98.169603] EIP is at kunmap_high+0xa9/0xb0                                                                                                                         
May 16 22:35:55 thor kernel: [   98.169618] EAX: 00000000 EBX: ff9c8000 ECX: 
c0777680 EDX: 00003206                                                                                                 
May 16 22:35:55 thor kernel: [   98.169634] ESI: ff9c9000 EDI: f9405000 EBP: 
f4237d94 ESP: f4237d8c                                                                                                 
May 16 22:35:55 thor kernel: [   98.169652]  DS: 007b ES: 007b FS: 00d8 GS: 
00e0 SS: 0068
May 16 22:35:55 thor kernel: [   98.169669] CR0: 80050033 CR2: b622a680 CR3: 
3733b000 CR4: 000007d0
May 16 22:35:55 thor kernel: [   98.169686] DR0: 00000000 DR1: 00000000 DR2: 
00000000 DR3: 00000000
May 16 22:35:55 thor kernel: [   98.169700] DR6: ffff0ff0 DR7: 00000400
May 16 22:35:55 thor kernel: [   98.169717] Process X (pid: 641, ti=f4236000 
task=f4215500 task.ti=f4236000)
May 16 22:35:55 thor kernel: [   98.169731] Stack:
May 16 22:35:55 thor kernel: [   98.169740]  c03894bb ff9c8000 f4237d9c 
c012fccd f4237dec f896fc60 f8985201 f4c39860
May 16 22:35:55 thor kernel: [   98.169784]  f8985237 00000000 ff9c8000 
00000000 00000001 00000004 000700c0 000700c4
May 16 22:35:55 thor kernel: [   98.169827]  f72b11a0 f73e3800 f6c9c800 
f9404000 00000000 f4237e74 f73e380c f896faf0
May 16 22:35:55 thor kernel: [   98.169873] Call Trace:
May 16 22:35:55 thor kernel: [   98.169901]  [<c03894bb>] ? 
dev_printk+0x2b/0x30
May 16 22:35:55 thor kernel: [   98.169928]  [<c012fccd>] kunmap+0x3d/0x50
May 16 22:35:55 thor kernel: [   98.169980]  [<f896fc60>] 
psb_intel_crtc_cursor_set+0x170/0x480 [gma500_gfx]
May 16 22:35:55 thor kernel: [   98.170027]  [<f896faf0>] ? 
psb_intel_crtc_cursor_move+0x100/0x100 [gma500_gfx]
May 16 22:35:55 thor kernel: [   98.170066]  [<f87a798f>] 
drm_mode_cursor_ioctl+0xdf/0x140 [drm]
May 16 22:35:55 thor kernel: [   98.170096]  [<f896faf0>] ? 
psb_intel_crtc_cursor_move+0x100/0x100 [gma500_gfx]
May 16 22:35:55 thor kernel: [   98.170130]  [<f87a78b0>] ? 
drm_mode_setcrtc+0x540/0x540 [drm]
May 16 22:35:55 thor kernel: [   98.170160]  [<f8799cd2>] 
drm_ioctl+0x422/0x480 [drm]
May 16 22:35:55 thor kernel: [   98.170183]  [<c01c64a3>] ? 
wakeup_graph_return+0x43/0x70
May 16 22:35:55 thor kernel: [   98.170217]  [<f87a78b0>] ? 
drm_mode_setcrtc+0x540/0x540 [drm]
May 16 22:35:55 thor kernel: [   98.170237]  [<c01c64a3>] ? 
wakeup_graph_return+0x43/0x70
May 16 22:35:55 thor kernel: [   98.170256]  [<c0265254>] ? 
inotify_free_event_priv+0x14/0x20
May 16 22:35:55 thor kernel: [   98.170273]  [<c0265254>] ? 
inotify_free_event_priv+0x14/0x20
May 16 22:35:55 thor kernel: [   98.170290]  [<c026535a>] ? 
inotify_handle_event+0x7a/0xc0
May 16 22:35:55 thor kernel: [   98.170306]  [<c0265190>] ? 
inotify_free_group_priv+0x50/0x50
May 16 22:35:55 thor kernel: [   98.170324]  [<c02466d0>] ? 
mntput_no_expire+0x30/0x100
May 16 22:35:55 thor kernel: [   98.170340]  [<c0263594>] ? 
fsnotify_put_event+0x44/0x60
May 16 22:35:55 thor kernel: [   98.170356]  [<c0263594>] ? 
fsnotify_put_event+0x44/0x60
May 16 22:35:55 thor kernel: [   98.170385]  [<f896f065>] 
psb_unlocked_ioctl+0x35/0x80 [gma500_gfx]
May 16 22:35:55 thor kernel: [   98.170413]  [<f896f030>] ? 
psb_driver_preclose+0x10/0x10 [gma500_gfx]
May 16 22:35:55 thor kernel: [   98.170431]  [<c023c36a>] 
do_vfs_ioctl+0x7a/0x560
May 16 22:35:55 thor kernel: [   98.170449]  [<c022c7ef>] ? 
vfs_write+0x11f/0x160
May 16 22:35:55 thor kernel: [   98.170465]  [<c022dd7f>] ? 
fget_light+0x7f/0xe0
May 16 22:35:55 thor kernel: [   98.170480]  [<c023c8b8>] sys_ioctl+0x68/0x80
May 16 22:35:55 thor kernel: [   98.170498]  [<c04b30df>] 
sysenter_do_call+0x12/0x28
May 16 22:35:55 thor kernel: [   98.170515]  [<c01c64a3>] ? 
wakeup_graph_return+0x43/0x70
May 16 22:35:55 thor kernel: [   98.170531]  [<c01c64a3>] ? 
wakeup_graph_return+0x43/0x70
May 16 22:35:55 thor kernel: [   98.170541] Code: 2b 00 81 fb 50 04 5f c0 74 
da c7 04 24 00 00 00 00 b9 01 00 00 00 ba 03 00 00 00 b8 4c 04 5f c0 e8 4d 09 
f6 ff 83 c4 04 5b 5d c3 <0f> 0b 90 8d 74 26 00 55 89 e5 56 53 3e 8d 74 26 00 31 
db e8 ef 
May 16 22:35:55 thor kernel: [   98.170664] EIP: [<c01fce99>] 
kunmap_high+0xa9/0xb0 SS:ESP 0068:f4237d8c
May 16 22:35:55 thor kernel: [   98.170824] ---[ end trace aef0fd1f8e847917 
]---
May 16 22:35:55 thor kernel: [   98.170848] note: X[641] exited with 
preempt_count 1



More information about the dri-devel mailing list