[PATCH 1/1] Adapt on_each_cpu
Hi folks, this rather trivial patch makes drm compile again on kernel = 2.6.27. It is necessary since in kernel 2.6.27 on_each_cpu (defined in include/linux/smp.h) lost the third argument (retry). What do you think? Cheers, Johannes From 5a5fb6ef609f831bd187321649c93f20294e56c5 Mon Sep 17 00:00:00 2001 From: Johannes Engel [EMAIL PROTECTED] Date: Wed, 30 Jul 2008 13:16:48 +0100 Subject: [PATCH 1/1] Adapt on_each_cpu Since kernel 2.6.27 on_each_cpu lost its retry argument Signed-off-by: Johannes Engel [EMAIL PROTECTED] --- linux-core/drm_ttm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index 80a8ff5..818809f 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -72,7 +72,11 @@ void drm_ttm_cache_flush(struct page *pages[], unsigned long num_pages) return; } #endif +#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,27)) + if (on_each_cpu(drm_ttm_ipi_handler, NULL, 1)) +#else if (on_each_cpu(drm_ttm_ipi_handler, NULL, 1, 1) != 0) +#endif DRM_ERROR(Timed out waiting for drm cache flush.\n); } EXPORT_SYMBOL(drm_ttm_cache_flush); -- 1.5.4.5 signature.asc Description: OpenPGP digital signature - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/-- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 Steve Newbury [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Comment #5 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 07:10:47 PST --- Is there a public kernel repository or a set of patches against a specific kernel that can be used for building a working drm-gem stack? -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #6 from Johannes Engel [EMAIL PROTECTED] 2008-07-30 07:14:45 PST --- Take the patches shown here against the kernel or have a look at Eric's kernel branch drm-gem at http://cgit.freedesktop.org/~anholt/linux-2.6/. For kernels from 2.6.27 you need additional patches for drm which can be found on the dri-devel mailinglist ([EMAIL PROTECTED] and [EMAIL PROTECTED]). -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #7 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 08:57:15 PST --- (In reply to comment #6) Take the patches shown here against the kernel or have a look at Eric's kernel branch drm-gem at http://cgit.freedesktop.org/~anholt/linux-2.6/. For kernels from 2.6.27 you need additional patches for drm which can be found on the dri-devel mailinglist ([EMAIL PROTECTED] and [EMAIL PROTECTED]). When building drm-gem Mesa for 32bit on amd64 I get the following failure (DRM built sucessfully with mostly the above patches): intel_ioctl.c:189: error: two or more data types in declaration specifiers intel_ioctl.c:193: error: expected identifier or '(' before '{' token gmake[5]: *** [intel_ioctl.o] Error 1 gmake[5]: *** Waiting for unfinished jobs gmake[5]: Leaving directory `/var/tmp/portage/media-libs/mesa-/work/builddir.x86/src/mesa/drivers/dri/i965' -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #8 from Johannes Engel [EMAIL PROTECTED] 2008-07-30 09:10:27 PST --- Created an attachment (id=18005) -- (http://bugs.freedesktop.org/attachment.cgi?id=18005) patch to remove double data type in declaration Try with this patch please. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #9 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 09:21:34 PST --- (In reply to comment #7) (In reply to comment #6) Take the patches shown here against the kernel or have a look at Eric's kernel branch drm-gem at http://cgit.freedesktop.org/~anholt/linux-2.6/. For kernels from 2.6.27 you need additional patches for drm which can be found on the dri-devel mailinglist ([EMAIL PROTECTED] and [EMAIL PROTECTED]). When building drm-gem Mesa for 32bit on amd64 I get the following failure (DRM built sucessfully with mostly the above patches): intel_ioctl.c:189: error: two or more data types in declaration specifiers intel_ioctl.c:193: error: expected identifier or '(' before '{' token gmake[5]: *** [intel_ioctl.o] Error 1 gmake[5]: *** Waiting for unfinished jobs gmake[5]: Leaving directory `/var/tmp/portage/media-libs/mesa-/work/builddir.x86/src/mesa/drivers/dri/i965' Looking at the code I realise I should have ttm-api enabled.. (I assumed that was only for TTM). It builds now. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #10 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 09:22:20 PST --- (In reply to comment #8) Created an attachment (id=18005) -- (http://bugs.freedesktop.org/attachment.cgi?id=18005) [details] patch to remove double data type in declaration Try with this patch please. Should I not have enabled ttm-api? -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #11 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 09:50:32 PST --- (In reply to comment #10) (In reply to comment #8) Created an attachment (id=18005) -- (http://bugs.freedesktop.org/attachment.cgi?id=18005) [details] [details] patch to remove double data type in declaration Try with this patch please. Should I not have enabled ttm-api? Without ttm-api, it still fails with: intel_ioctl.c:193: error: expected identifier or '(' before '{' token gmake[5]: *** [intel_ioctl.o] Error 1 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #12 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 10:49:56 PST --- This is against 2.6.26, but I hit the same problem last time I tried testing drm-gem Server startup fails and the kernel produces the following backtrace: Jul 30 18:00:18 infinity [drm:i915_gem_init_ringbuffer] *ERROR* Failed to map ringbuffer. Jul 30 18:00:18 infinity [ cut here ] Jul 30 18:00:18 infinity kernel BUG at /var/tmp/portage/x11-base/x11-drm-/work/drm/linux-core/drm_gem.c:378! Jul 30 18:00:18 infinity invalid opcode: [1] PREEMPT SMP Jul 30 18:00:18 infinity CPU 0 Jul 30 18:00:18 infinity Modules linked in: snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device fuse bridge llc bnep rfcomm l2cap cpufreq_ondemand acpi_cpufreq coretemp smsc47m192 hwmon_vid i915 drm tpm_tis tpm tpm_bios rfkill arc4 ecb hci_usb iwl3945 bluetooth snd_hda_intel mac80211 led_class snd_pcm firewire_ohci snd_timer firewire_core cfg80211 snd_page_alloc snd_hwdep crc_itu_t snd yenta_socket pcspkr rsrc_nonstatic tg3 pcmcia_core soundcore joydev [last unloaded: microcode] Jul 30 18:00:18 infinity Pid: 4193, comm: X Not tainted 2.6.26-gentoo-gem #3 Jul 30 18:00:18 infinity RIP: 0010:[a01620ba] [a01620ba] :drm:drm_gem_object_free+0x13/0x52 Jul 30 18:00:18 infinity RSP: 0018:810078d5fbe8 EFLAGS: 00010246 Jul 30 18:00:18 infinity RAX: 0001 RBX: 81007cca5000 RCX: Jul 30 18:00:18 infinity RDX: RSI: 0040 RDI: 81007aa00c80 Jul 30 18:00:18 infinity RBP: 81007aa00c80 R08: 806fffc0 R09: 81000101ff98 Jul 30 18:00:18 infinity R10: 000707194074 R11: 0046 R12: 81007c023d20 Jul 30 18:00:18 infinity R13: R14: 81007cca5000 R15: 81007cca3000 Jul 30 18:00:18 infinity FS: 7f2107972760() GS:80748000() knlGS: Jul 30 18:00:18 infinity CS: 0010 DS: ES: CR0: 80050033 Jul 30 18:00:18 infinity CR2: 004c65d0 CR3: 78d8f000 CR4: 06e0 Jul 30 18:00:18 infinity DR0: DR1: DR2: Jul 30 18:00:18 infinity DR3: DR6: 0ff0 DR7: 0400 Jul 30 18:00:18 infinity Process X (pid: 4193, threadinfo 810078d5e000, task 810078d4c100) Jul 30 18:00:18 infinity Stack: 0002 81007aa00c80 a01620a7 803d5129 Jul 30 18:00:18 infinity 81007cca3000 81007aa00c80 a0180a31 Jul 30 18:00:18 infinity 810078d5fde8 81007c849b40 8100799f6350 a018a648 Jul 30 18:00:18 infinity Call Trace: Jul 30 18:00:18 infinity [a01620a7] ? :drm:drm_gem_object_free+0x0/0x52 Jul 30 18:00:18 infinity [803d5129] ? kref_put+0x41/0x4c Jul 30 18:00:18 infinity [a0180a31] ? :i915:i915_gem_entervt_ioctl+0x2a5/0x3bf Jul 30 18:00:18 infinity [a018078c] ? :i915:i915_gem_entervt_ioctl+0x0/0x3bf Jul 30 18:00:18 infinity [a0153990] ? :drm:drm_unlocked_ioctl+0x19b/0x216 Jul 30 18:00:18 infinity [8038accc] ? xfs_iunlock+0x1d/0x7c Jul 30 18:00:18 infinity [803aec7f] ? xfs_write+0x6cd/0x6e8 Jul 30 18:00:18 infinity [80273532] ? handle_mm_fault+0x39c/0x759 Jul 30 18:00:18 infinity [8028bd7b] ? do_sync_write+0xce/0x113 Jul 30 18:00:18 infinity [80246a04] ? getnstimeofday+0x38/0x92 Jul 30 18:00:18 infinity [8021fe24] ? do_page_fault+0x47e/0x832 Jul 30 18:00:18 infinity [80244bfc] ? ktime_get_ts+0x21/0x4a Jul 30 18:00:18 infinity [80244c31] ? ktime_get+0xc/0x41 Jul 30 18:00:18 infinity [80228e6d] ? hrtick_start_fair+0x11a/0x164 Jul 30 18:00:18 infinity [8020a9bb] ? __switch_to+0x30c/0x31a Jul 30 18:00:18 infinity [80229b6e] ? hrtick_set+0x8b/0x10a Jul 30 18:00:18 infinity [a0153a1c] ? :drm:drm_ioctl+0x11/0x13 Jul 30 18:00:18 infinity [802979b6] ? vfs_ioctl+0x56/0x6c Jul 30 18:00:18 infinity [80297bed] ? do_vfs_ioctl+0x221/0x237 Jul 30 18:00:18 infinity [8028c6a7] ? vfs_write+0x121/0x156 Jul 30 18:00:18 infinity [80297c40] ? sys_ioctl+0x3d/0x5d Jul 30 18:00:18 infinity [8020bf0b] ? system_call_after_swapgs+0x7b/0x80 Jul 30 18:00:18 infinity Jul 30 18:00:18 infinity Jul 30 18:00:18 infinity Code: e8 54 30 27 e0 48 c7 c6 a7 20 16 a0 48 89 df e8 45 30 27 e0 31 c0 5b c3 55 48 89 fd 53 48 83 ec 08 48 8b 5f 08 83 7b 28 01 75 04 0f 0b eb fe 48 8b 83 20 04 00 00 48 8b 80 10 01 00 00 48 85 c0 Jul 30 18:00:18 infinity RIP [a01620ba] :drm:drm_gem_object_free+0x13/0x52 Jul 30 18:00:18 infinity RSP 810078d5fbe8 Jul 30 18:00:18 infinity ---[ end trace d16fb1b1e78fea46 ]--- Jul 30 18:00:18 infinity [drm:drm_release] *ERROR* Device busy: 1 0 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #13 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 10:57:08 PST --- (In reply to comment #12) This is against 2.6.26, but I hit the same problem last time I tried testing drm-gem i965GM (Dell Lattidude D830) -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16474] [drm-gem] kernel modules fail to build against 2.6.26-rc7
http://bugs.freedesktop.org/show_bug.cgi?id=16474 --- Comment #14 from Steve Newbury [EMAIL PROTECTED] 2008-07-30 10:59:13 PST --- (In reply to comment #13) (In reply to comment #12) This is against 2.6.26, but I hit the same problem last time I tried testing drm-gem i965GM (Dell Lattidude D830) That would be Latitude! I don't know happened there! :) -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 1/1] Adapt on_each_cpu
On Wed, Jul 30, 2008 at 8:19 AM, Johannes Engel [EMAIL PROTECTED] wrote: Hi folks, this rather trivial patch makes drm compile again on kernel = 2.6.27. It is necessary since in kernel 2.6.27 on_each_cpu (defined in include/linux/smp.h) lost the third argument (retry). What do you think? We try to keep #ifdef's out of the code and in drm_compat.h instead. Something like #if linuxversion = 2.6.27 #define drm_on_each_cpu(handler, data, wait) ... #else ... #endif and then just user drm_on_each_cpu in the code. thanks, Kristian - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 1/1] Adapt on_each_cpu
What do you think? We try to keep #ifdef's out of the code and in drm_compat.h instead. Something like #if linuxversion = 2.6.27 #define drm_on_each_cpu(handler, data, wait) ... #else ... #endif and then just user drm_on_each_cpu in the code. I'd prefer not to do that at all, it makes upstream merging a lot messier. The ifdefs make life easier as I have a script to remove them :) Dave. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: Replace nopfn by fault
Wow, there are a lot ifdefs in the code. Exactly what I was thinking when I saw the patch. ;) But I was too lazy to think for a solution. Thanks for doing that for me. :) Here comes the result. Thanks for looking at this, but I dislike both of these ideas, I'll just move the old nopfn code to drm_compat.c add fault code into drm_vm.c Yes we get code duplication, but other things just mess up clean merges upstream. Dave. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16593] [vblank]buffer swap is some time too slow when run with vblank_mode=2
http://bugs.freedesktop.org/show_bug.cgi?id=16593 liuhaien [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 16593] [vblank]buffer swap is some time too slow when run with vblank_mode=2
http://bugs.freedesktop.org/show_bug.cgi?id=16593 liuhaien [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #7 from liuhaien [EMAIL PROTECTED] 2008-07-30 22:41:19 PST --- verified. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel