From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume =?ISO-8859-1?Q?Cl=E9ment?= Subject: Re: [PATCH] gma500: Fix hardware cursor support for poulsbo Date: Wed, 16 May 2012 23:01:48 +0200 Message-ID: <3557728.eRDFLSkpWF@freya> References: <1336914466-1901-1-git-send-email-patrik.r.jakobsson@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from slow3-v.mail.gandi.net (slow3-v.mail.gandi.net [217.70.178.89]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D4049EA00 for ; Wed, 16 May 2012 14:10:56 -0700 (PDT) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by slow3-v.mail.gandi.net (Postfix) with ESMTP id 513013A0D7 for ; Wed, 16 May 2012 23:01:45 +0200 (CEST) In-Reply-To: <1336914466-1901-1-git-send-email-patrik.r.jakobsson@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: alan@linux.intel.com List-Id: dri-devel@lists.freedesktop.org Le dimanche 13 mai 2012 15:07:46 Patrik Jakobsson a =E9crit : > 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 devic= es > 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 a= s = 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] PREEM= PT = SMP = May 16 22:35:55 thor kernel: [ 98.169248] Modules linked in: nfsd exportf= s = nfs nfs_acl lockd auth_rpcgss fscache sunrpc joydev hid_multitouch usbhid h= id = 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_hw= dep = 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 ext= 4 = 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:[] 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=3Df4236= 000 = task=3Df4215500 task.ti=3Df4236000) 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] [] ? = dev_printk+0x2b/0x30 May 16 22:35:55 thor kernel: [ 98.169928] [] kunmap+0x3d/0x50 May 16 22:35:55 thor kernel: [ 98.169980] [] = psb_intel_crtc_cursor_set+0x170/0x480 [gma500_gfx] May 16 22:35:55 thor kernel: [ 98.170027] [] ? = psb_intel_crtc_cursor_move+0x100/0x100 [gma500_gfx] May 16 22:35:55 thor kernel: [ 98.170066] [] = drm_mode_cursor_ioctl+0xdf/0x140 [drm] May 16 22:35:55 thor kernel: [ 98.170096] [] ? = psb_intel_crtc_cursor_move+0x100/0x100 [gma500_gfx] May 16 22:35:55 thor kernel: [ 98.170130] [] ? = drm_mode_setcrtc+0x540/0x540 [drm] May 16 22:35:55 thor kernel: [ 98.170160] [] = drm_ioctl+0x422/0x480 [drm] May 16 22:35:55 thor kernel: [ 98.170183] [] ? = wakeup_graph_return+0x43/0x70 May 16 22:35:55 thor kernel: [ 98.170217] [] ? = drm_mode_setcrtc+0x540/0x540 [drm] May 16 22:35:55 thor kernel: [ 98.170237] [] ? = wakeup_graph_return+0x43/0x70 May 16 22:35:55 thor kernel: [ 98.170256] [] ? = inotify_free_event_priv+0x14/0x20 May 16 22:35:55 thor kernel: [ 98.170273] [] ? = inotify_free_event_priv+0x14/0x20 May 16 22:35:55 thor kernel: [ 98.170290] [] ? = inotify_handle_event+0x7a/0xc0 May 16 22:35:55 thor kernel: [ 98.170306] [] ? = inotify_free_group_priv+0x50/0x50 May 16 22:35:55 thor kernel: [ 98.170324] [] ? = mntput_no_expire+0x30/0x100 May 16 22:35:55 thor kernel: [ 98.170340] [] ? = fsnotify_put_event+0x44/0x60 May 16 22:35:55 thor kernel: [ 98.170356] [] ? = fsnotify_put_event+0x44/0x60 May 16 22:35:55 thor kernel: [ 98.170385] [] = psb_unlocked_ioctl+0x35/0x80 [gma500_gfx] May 16 22:35:55 thor kernel: [ 98.170413] [] ? = psb_driver_preclose+0x10/0x10 [gma500_gfx] May 16 22:35:55 thor kernel: [ 98.170431] [] = do_vfs_ioctl+0x7a/0x560 May 16 22:35:55 thor kernel: [ 98.170449] [] ? = vfs_write+0x11f/0x160 May 16 22:35:55 thor kernel: [ 98.170465] [] ? = fget_light+0x7f/0xe0 May 16 22:35:55 thor kernel: [ 98.170480] [] sys_ioctl+0x68/0x= 80 May 16 22:35:55 thor kernel: [ 98.170498] [] = sysenter_do_call+0x12/0x28 May 16 22:35:55 thor kernel: [ 98.170515] [] ? = wakeup_graph_return+0x43/0x70 May 16 22:35:55 thor kernel: [ 98.170531] [] ? = wakeup_graph_return+0x43/0x70 May 16 22:35:55 thor kernel: [ 98.170541] Code: 2b 00 81 fb 50 04 5f c0 7= 4 = 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 0= 0 31 = db e8 ef = May 16 22:35:55 thor kernel: [ 98.170664] EIP: [] = 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