[Bug 27339] Problem with stale cliprects from the classic r300 in r300g
http://bugs.freedesktop.org/show_bug.cgi?id=27339 --- Comment #6 from Mathias Fröhlich mathias.froehl...@web.de 2010-03-28 00:34:50 PST --- Works with your checkin. Thanks! Mathias -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27339] Problem with stale cliprects from the classic r300 in r300g
http://bugs.freedesktop.org/show_bug.cgi?id=27339 Marek Olšák mar...@gmail.com changed: What|Removed |Added Status|RESOLVED|CLOSED -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Signalling no-audio for HDMI
Hi, I got this working previously but it somehow stopped working. My setup: - Acer TravelMate 6592 - DVI output with DVI-HDMI converter - Philips Full-HD LCD-TV The laptop runs Debian testing with a self-compiled linux-2.6.33 with radeon+firmware compiled-in. The laptop cannot do audio over the HDMI line, I use a seperate stereo cable for this. This is the proposed way from the TV manual when audio-over-hdmi is not possible. And that used to work just fine (at the time of 2.6.33-rc8, I wrote to this list at that time) but fails with latest version of libdrm (2.4.18) and xserver-xorg-vide-radeon (6.12.192 + patches up to git 5c256808, the current Debian package). I use the following kernel command line: radeon.modeset=1 radeon.audio=0 radeon.dynclks=1 Especially, audio=0 signals the TV that the audio comes over the seperate cable. This is what was working and is not working anymore. Strangely, the available resolutions changed: the old drivers didn't find the 1080p resolutions when the TV was connected while X was running. This is now working with even more refresh rates (50/60/24). There was also a resolution of 1366x768 which is not in the list anymore, only 1360x765. Working combination (but DRI disabled due to massive instabilities): linux-2.6.33-rc8, libdrm-2.4.16, radeon from git20101011 Not working: linux-2.6.33, libdrm-2.4.18, radeon-6.12.192 Any ideas? Thanks, HS PS: Please CC me on answers, I am not subscribed -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: intel graphic card hanging (Hangcheck timer elapsed... GPU hung)
On sobota, 27 marca 2010 o 17:11:05 Norbert Preining wrote: Dear all, (please Cc) [Added more CCs] Similar: http://marc.info/?l=linux-kernelm=126954749618319w=2 I am running 2.6.34-rc2 + git 01e7770 commit (yesterday) with KMS on Debian/sid: xserver-xorg: 7.5+5 video-intel: 2.9.1-3 Running D2X-xl (self compiled) (descent2 open source code) X suddenly died, and after that gdm could not be restarted because after a few secs it went dead again. In the logs I see: kernel: [ 2486.341227] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung kernel: [ 2486.341240] render error detected, EIR: 0x kernel: [ 2486.341278] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 113671 at 113604) kernel: [ 2486.669008] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung kernel: [ 2486.669012] render error detected, EIR: 0x kernel: [ 2486.669522] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 113672 at 113604) kernel: [ 2487.524230] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung kernel: [ 2487.524243] render error detected, EIR: 0x kernel: [ 2487.524284] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 113673 at 113604) kernel: [ 2487.912237] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung kernel: [ 2487.916175] render error detected, EIR: 0x kernel: [ 2487.920137] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request returns -5 (awaiting 113674 at 113604) Stopping gdm and restarting didn't help to get the graphics card back to normal. If you have any ideas how to fix/track/debug that please let me know, same if you need more information. Best wishes Norbert Norbert Preiningprein...@{jaist.ac.jp, logic.at, debian.org} JAIST, JapanTU Wien, Austria Debian TeX Task Force DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 HUCKNALL (vb.) To crouch upwards: as in the movement of a seated person's feet and legs made in order to allow a cleaner's hoover to pass beneath them. --- Douglas Adams, The Meaning of Liff -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- Maciej Rutecki http://www.maciek.unixy.pl -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[patch] via: off by one issue
fx-lock is used as the index in dev_priv-decoder_queue[fx-lock] which is an array of VIA_NR_XVMC_LOCKS elements. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c index 6ec04ac..6efac81 100644 --- a/drivers/gpu/drm/via/via_video.c +++ b/drivers/gpu/drm/via/via_video.c @@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_ DRM_DEBUG(\n); - if (fx-lock VIA_NR_XVMC_LOCKS) + if (fx-lock = VIA_NR_XVMC_LOCKS) return -EFAULT; lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx-lock); -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[patch] radeon: range check issues
This change makes the array larger, MAX_SUPPORTED_TV_TIMING_V1_2 is 3 and the original size MAX_SUPPORTED_TV_TIMING is 2. Also there were checks that were off by one. Signed-off-by: Dan Carpenter erro...@gmail.com --- Compile tested only. Changing the array size seemed like the right thing to do, in the context, but please review carefully. diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 6732b5d..27e2c71 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h @@ -2912,7 +2912,7 @@ typedef struct _ATOM_ANALOG_TV_INFO_V1_2 UCHARucTV_BootUpDefaultStandard; UCHARucExt_TV_ASIC_ID; UCHARucExt_TV_ASIC_SlaveAddr; - ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING]; + ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2]; }ATOM_ANALOG_TV_INFO_V1_2; typedef struct _ATOM_DPCD_INFO diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 93783b1..bdc0ab3 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -1275,7 +1275,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, switch (crev) { case 1: tv_info = (ATOM_ANALOG_TV_INFO *)(mode_info-atom_context-bios + data_offset); - if (index MAX_SUPPORTED_TV_TIMING) + if (index = MAX_SUPPORTED_TV_TIMING) return false; mode-crtc_htotal = le16_to_cpu(tv_info-aModeTimings[index].usCRTC_H_Total); @@ -1313,7 +1313,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, break; case 2: tv_info_v1_2 = (ATOM_ANALOG_TV_INFO_V1_2 *)(mode_info-atom_context-bios + data_offset); - if (index MAX_SUPPORTED_TV_TIMING_V1_2) + if (index = MAX_SUPPORTED_TV_TIMING_V1_2) return false; dtd_timings = tv_info_v1_2-aModeTimings[index]; -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
drm_edid: potential range checking issue?
Hi list, :) Just going through some Smatch warnings. drivers/gpu/drm/drm_edid.c +1032 add_detailed_modes() 'data-data.timings' 5 = 5 1027 /* Six modes per detailed section */ 1028 for (i = 0; i 6; i++) { 1029 struct std_timing *std; 1030 struct drm_display_mode *newmode; 1031 1032 std = data-data.timings[i]; ^^ In include/drm/drm_edid.h this array has 5 elements not 6. struct detailed_non_pixel { u8 pad1; u8 type; /* ff=serial, fe=string, fd=monitor range, fc=monitor name fb=color point data, fa=standard timing data, f9=undefined, f8=mfg. reserved */ u8 pad2; union { struct detailed_data_string str; struct detailed_data_monitor_range range; struct detailed_data_wpindex color; struct std_timing timings[5]; ^ struct cvt_timing cvt[4]; } data; } __attribute__((packed)); regards, dan carpenter -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[patch] drm: fix check for end of loop
agpmem is never NULL here. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index e4865f9..7732268 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -77,7 +77,7 @@ static void *agp_remap(unsigned long offset, unsigned long size, (agpmem-bound + (agpmem-pages PAGE_SHIFT)) = (offset + size)) break; - if (!agpmem) + if (agpmem-head == dev-agp-memory) return NULL; /* -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[patch] drm: sysfs files error handling
In the original code we used j as an iterator but we used i as an index. - for (j = 0; j i; j++) - device_remove_file(connector-kdev, - connector_attrs[i]); Smatch complained about that because i was potentially passed the end of the array. Which makes sense if we should be using j there. I also thought that we should remove the files for connector_attrs_opt1 but to do that I had to add separate iterators for connector_attrs and connector_attrs_opt1. Signed-off-by: Dan Carpenter erro...@gmail.com --- Found by static analysis and compile tested only. diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 014ce24..f144487 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -353,7 +353,10 @@ static struct bin_attribute edid_attr = { int drm_sysfs_connector_add(struct drm_connector *connector) { struct drm_device *dev = connector-dev; - int ret = 0, i, j; + int attr_cnt = 0; + int opt_cnt = 0; + int i; + int ret = 0; /* We shouldn't get called more than once for the same connector */ BUG_ON(device_is_registered(connector-kdev)); @@ -376,8 +379,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector) /* Standard attributes */ - for (i = 0; i ARRAY_SIZE(connector_attrs); i++) { - ret = device_create_file(connector-kdev, connector_attrs[i]); + for (attr_cnt = 0; attr_cnt ARRAY_SIZE(connector_attrs); attr_cnt++) { + ret = device_create_file(connector-kdev, connector_attrs[attr_cnt]); if (ret) goto err_out_files; } @@ -393,8 +396,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector) case DRM_MODE_CONNECTOR_SVIDEO: case DRM_MODE_CONNECTOR_Component: case DRM_MODE_CONNECTOR_TV: - for (i = 0; i ARRAY_SIZE(connector_attrs_opt1); i++) { - ret = device_create_file(connector-kdev, connector_attrs_opt1[i]); + for (opt_cnt = 0; opt_cnt ARRAY_SIZE(connector_attrs_opt1); opt_cnt++) { + ret = device_create_file(connector-kdev, connector_attrs_opt1[opt_cnt]); if (ret) goto err_out_files; } @@ -413,10 +416,10 @@ int drm_sysfs_connector_add(struct drm_connector *connector) return 0; err_out_files: - if (i 0) - for (j = 0; j i; j++) - device_remove_file(connector-kdev, - connector_attrs[i]); + for (i = 0; i opt_cnt; i++) + device_remove_file(connector-kdev, connector_attrs_opt1[i]); + for (i = 0; i attr_cnt; i++) + device_remove_file(connector-kdev, connector_attrs[i]); device_unregister(connector-kdev); out: -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27221] Big 3D performance regression and broken textures on R200
http://bugs.freedesktop.org/show_bug.cgi?id=27221 --- Comment #8 from Ondrej Zary li...@rainbow-software.org 2010-03-28 05:31:53 PST --- Downgrading X server to 1.6.3 and radeon driver to 6.12.2 (while keeping mesa 7.7) fixes the performance but not the textures. So there are two bugs, not just one. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: mga drm compiled into kernel crashes hibernation
On Sat, 27 Mar 2010, Piotr Gluszenia Slawinski wrote: On Sat, 27 Mar 2010, Piotr Gluszenia Slawinski wrote: kernel 2.6.32-tuxonice-r5 with matrox drm component compiled into kernel - hibernation halts at 'doing atomic copyrestore' compiled as module - works fine. actually does not work fine. trying to run any glx app after un-hibernating results in locking of X and constant printout of [drm:drm_lock_take] *ERROR* 1 holds heavyweight lock to system log. killing X with signal 9 is possible then, but X do not restart : old , unchanged data pops-up back after restart, and one cannot move mouse nor press keys. also if one disables DRI (naively hoping this will somewhat help) machine fails to un-hibernate no matter what. *sigh*. p.s. i've did some more dumpster diving and i've got nvidia riva tnt2. suprisingly it works fine (except 3d, as it's 'legacy' drivers do not compile anymore, so using 'nv' driver) p.s.2 - can't those non-functional cards being masked in portage? as i smell that they will not be fixed anywhere in future... it is a bit confusing to user when he gets stunning choice of totally bitrot drivers... also for users of those old devices - perhaps some 'good, old, and verified to work' Xorg/X11 builds overlay could be handy? i.e. the matrox card works fine (did not checked hibernation though, but at least 3d works) with knoppix 6.2 (so not so long ago) savage works with Xorg 1.4 (also with 3d...) and stuff like riva tnt2 also had it's working Xorg+drivers pair somewhere in history AFAIR. this would make also bisecting to point where drivers got broken esier, which would allow at least drawing some sketch TODO for brave ones willing to fix the drivers in future... greetings -- -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27221] Big 3D performance regression and broken textures on R200
http://bugs.freedesktop.org/show_bug.cgi?id=27221 --- Comment #9 from Ondrej Zary li...@rainbow-software.org 2010-03-28 06:15:01 PST --- 6.12.3 (with X server 1.6.3) is OK, 6.12.4 (with X server 1.7.5) is bad. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH 1/2] drm/radeon/bo: add some fallback placements for VRAM only objects.
On Fri, 2010-03-26 at 19:20 +0100, Michel Dänzer wrote: On Thu, 2010-03-25 at 19:56 +1000, Dave Airlie wrote: 2010/3/25 Michel Dänzer mic...@daenzer.net: On Fri, 2010-03-19 at 10:35 +1000, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com On constrained r100 systems compiz would fail to start due to a lack of memory, we can just fallback place the objects rather than completely failing it works a lot better. Signed-off-by: Dave Airlie airl...@redhat.com This change seems to trigger or at least greatly expedite GPU lockups on my PowerBook. With the change applied, my normal X session locked up the GPU after just a few minutes several times. Now with it reverted it's back to the previous stability. Care to try in pci mode? see if helps, it might be just straining AGP a bit more, maybe try 1x as well if you aren't already in it. After various more tests, the gist of it seems to be that rendering to GTT with the 3D engine tends to lock up whereas the 2D and DMA engines work fine (otherwise I probably would have run into this a long time ago at BO eviction time). Maybe some kind of synchronization issue resulting in the 3D engine trying to access GTT memory which isn't bound yet / anymore? I think I've confirmed this theory by changing the AGP driver to bind the AGP scratch page instead of really unbinding a GTT entry. That prevents the lockups from occurring. Even so though, this change hurts performance, presumably because BOs evicted from VRAM (or not going in in the first place) aren't getting (back) in. -- Earthling Michel Dänzer |http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 2/7] drm/ttm: Add debugfs output entry to pool allocator.
ttm_page_alloc_debugfs can be registered to output the state of pools. Debugfs file will output number of pages freed from the pool, number of pages in pool now and the lowes number of pages in pool since previous shrink. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 45 - include/drm/ttm/ttm_page_alloc.h |4 +++ 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 5029fd0..7b087ff 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -34,6 +34,7 @@ #include linux/spinlock.h #include linux/highmem.h #include linux/mm_types.h +#include linux/module.h #include linux/mm.h #include asm/atomic.h @@ -66,6 +67,9 @@ struct ttm_page_pool { struct list_headlist; int gfp_flags; unsignednpages; + char*name; + unsigned long nfrees; + unsigned long nrefills; }; struct ttm_pool_opts { @@ -190,6 +194,7 @@ static void ttm_pool_update_free_locked(struct ttm_page_pool *pool, unsigned freed_pages) { pool-npages -= freed_pages; + pool-nfrees += freed_pages; } /** @@ -257,7 +262,6 @@ restart: } } - /* remove range of pages from the pool */ if (freed_pages) { __list_del(p-lru, pool-list); @@ -484,6 +488,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool, if (!r) { list_splice(new_pages, pool-list); + ++pool-nrefills; pool-npages += alloc_size; } else { printk(KERN_ERR [ttm] Failed to fill pool (%p)., pool); @@ -657,13 +662,15 @@ void ttm_put_pages(struct list_head *pages, unsigned page_count, int flags, ttm_page_pool_free(pool, page_count); } -static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, int flags) +static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, int flags, + char *name) { spin_lock_init(pool-lock); pool-fill_lock = false; INIT_LIST_HEAD(pool-list); - pool-npages = 0; + pool-npages = pool-nfrees = 0; pool-gfp_flags = flags; + pool-name = name; } int ttm_page_alloc_init(unsigned max_pages) @@ -673,13 +680,15 @@ int ttm_page_alloc_init(unsigned max_pages) printk(KERN_INFO [ttm] Initializing pool allocator.\n); - ttm_page_pool_init_locked(_manager.wc_pool, GFP_HIGHUSER); + ttm_page_pool_init_locked(_manager.wc_pool, GFP_HIGHUSER, wc); - ttm_page_pool_init_locked(_manager.uc_pool, GFP_HIGHUSER); + ttm_page_pool_init_locked(_manager.uc_pool, GFP_HIGHUSER, uc); - ttm_page_pool_init_locked(_manager.wc_pool_dma32, GFP_USER | GFP_DMA32); + ttm_page_pool_init_locked(_manager.wc_pool_dma32, GFP_USER | GFP_DMA32, + wc dma); - ttm_page_pool_init_locked(_manager.uc_pool_dma32, GFP_USER | GFP_DMA32); + ttm_page_pool_init_locked(_manager.uc_pool_dma32, GFP_USER | GFP_DMA32, + uc dma); _manager.options.max_size = max_pages; _manager.options.small = SMALL_ALLOCATION; @@ -703,3 +712,25 @@ void ttm_page_alloc_fini() for (i = 0; i NUM_POOLS; ++i) ttm_page_pool_free(_manager.pools[i], FREE_ALL_PAGES); } + +int ttm_page_alloc_debugfs(struct seq_file *m, void *data) +{ + struct ttm_page_pool *p; + unsigned i; + char *h[] = {pool, refills, pages freed, size}; + if (atomic_read(_manager.page_alloc_inited) == 0) { + seq_printf(m, No pool allocator running.\n); + return 0; + } + seq_printf(m, %6s %12s %13s %8s\n, + h[0], h[1], h[2], h[3]); + for (i = 0; i NUM_POOLS; ++i) { + p = _manager.pools[i]; + + seq_printf(m, %6s %12ld %13ld %8d\n, + p-name, p-nrefills, + p-nfrees, p-npages); + } + return 0; +} +EXPORT_SYMBOL(ttm_page_alloc_debugfs); diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index b12..99bbe03 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h @@ -67,4 +67,8 @@ int ttm_page_alloc_init(unsigned max_pages); */ void ttm_page_alloc_fini(void); +/** + * Output the state of pools to debugfs file + */ +extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data); #endif -- 1.7.0 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications
[PATCH 4/7] drm/nouveau: Add ttm page pool debugfs file.
ttm_page_pool file is hooked ttm_page_alloc_debugfs for pool allocator state. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/nouveau/nouveau_debugfs.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 8ff9ef5..59416c8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -33,6 +33,8 @@ #include drmP.h #include nouveau_drv.h +#include ttm/ttm_page_alloc.h + static int nouveau_debugfs_channel_info(struct seq_file *m, void *data) { @@ -160,6 +162,7 @@ static struct drm_info_list nouveau_debugfs_list[] = { { chipset, nouveau_debugfs_chipset_info, 0, NULL }, { memory, nouveau_debugfs_memory_info, 0, NULL }, { vbios.rom, nouveau_debugfs_vbios_image, 0, NULL }, + { ttm_page_pool, ttm_page_alloc_debugfs, 0, NULL }, }; #define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list) -- 1.7.0 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 3/7] drm/radeon/kms: Add ttm page pool debugfs file.
ttm_page_pool file is hooked ttm_page_alloc_debugfs for pool allocator state. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/radeon_ttm.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 43c5ab3..fc787e8 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -33,6 +33,7 @@ #include ttm/ttm_bo_driver.h #include ttm/ttm_placement.h #include ttm/ttm_module.h +#include ttm/ttm_page_alloc.h #include drm/drmP.h #include drm/radeon_drm.h #include linux/seq_file.h @@ -744,8 +745,8 @@ static int radeon_mm_dump_table(struct seq_file *m, void *data) static int radeon_ttm_debugfs_init(struct radeon_device *rdev) { #if defined(CONFIG_DEBUG_FS) - static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES]; - static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES][32]; + static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES+1]; + static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES+1][32]; unsigned i; for (i = 0; i RADEON_DEBUGFS_MEM_TYPES; i++) { @@ -762,7 +763,13 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev) radeon_mem_types_list[i].data = rdev-mman.bdev.man[TTM_PL_TT].manager; } - return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES); + /* Add ttm page pool to debugfs */ + sprintf(radeon_mem_types_names[i], ttm_page_pool); + radeon_mem_types_list[i].name = radeon_mem_types_names[i]; + radeon_mem_types_list[i].show = ttm_page_alloc_debugfs; + radeon_mem_types_list[i].driver_features = 0; + radeon_mem_types_list[i].data = NULL; + return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES+1); #endif return 0; -- 1.7.0 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 5/7] arch/x86: Add array variants for setting memory to wc caching.
Setting single memory pages at a time to wc takes a lot time in cache flush. To reduce number of cache flush set_pages_array_wc and set_memory_array_wc can be used to set multiple pages to WC with single cache flush. This improves allocation performance for wc cached pages in drm/ttm. CC: Suresh Siddha suresh.b.sid...@intel.com CC: Venkatesh Pallipadi venkatesh.pallip...@gmail.com Signed-off-by: Pauli Nieminen suok...@gmail.com --- arch/x86/include/asm/cacheflush.h |2 + arch/x86/mm/pageattr.c| 53 +++- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h index 634c40a..d92d63a 100644 --- a/arch/x86/include/asm/cacheflush.h +++ b/arch/x86/include/asm/cacheflush.h @@ -139,9 +139,11 @@ int set_memory_np(unsigned long addr, int numpages); int set_memory_4k(unsigned long addr, int numpages); int set_memory_array_uc(unsigned long *addr, int addrinarray); +int set_memory_array_wc(unsigned long *addr, int addrinarray); int set_memory_array_wb(unsigned long *addr, int addrinarray); int set_pages_array_uc(struct page **pages, int addrinarray); +int set_pages_array_wc(struct page **pages, int addrinarray); int set_pages_array_wb(struct page **pages, int addrinarray); /* diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index cf07c26..0c98a75 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -997,7 +997,8 @@ out_err: } EXPORT_SYMBOL(set_memory_uc); -int set_memory_array_uc(unsigned long *addr, int addrinarray) +int _set_memory_array(unsigned long *addr, int addrinarray, + unsigned long new_type) { int i, j; int ret; @@ -1007,13 +1008,19 @@ int set_memory_array_uc(unsigned long *addr, int addrinarray) */ for (i = 0; i addrinarray; i++) { ret = reserve_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE, - _PAGE_CACHE_UC_MINUS, NULL); + new_type, NULL); if (ret) goto out_free; } ret = change_page_attr_set(addr, addrinarray, __pgprot(_PAGE_CACHE_UC_MINUS), 1); + + if (!ret new_type == _PAGE_CACHE_WC) + ret = change_page_attr_set_clr(addr, addrinarray, + __pgprot(_PAGE_CACHE_WC), + __pgprot(_PAGE_CACHE_MASK), + 0, CPA_ARRAY, NULL); if (ret) goto out_free; @@ -1025,8 +1032,19 @@ out_free: return ret; } + +int set_memory_array_uc(unsigned long *addr, int addrinarray) +{ + return _set_memory_array(addr, addrinarray, _PAGE_CACHE_UC_MINUS); +} EXPORT_SYMBOL(set_memory_array_uc); +int set_memory_array_wc(unsigned long *addr, int addrinarray) +{ + return _set_memory_array(addr, addrinarray, _PAGE_CACHE_WC); +} +EXPORT_SYMBOL(set_memory_array_wc); + int _set_memory_wc(unsigned long addr, int numpages) { int ret; @@ -1153,26 +1171,34 @@ int set_pages_uc(struct page *page, int numpages) } EXPORT_SYMBOL(set_pages_uc); -int set_pages_array_uc(struct page **pages, int addrinarray) +static int _set_pages_array(struct page **pages, int addrinarray, + unsigned long new_type) { unsigned long start; unsigned long end; int i; int free_idx; + int ret; for (i = 0; i addrinarray; i++) { if (PageHighMem(pages[i])) continue; start = page_to_pfn(pages[i]) PAGE_SHIFT; end = start + PAGE_SIZE; - if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL)) + if (reserve_memtype(start, end, new_type, NULL)) goto err_out; } - if (cpa_set_pages_array(pages, addrinarray, - __pgprot(_PAGE_CACHE_UC_MINUS)) == 0) { - return 0; /* Success */ - } + ret = cpa_set_pages_array(pages, addrinarray, + __pgprot(_PAGE_CACHE_UC_MINUS)); + if (!ret new_type == _PAGE_CACHE_WC) + ret = change_page_attr_set_clr(NULL, addrinarray, + __pgprot(_PAGE_CACHE_WC), + __pgprot(_PAGE_CACHE_MASK), + 0, CPA_PAGES_ARRAY, pages); + if (ret) + goto err_out; + return 0; /* Success */ err_out: free_idx = i; for (i = 0; i free_idx; i++) { @@ -1184,8 +1210,19 @@ err_out: } return -EINVAL; } + +int set_pages_array_uc(struct page **pages, int addrinarray) +{ + return _set_pages_array(pages, addrinarray, _PAGE_CACHE_UC_MINUS); +} EXPORT_SYMBOL(set_pages_array_uc); +int
[PATCH 6/7] drm/ttm: Use set_pages_array_wc instead of set_memory_wc.
Using single call to set multiple pages to wc reduces number of expensive cache flushes. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 7b087ff..716b400 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -113,17 +113,7 @@ static struct ttm_pool_manager _manager = { .page_alloc_inited = ATOMIC_INIT(0) }; -#ifdef CONFIG_X86 -/* TODO: add this to x86 like _uc, this version here is inefficient */ -static int set_pages_array_wc(struct page **pages, int addrinarray) -{ - int i; - - for (i = 0; i addrinarray; i++) - set_memory_wc((unsigned long)page_address(pages[i]), 1); - return 0; -} -#else +#ifndef CONFIG_X86 static int set_pages_array_wb(struct page **pages, int addrinarray) { #ifdef TTM_HAS_AGP -- 1.7.0 -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH 7/7] drm/ttm: Add sysfs interface to control pool allocator.
Sysfs interface allows user to configure pool allocator functionality and change limits for the size of pool. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/ttm/ttm_memory.c |2 +- drivers/gpu/drm/ttm/ttm_page_alloc.c | 113 +- include/drm/ttm/ttm_page_alloc.h |2 +- 3 files changed, 114 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 72f31aa..7c0309f 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -395,7 +395,7 @@ int ttm_mem_global_init(struct ttm_mem_global *glob) Zone %7s: Available graphics memory: %llu kiB.\n, zone-name, (unsigned long long) zone-max_mem 10); } - ttm_page_alloc_init(glob-zone_kernel-max_mem/(2*PAGE_SIZE)); + ttm_page_alloc_init(glob, glob-zone_kernel-max_mem/(2*PAGE_SIZE)); return 0; out_no_zone: ttm_mem_global_release(glob); diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 716b400..9bfe513 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -72,6 +72,12 @@ struct ttm_page_pool { unsigned long nrefills; }; +/** + * Limits for the pool. They are handled without locks because only place where + * they may change is in sysfs store. They won't have immediate effect anyway + * so forcing serialiazation to access them is pointless. + */ + struct ttm_pool_opts { unsignedalloc_size; unsignedmax_size; @@ -94,6 +100,7 @@ struct ttm_pool_opts { * @pools: All pool objects in use. **/ struct ttm_pool_manager { + struct kobject kobj; struct shrinker mm_shrink; atomic_tpage_alloc_inited; struct ttm_pool_optsoptions; @@ -109,6 +116,100 @@ struct ttm_pool_manager { }; }; +static struct attribute ttm_page_pool_max = { + .name = pool_max_size, + .mode = S_IRUGO | S_IWUSR +}; +static struct attribute ttm_page_pool_small = { + .name = pool_small_allocation, + .mode = S_IRUGO | S_IWUSR +}; +static struct attribute ttm_page_pool_alloc_size = { + .name = pool_allocation_size, + .mode = S_IRUGO | S_IWUSR +}; + +static struct attribute *ttm_pool_attrs[] = { + ttm_page_pool_max, + ttm_page_pool_small, + ttm_page_pool_alloc_size, + NULL +}; + +static void ttm_pool_kobj_release(struct kobject *kobj) +{ + struct ttm_pool_manager *m = + container_of(kobj, struct ttm_pool_manager, kobj); + (void)m; +} + +static ssize_t ttm_pool_store(struct kobject *kobj, + struct attribute *attr, const char *buffer, size_t size) +{ + struct ttm_pool_manager *m = + container_of(kobj, struct ttm_pool_manager, kobj); + int chars; + unsigned val; + chars = sscanf(buffer, %u, val); + if (chars == 0) + return size; + + /* Convert kb to number of pages */ + val = val / (PAGE_SIZE 10); + + if (attr == ttm_page_pool_max) + m-options.max_size = val; + else if (attr == ttm_page_pool_small) + m-options.small = val; + else if (attr == ttm_page_pool_alloc_size) { + if (val NUM_PAGES_TO_ALLOC*8) { + printk(KERN_ERR [ttm] Setting allocation size to %lu + is not allowed. Recomended size is + %lu\n, + NUM_PAGES_TO_ALLOC*(PAGE_SIZE 7), + NUM_PAGES_TO_ALLOC*(PAGE_SIZE 10)); + return size; + } else if (val NUM_PAGES_TO_ALLOC) { + printk(KERN_WARNING [ttm] Setting allocation size to + larger than %lu is not recomended.\n, + NUM_PAGES_TO_ALLOC*(PAGE_SIZE 10)); + } + m-options.alloc_size = val; + } + + return size; +} + +static ssize_t ttm_pool_show(struct kobject *kobj, + struct attribute *attr, char *buffer) +{ + struct ttm_pool_manager *m = + container_of(kobj, struct ttm_pool_manager, kobj); + unsigned val = 0; + + if (attr == ttm_page_pool_max) + val = m-options.max_size; + else if (attr == ttm_page_pool_small) + val = m-options.small; + else if (attr == ttm_page_pool_alloc_size) + val = m-options.alloc_size; + + val = val * (PAGE_SIZE 10); + + return snprintf(buffer, PAGE_SIZE, %u\n, val); +} + +static const struct sysfs_ops ttm_pool_sysfs_ops = { + .show = ttm_pool_show, + .store = ttm_pool_store, +}; + +static struct kobj_type ttm_pool_kobj_type = { +
[PATCH 1/7] drm/ttm: add pool wc/uc page allocator V2
On AGP system we might allocate/free routinely uncached or wc memory, changing page from cached (wb) to uc or wc is very expensive and involves a lot of flushing. To improve performance this allocator use a pool of uc,wc pages. Pools are protected with spinlocks to allow multiple threads to allocate pages simultanously. Expensive operations are done outside of spinlock to maximize concurrency. Pools are linked lists of pages that were recently freed. mm shrink callback allows kernel to claim back pages when they are required for something else. Fixes: * set_pages_array_wb handles highmem pages so we don't have to remove them from pool. * Add count parameter to ttm_put_pages to avoid looping in free code. * Change looping from _safe to normal in pool fill error path. * Initialize sum variable and make the loop prettier in get_num_unused_pages Based on Jerome Glisse's and Dave Airlie's pool allocator. Signed-off-by: Jerome Glisse jgli...@redhat.com Signed-off-by: Dave Airlie airl...@redhat.com Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/ttm/Makefile |2 +- drivers/gpu/drm/ttm/ttm_memory.c |7 +- drivers/gpu/drm/ttm/ttm_page_alloc.c | 705 ++ drivers/gpu/drm/ttm/ttm_tt.c | 44 +-- include/drm/ttm/ttm_page_alloc.h | 70 5 files changed, 803 insertions(+), 25 deletions(-) create mode 100644 drivers/gpu/drm/ttm/ttm_page_alloc.c create mode 100644 include/drm/ttm/ttm_page_alloc.h diff --git a/drivers/gpu/drm/ttm/Makefile b/drivers/gpu/drm/ttm/Makefile index 1e138f5..4256e20 100644 --- a/drivers/gpu/drm/ttm/Makefile +++ b/drivers/gpu/drm/ttm/Makefile @@ -4,6 +4,6 @@ ccflags-y := -Iinclude/drm ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \ ttm_bo_util.o ttm_bo_vm.o ttm_module.o ttm_global.o \ - ttm_object.o ttm_lock.o ttm_execbuf_util.o + ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o obj-$(CONFIG_DRM_TTM) += ttm.o diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index eb143e0..72f31aa 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -27,6 +27,7 @@ #include ttm/ttm_memory.h #include ttm/ttm_module.h +#include ttm/ttm_page_alloc.h #include linux/spinlock.h #include linux/sched.h #include linux/wait.h @@ -394,6 +395,7 @@ int ttm_mem_global_init(struct ttm_mem_global *glob) Zone %7s: Available graphics memory: %llu kiB.\n, zone-name, (unsigned long long) zone-max_mem 10); } + ttm_page_alloc_init(glob-zone_kernel-max_mem/(2*PAGE_SIZE)); return 0; out_no_zone: ttm_mem_global_release(glob); @@ -406,6 +408,9 @@ void ttm_mem_global_release(struct ttm_mem_global *glob) unsigned int i; struct ttm_mem_zone *zone; + /* let the page allocator first stop the shrink work. */ + ttm_page_alloc_fini(); + flush_workqueue(glob-swap_queue); destroy_workqueue(glob-swap_queue); glob-swap_queue = NULL; @@ -413,7 +418,7 @@ void ttm_mem_global_release(struct ttm_mem_global *glob) zone = glob-zones[i]; kobject_del(zone-kobj); kobject_put(zone-kobj); - } + } kobject_del(glob-kobj); kobject_put(glob-kobj); } diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c new file mode 100644 index 000..5029fd0 --- /dev/null +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -0,0 +1,705 @@ +/* + * Copyright (c) Red Hat Inc. + + * 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 limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * 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 + * next paragraph) shall be included in all copies or substantial portions + * of the 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS 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. + * + * Authors: Dave Airlie airl...@redhat.com + * Jerome Glisse jgli...@redhat.com + * Pauli Nieminen suok...@gmail.com + */ + +/* simple list based uncached page pool + * - Pool collects resently freed pages for reuse + *
Re: [Intel-gfx] [PATCH 2/7] drm: delay vblank cleanup until after driver unload
On Fri, Mar 26, 2010 at 7:07 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload paths, so don't clean up the vblank related structures until after driver unload. I haven't tested this specific patch on a recent DRM, but I made the same patch a while ago, and it fixed module unload for me. I sent it to the list and it fell through the cracks, because vblank is hard or something. Reviewed-by: Kristian Høgsberg k...@bitplanet.net Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org --- drivers/gpu/drm/drm_stub.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index ad73e14..543e79c 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -515,8 +515,6 @@ void drm_put_dev(struct drm_device *dev) } driver = dev-driver; - drm_vblank_cleanup(dev); - drm_lastclose(dev); if (drm_core_has_MTRR(dev) drm_core_has_AGP(dev) @@ -536,6 +534,8 @@ void drm_put_dev(struct drm_device *dev) dev-agp = NULL; } + drm_vblank_cleanup(dev); + list_for_each_entry_safe(r_list, list_temp, dev-maplist, head) drm_rmmap(dev, r_list-map); drm_ht_remove(dev-map_hash); -- 1.6.1.3 ___ Intel-gfx mailing list intel-...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [Intel-gfx] [PATCH 2/7] drm: delay vblank cleanup until after driver unload
2010/3/29 Kristian Høgsberg k...@bitplanet.net: On Fri, Mar 26, 2010 at 7:07 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload paths, so don't clean up the vblank related structures until after driver unload. I haven't tested this specific patch on a recent DRM, but I made the same patch a while ago, and it fixed module unload for me. I sent it to the list and it fell through the cracks, because vblank is hard or something. Reviewed-by: Kristian Høgsberg k...@bitplanet.net I didn't apply it because from what I can see non-kms drivers need to free the vbl stuff on lastclose not unload. I'm nearly sure I said that at the time to. This patch seems to suffer from the same problem from what I can see. And really someone should already have cleaned up the insanity that is vbl struct allocations, vblank might not be hard, but it sure has some ugly. Dave. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [Intel-gfx] [PATCH 2/7] drm: delay vblank cleanup until after driver unload
2010/3/29 Dave Airlie airl...@gmail.com: 2010/3/29 Kristian Høgsberg k...@bitplanet.net: On Fri, Mar 26, 2010 at 7:07 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload paths, so don't clean up the vblank related structures until after driver unload. I haven't tested this specific patch on a recent DRM, but I made the same patch a while ago, and it fixed module unload for me. I sent it to the list and it fell through the cracks, because vblank is hard or something. Reviewed-by: Kristian Høgsberg k...@bitplanet.net I didn't apply it because from what I can see non-kms drivers need to free the vbl stuff on lastclose not unload. I'm nearly sure I said that at the time to. This patch seems to suffer from the same problem from what I can see. And really someone should already have cleaned up the insanity that is vbl struct allocations, vblank might not be hard, but it sure has some ugly. Oops on reading it makes more sense, I thought we were moving it from lastclose, my bad, too little sleep. Okay I'll push it in next push. Dave. Dave. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23513] Radeon AGP KMS don't work or is too slow.
http://bugs.freedesktop.org/show_bug.cgi?id=23513 --- Comment #2 from Hebert hebert.berna...@yahoo.com.br 2010-03-28 17:45:45 PST --- I already did that: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/496653 Also, since last friday, nomodeset stop working on disabling KMS I had to disable compiz to make it usable again. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27314] output not working on dell m6500
http://bugs.freedesktop.org/show_bug.cgi?id=27314 --- Comment #2 from Travis Glenn Hansen travisghan...@yahoo.com 2010-03-28 20:03:21 PST --- After booting with vga connected it now works. DP will not work for me however. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27314] output not working on dell m6500
http://bugs.freedesktop.org/show_bug.cgi?id=27314 --- Comment #3 from Travis Glenn Hansen travisghan...@yahoo.com 2010-03-28 20:25:02 PST --- Created an attachment (id=34525) -- (http://bugs.freedesktop.org/attachment.cgi?id=34525) drm.debug=15 just booting with no X startup -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27314] output not working on dell m6500
http://bugs.freedesktop.org/show_bug.cgi?id=27314 --- Comment #4 from Travis Glenn Hansen travisghan...@yahoo.com 2010-03-28 20:51:22 PST --- Created an attachment (id=34526) -- (http://bugs.freedesktop.org/attachment.cgi?id=34526) Xorg.0.log with nomodeset no kms, just ums -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27314] output not working on dell m6500
http://bugs.freedesktop.org/show_bug.cgi?id=27314 --- Comment #5 from Travis Glenn Hansen travisghan...@yahoo.com 2010-03-28 20:59:49 PST --- Created an attachment (id=34527) -- (http://bugs.freedesktop.org/attachment.cgi?id=34527) bios -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 27314] output not working on dell m6500
http://bugs.freedesktop.org/show_bug.cgi?id=27314 --- Comment #6 from Travis Glenn Hansen travisghan...@yahoo.com 2010-03-28 21:42:16 PST --- Created an attachment (id=34528) -- (http://bugs.freedesktop.org/attachment.cgi?id=34528) Xorg.0.log nomodeset git patch applied from http://fpaste.org/WgQj/raw/ -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel