[PATCH 2/6] libdrm: Add missing string.h include

2009-07-03 Thread Pauli Nieminen
--- libdrm/xf86drm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index c1d173c..a7f9763 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -37,6 +37,7 @@ #include stdarg.h #include sys/types.h #include stdint.h +#include

[PATCH 6/6] libdrm: Add configuration option to enable strict compilation Also add -pedantic to list of warning flags.

2009-07-03 Thread Pauli Nieminen
--- configure.ac | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index be2fbbf..763464b 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,11 @@ AC_ARG_ENABLE(radeon-experimental-api, [Enable support for radeon's

[PATCH 4/6] libdrm: Request for _XOPEN_SOURCE to get full posix headers including extensions (XSH: mknod)

2009-07-03 Thread Pauli Nieminen
--- libdrm/xf86drm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 1e6eb7a..7b05386 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -34,6 +34,7 @@ #ifdef HAVE_CONFIG_H # include config.h #endif +#define _XOPEN_SOURCE

[PATCH 1/6] libdrm: Remove typedef for non-existing enum

2009-07-03 Thread Pauli Nieminen
--- shared-core/drm.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/shared-core/drm.h b/shared-core/drm.h index 7758af4..42a6c23 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -855,7 +855,6 @@ typedef struct drm_set_version drm_set_version_t; typedef struct

libdrm: 6 patches to clean some compilerwarnings

2009-07-03 Thread Pauli Nieminen
I did try to compile libdrm with -pedantic -Wall -Werror but there is a lot of warnings generated. This patch set fixes compilation of libdrm/xf86drm.c. I also made patch to add configuration option to make it easy for developers to use strict compilation with all warnings enabled as errors.

[PATCH 3/6] libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers.

2009-07-03 Thread Pauli Nieminen
--- libdrm/xf86drm.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 55df19a..1e6eb7a 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -240,22 +240,22 @@ static int drmMatchBusID(const char *id1, const char *id2)

[PATCH 5/6] libdrm: Make chown check for return value and in case a signal call again chown.

2009-07-03 Thread Pauli Nieminen
--- libdrm/xf86drm.c | 49 ++--- 1 files changed, 46 insertions(+), 3 deletions(-) diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 7b05386..bf80fd4 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -269,6 +269,49 @@ static int

Re: [PATCH 6/6] libdrm: Add configuration option to enable strict compilation Also add -pedantic to list of warning flags.

2009-07-03 Thread Pauli Nieminen
This might also require -std=c99 to set c standard correctly. I did use that in my CFLAGS when I tried to compile with -Werror. -- -- ___ Dri-devel mailing list

Re: [PATCH 2/6] libdrm: Add missing string.h include

2009-07-05 Thread Pauli Nieminen
strings.h (strcasecmp is posix function) On Sat, Jul 4, 2009 at 10:32 PM, Julien Cristaujcris...@debian.org wrote: On Sat, Jul  4, 2009 at 02:18:50 +0300, Pauli Nieminen wrote: ---  libdrm/xf86drm.h |    1 +  1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libdrm/xf86drm.h b

[PATCH 2/6] libdrm: Add missing strings.h include

2009-07-05 Thread Pauli Nieminen
strcasecmp is declared in strings.h --- libdrm/xf86drm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index c1d173c..a7f9763 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -37,6 +37,7 @@ #include stdarg.h #include

Re: [PATCH 5/6] libdrm: Make chown check for return value and in case a signal call again chown.

2009-07-05 Thread Pauli Nieminen
Attached improved patch. On Sat, Jul 4, 2009 at 11:14 AM, Pekka Paalanenp...@iki.fi wrote: On Sat,  4 Jul 2009 02:18:53 +0300 Pauli Nieminen suok...@gmail.com wrote: ---  libdrm/xf86drm.c |   49 ++---  1 files changed, 46 insertions(+), 3

Re: [PATCH 6/6] libdrm: Add configuration option to enable strict compilation Also add -pedantic to list of warning flags.

2009-07-05 Thread Pauli Nieminen
fc7f62d955f2d7b66cd5179eace2f628a7c66277 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Sun, 5 Jul 2009 18:34:29 +0300 Subject: [PATCH 6/6] libdrm: Add configuration option to enable strict compilation Source is writen for c99 standard so we have to tell compiler about it with -std=c99

Re: [PATCH 6/6] libdrm: Add configuration option to enable strict compilation Also add -pedantic to list of warning flags.

2009-07-05 Thread Pauli Nieminen
attached to add the -std=c99 if using strict compilation I should learn to type and test everything well before submitting. From fc7f62d955f2d7b66cd5179eace2f628a7c66277 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Sun, 5 Jul 2009 18:34:29 +0300 Subject: [PATCH 6/6] libdrm

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 3eb4a3493f13c48bee1b2453f5ecead0ba498c51 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 15:45:41 +0300 Subject: [PATCH 05/15] libdrm: Fix drmOpenDevice to take dev_t type as parameter. This fixes signed/unsigned comparission between st.st_dev and dev

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 78bfacedfb3b81968b2171a942101d323b1782cb Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 15:48:48 +0300 Subject: [PATCH 06/15] libdrm: Fix loop index variable type to match the type of count --- libdrm/xf86drm.c |4 ++-- 1 files changed, 2

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 10a9bf298be4695242bcdb63bcfad720e03bf040 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 16:31:54 +0300 Subject: [PATCH 08/15] libdrm: Make gcc to understand that pointers are realy pointers. --- libdrm/xf86drmSL.c |6 +++--- 1 files changed, 3

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 7fcfbf715644d2268236b8a19d1f2f83c952d72b Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 16:25:59 +0300 Subject: [PATCH 07/15] libdrm: Fix random number generator to use unsigned seed. This fixes wanring about unsigned/signed comparision. Also make

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 69cad004e5355e4adcee753de4da91c98949d3df Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 16:50:20 +0300 Subject: [PATCH 09/15] libdrm: Make drmAllocCpy static. --- libdrm/xf86drmMode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 6ad9d2f1495df9bbdecbe4e7676da75d48ba3719 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 16:55:21 +0300 Subject: [PATCH 10/15] libdrm: Make drmAllocCpy use only single memcpy call instead of calling memcpy in loop. --- libdrm/xf86drmMode.c |4

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 9043299720ef5ecac1fe575b0bbda19b81720dd8 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 18:00:43 +0300 Subject: [PATCH 13/15] libdrm/radeon: Remove unussed variables and make printf happy with explicity void* cast from struct radeon_bo*. --- libdrm

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From dea4cebdb49556ab06930bd5a4d303ce1c0b85c7 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 17:19:55 +0300 Subject: [PATCH 12/15] intel: Move debug output after setting the value. --- libdrm/intel/intel_bufmgr_fake.c |4 ++-- 1 files changed, 2

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 0c8b7939fc95084d77063eb8de78b0724d3d4058 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 17:00:45 +0300 Subject: [PATCH 11/15] libdrm: Make pci id numbers unsigned for sscanf. --- libdrm/xf86drmMode.c |3 ++- 1 files changed, 2 insertions(+), 1

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 9c0cd0ba5bb5966498cad2c5a8c69ec24c4c8e34 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 18:40:49 +0300 Subject: [PATCH 15/15] Fix signed/unsigned comparison warning --- libdrm/radeon/radeon_cs_gem.c | 13 +++-- 1 files changed, 7 insertions

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
From 36aef4bf07154ef6d206f15ff1c036a7f8e368a9 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 18:33:03 +0300 Subject: [PATCH 14/15] libdrm/radeon: Add config.h include to enable POSIX extensions for strdup call. --- libdrm/radeon/radeon_track.c |3

Re: libdrm: Fixing compilers warnings

2009-07-20 Thread Pauli Nieminen
And then follows fixes for all tests. From 1cd7a914be3fc5ee8aabdd2297710f5c781b555f Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 21:36:57 +0300 Subject: [PATCH 1/4] libdrm/tests: Fix compiler warnings in dristat.c. --- tests/dristat.c | 12

Re: libdrm: Fixing compilers warnings

2009-07-24 Thread Pauli Nieminen
On Tue, Jul 21, 2009 at 12:21 PM, Julien Cristau jcris...@debian.orgwrote: On Mon, Jul 20, 2009 at 19:17:01 +0300, Pauli Nieminen wrote: From b7e77b71d1f2d8ff6741e534911e09f10e3f3d4e Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Mon, 20 Jul 2009 14:39:57 +0300

[PATCH] drm: Remove extra commas from end of enumeration list

2009-07-25 Thread Pauli Nieminen
--- shared-core/drm.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-core/drm.h b/shared-core/drm.h index 42a6c23..155b0f6 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -243,7 +243,7 @@ enum drm_map_type { _DRM_SCATTER_GATHER = 4, /**

[PATCH 2/2] libdrm/radeon: Add configure option to enable bo tracking.

2009-08-07 Thread Pauli Nieminen
This will bo tracking also enabled in mesa if it is enabled in libdrm tough pkg-config. Signed-off-by: Pauli Nieminen suok...@gmail.com --- configure.ac | 14 ++ libdrm/radeon/Makefile.am |1 + libdrm/radeon/libdrm_radeon.pc.in |3 ++- 3 files

[PATCH 1/2] libdrm/radeon: Update head of linked list not to point freed memory.

2009-08-07 Thread Pauli Nieminen
Signed-off-by: Pauli Nieminen suok...@gmail.com --- libdrm/radeon/radeon_track.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libdrm/radeon/radeon_track.c b/libdrm/radeon/radeon_track.c index 09f8725..0068aa9 100644 --- a/libdrm/radeon/radeon_track.c +++ b/libdrm

Re: [PATCH 2/2] libdrm/radeon: Add configure option to enable bo tracking.

2009-08-07 Thread Pauli Nieminen
s/TRACK_BO/BO_TRACK/ From 5f4ad665d42791416973391a43236d64427f6304 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Fri, 7 Aug 2009 19:24:30 +0300 Subject: [PATCH] libdrm/radeon: Add configure option to enable bo tracking. This will bo tracking also enabled in mesa

[PATCH] libdrm_radeon: Optimize copy of table to cs buffer with specialized call.

2009-08-18 Thread Pauli Nieminen
Using this call in OUT_BATCH_TABLE reduces radeonEmitState cpu usage from 9% to 5% and emit_vpu goes from 7% to 1.5%. I did use calgrind to profile gears for cpu hotspots with r500 card. Signed-off-by: Pauli Nieminen suok...@gmail.com --- libdrm/radeon/radeon_cs.h |9 + 1 files

[PATCH] libdrm_radeon: Fix loops so that compiler can optimize them.

2009-08-18 Thread Pauli Nieminen
GCC did war about optimization not possible because possible forever loop. Signed-off-by: Pauli Nieminen suok...@gmail.com --- libdrm/radeon/radeon_cs_gem.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libdrm/radeon/radeon_cs_gem.c b/libdrm/radeon

Idea: Marking back buffer copy-on-write when doing buffer swap

2009-08-18 Thread Pauli Nieminen
Hi! Idea is to not to block client application when it request buffer swap. This should give small performance gains when swap buffer is synchronised to vblank. I can think of 3 different implementations to archive this continues execution of client. First one is to just allocate 2 back buffers

[PATCH] libdrm_radeon: Add bo_is_busy interface to request for state of buffer object.

2009-08-20 Thread Pauli Nieminen
Signed-off-by: Pauli Nieminen suok...@gmail.com --- libdrm/radeon/radeon_bo.h | 13 + libdrm/radeon/radeon_bo_gem.c | 18 ++ shared-core/radeon_drm.h |4 +++- 3 files changed, 34 insertions(+), 1 deletions(-) diff --git a/libdrm/radeon/radeon_bo.h b

[PATCH] drm/radeon: Change some magic numbers to defines instead.

2009-09-04 Thread Pauli Nieminen
documentations. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r100.c |5 +- drivers/gpu/drm/radeon/r300.c | 245 ++- drivers/gpu/drm/radeon/r300_reg.h | 84 - drivers/gpu/drm/radeon/r420.c |4

[PATCH] drm/radeon: Fix DFS corruption for r100/r200.

2009-09-08 Thread Pauli Nieminen
be better only to flush when necessary it is very hard to know when it is required. So we do flush every time because it is better to be safe than sorry. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r100.c | 11 ++- 1 files changed, 10 insertions(+), 1

Re: Power management in KMS

2009-09-09 Thread Pauli Nieminen
2009/9/9 Jerome Glisse gli...@freedesktop.org On Wed, 2009-09-09 at 10:50 +0200, Rafał Miłecki wrote: I'm thinking of organizing power management in KMS. There are my ideas, would like to get your opinions. First of all we need a few different power modes. I think radeonhd has nice

Re: [IDEA] drm/radeon/kms: user defined power state

2009-09-18 Thread Pauli Nieminen
2009/9/17 Rafał Miłecki zaj...@gmail.com W dniu 18 września 2009 00:55 użytkownik Rafał Miłecki zaj...@gmail.com napisał: My new proposition is rather create some user_power_mode and let user specify all 3 params. For example: $ echo 20 40 1050 /sys/class/gpu/user_power_mode $

preventing GPU reset DoS

2009-09-22 Thread Pauli Nieminen
Hi! I have been thinking GPU reset as possible DoS attack from user-space.Problem here is that display doesn't work anymore at all if attacker chooses to run a application that constantly causes GPU hang. It would be of course ideal to have CS checker not to let in any problematic combinations of

Re: preventing GPU reset DoS

2009-09-22 Thread Pauli Nieminen
On Tue, Sep 22, 2009 at 11:51 PM, Corbin Simpson mostawesomed...@gmail.comwrote: On 09/22/2009 01:19 PM, Nicolai Hähnle wrote: I'm pretty confident that you can write a perfectly legal OpenGL application that creates commands that take *minutes* to run on decent graphics cards. Just

Re: [PATCH] [RFC] drm/radeon/kms: don't require up to 64k allocations.

2009-09-23 Thread Pauli Nieminen
2009/9/23 Dave Airlie airl...@linux.ie From: Dave Airlie airl...@redhat.com This avoids needing to do a kmalloc PAGE_SIZE for the main indirect buffer chunk, it adds an accessor for all reads from the chunk and caches a single page at a time for subsequent reads. FWIW,

Re: preventing GPU reset DoS

2009-09-23 Thread Pauli Nieminen
On Wed, Sep 23, 2009 at 10:52 PM, Nicolai Hähnle nhaeh...@gmail.com wrote: Am Tuesday 22 September 2009 23:25:09 schrieb Pauli Nieminen: Too bad GPU reset is already now stopping this use case while it doesn't protect user from possible attack causing multiple GPU reset in row. So

Re: KMS/Radeon rainbow colors when booting .33 kernel

2010-01-27 Thread Pauli Nieminen
Hi Marc! Is it an agp card? If yes you could try to boot with agpmode=-1 parameter for radeon module. On Tue, Jan 26, 2010 at 7:32 PM, Marc R. O'Connor mrocon...@oel.state.nj.us wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have been having issues with KMS on 2.6.33-rcX kernels.

[PATCH 0/2] drm/radeon: Fix memory allocation failures in command stream parser. (fdo #23993)

2010-02-01 Thread Pauli Nieminen
Fixing kernel memory allocation bugs in radeon command stream parser requires splitting the buffer to multiple independ pages. To make splitting one large array to multiple pages first patch adds drm_buffer structure and functions to reference data in the buffer. Second patch converts existing

[PATCH 1/2] drm: Add generic multipart buffer.

2010-02-01 Thread Pauli Nieminen
for data if it is split over boundary in the buffer. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/Makefile |2 +- drivers/gpu/drm/drm_buffer.c | 184 ++ include/drm/drm_buffer.h | 148 + 3 files

[PATCH 2/2] drm/radeon: Fix memory allocation failures in the preKMS command stream checking.

2010-02-01 Thread Pauli Nieminen
to go tough drm_buffer functions to get correct pointer. Outputting the command stream to ring buffer needs to be awear of the split nature of drm_buffer. The output operation requires the new OUT_RING_DRM_BUFFER. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon

[PATCH] libdrm/radeon: Fix section size mismatch to reset the section.

2010-02-01 Thread Pauli Nieminen
If there is section size mismatch reusing the section object makes section start fail. Reseting the object before doing error checking prevents the possible flood of errors. Signed-off-by: Pauli Nieminen suok...@gmail.com --- radeon/radeon_cs_gem.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH] libdrm/radeon: Fix section size mismatch to reset the section.

2010-02-01 Thread Pauli Nieminen
the section even when there is error. */ + cs-section_ndw = 0; + return -EPIPE; } cs-section_ndw = 0; return 0; On Mon, Feb 1, 2010 at 10:12 PM, Dave Airlie airl...@gmail.com wrote: On Tue, Feb 2, 2010 at 4:24 AM, Pauli Nieminen suok...@gmail.com wrote

Re: [PATCH 1/2] drm: Add generic multipart buffer.

2010-02-03 Thread Pauli Nieminen
On Tue, Feb 2, 2010 at 10:50 PM, Dave Airlie airl...@gmail.com wrote: On Tue, Feb 2, 2010 at 3:11 AM, Pauli Nieminen suok...@gmail.com wrote: Allocating multiple pages of memory for data that is coming from user space may fail. To fix memory allocation failures the buffer object should

[PATCH] drm/r100/kms: Emit cache flush to the end of command buffer.

2010-02-03 Thread Pauli Nieminen
Cache flush is required in case CPU is accessing rendered data. This fixes glean/readPixSanity test case and random rendering errors in sauerbraten. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r100.c |6 ++ drivers/gpu/drm/radeon/radeon_reg.h |2

[PATCH] drm/r100/kms: Emit cache flush to the end of command buffer. (v2)

2010-02-04 Thread Pauli Nieminen
Cache flush is required in case CPU is accessing rendered data. This fixes glean/readPixSanity test case and random rendering errors in sauerbraten and warzone2100. v2 Fix comment ordering in r100_fence_ring_emit and remove extra defines added in first version. Signed-off-by: Pauli Nieminen

Re: [PATCH] drm/r100/kms: Emit cache flush to the end of command buffer. (v2)

2010-02-07 Thread Pauli Nieminen
On Sat, Feb 6, 2010 at 1:54 AM, Paul Menzel paulepan...@users.sourceforge.net wrote: Am Donnerstag, den 04.02.2010, 19:49 +0200 schrieb Pauli Nieminen: […] +/* Who ever call radeon_fence_emit should call ring_lock and ask s/ever call/ever calls/ Too bad you are asking too much from me

[PATCH 1/2] drm/radeon: Skip dma copy test in benchmark if card doesn't have dma engine.

2010-02-10 Thread Pauli Nieminen
radeon_copy_dma is only available for r200 or newer cards. Call to radeon_copy_dma would result to NULL pointer dereference if benchmarking asic without dma engine. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/radeon_benchmark.c | 55

[PATCH 2/2] drm/radeon: Add asic hook for dma copy to r200 cards.

2010-02-10 Thread Pauli Nieminen
that supports starts from r200 cards. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r200.c | 46 drivers/gpu/drm/radeon/r300.c | 44 -- drivers/gpu/drm/radeon/radeon_asic.h | 18

[PATCH 2/2] drm/radeon: Add asic hook for dma copy to r200 cards.

2010-02-11 Thread Pauli Nieminen
that supports starts from r200 cards. v2: Created a new asic object for r200 cards. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r200.c | 46 + drivers/gpu/drm/radeon/r300.c | 44 drivers/gpu/drm/radeon

[PATCH] drm/radeon/kms: Create asic structure for r300 pcie cards.

2010-02-11 Thread Pauli Nieminen
Setting global asic structure to point to different function would cause problem in system where is multiple r300 cards with different bus type. r300_asic_pcie is just copy from r300_asic with gart tlb functions replaced with pcie versions. Signed-off-by: Pauli Nieminen suok...@gmail.com

Re: [Bug 26525] Rendering bug due to ARB_texture_non_power_of_two

2010-02-13 Thread Pauli Nieminen
This is in the shared code. I see this bug with r200 too. Models have worked before rewrite so this is some regression in rewrite. --- Comment #10 from Alex Deucher ag...@yahoo.com  2010-02-12 11:27:49 PST --- (In reply to comment #9) The last commit for mesa i have is,

[PATCH] libdrm: Add drm function for KMS checkin that checks if kernel module is loaded.

2010-02-22 Thread Pauli Nieminen
to load the module. drmCheckModesettingSupported is now deprecated. Version bump is also required for the interface change. Signed-off-by: Pauli Nieminen suok...@gmail.com --- configure.ac |2 +- xf86drm.c |3 ++- xf86drmMode.c | 29 - xf86drmMode.h |6

[PATCH] kms: Use libdrm function to preload module before checking for KMS.

2010-02-22 Thread Pauli Nieminen
This prevents ddx from selecting UMS if KMS is enabled but kernel module is not loaded before X. Signed-off-by: Pauli Nieminen suok...@gmail.com --- configure.ac |3 +++ src/radeon_probe.c |6 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/configure.ac b

[RFC] drm/ttm: add pool wc/uc page allocator

2010-02-28 Thread Pauli Nieminen
for multiple threads. 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

[PATCH] drm/radeon: Fix printf type warning in 64bit system.

2010-03-01 Thread Pauli Nieminen
Type of iterator was promoted to unsigned long in 64bit systems. *header is small structure so it is alwas safe to cast return value of sizeof operator to int. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/r300_cmdbuf.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH] libdrm_radeon: Optimize reloc writing to do less looping.

2010-03-01 Thread Pauli Nieminen
Bit has table will be first checked from BO if we can quarentee this BO is not in this cs already. When bo is emited the reference to cs is removed with bit operations. To quarentee that there is no other cs with same id number of CS that can have id is limited to number of bits in unsigned long.

[PATCH] libdrm_radeon: Optimize reloc writing to do less looping.

2010-03-01 Thread Pauli Nieminen
Bit has table will be first checked from BO if we can quarentee this BO is not in this cs already. When bo is emited the reference to cs is removed with bit operations. To quarentee that all cs ids are unique number of ids is limited to 32. If application uses more than 32 cs objects extra cs

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Pauli Nieminen
2010/3/2 Thomas Hellström tho...@shipmail.org: Michel Dänzer wrote: On Tue, 2010-03-02 at 00:32 +0200, Pauli Nieminen wrote: bo allocation is still too expensive operation for dma buffers in classic mesa. It takes quite a lot cpu time in bind memory (agp system) and ttm_mem_global functions

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Pauli Nieminen
On Wed, Mar 3, 2010 at 4:50 PM, Jerome Glisse gli...@freedesktop.org wrote: On Wed, Mar 03, 2010 at 04:23:08PM +0200, Pauli Nieminen wrote: On Wed, Mar 3, 2010 at 3:33 PM, Jerome Glisse gli...@freedesktop.org wrote: On Tue, Mar 02, 2010 at 12:32:54AM +0200, Pauli Nieminen wrote: On Sun, Feb

Re: [PATCH 1/3] drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4

2010-03-10 Thread Pauli Nieminen
On Tue, Mar 9, 2010 at 4:45 PM, Jerome Glisse jgli...@redhat.com wrote: This patch cleanup the fence code, it drops the timeout field of fence as the time to complete each IB is unpredictable and shouldn't be bound. The fence cleanup lead to GPU lockup detection improvement, this patch

Re: [Q] How to tell we're using the KMS (during suspend/resume) outside the graphics driver

2010-03-10 Thread Pauli Nieminen
On Wed, Mar 10, 2010 at 7:50 AM, Paul Mundt let...@linux-sh.org wrote: On Tue, Mar 09, 2010 at 10:08:28PM +0100, Rafael J. Wysocki wrote: On Tuesday 09 March 2010, James Simmons wrote: Second, in the KMS case, we'd be able to skip the kernel VT switch, because the KMS driver

[PATCH 2/2] libdrm_radeon: Optimize reloc writing to do less looping.

2010-03-10 Thread Pauli Nieminen
to a bo from multiple contexts. This optimization decreases cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Signed-off-by: Pauli Nieminen suok...@gmail.com --- radeon/radeon_bo_gem.c |1 + radeon/radeon_cs.c |6 ++ radeon/radeon_cs.h |2 +- radeon/radeon_cs_gem.c | 133

[PATCH 1/2] libdrm: Move intel_atomic.h to libdrm core for sharing.

2010-03-10 Thread Pauli Nieminen
intel_atomic.h includes very usefull atomic operations for lock free parrallel access of variables. Moving these to core libdrm for code sharing with radeon. Signed-off-by: Pauli Nieminen suok...@gmail.com --- Makefile.am |2 +- configure.ac |2 +- intel/intel_atomic.h

Re: [PATCH 2/2] libdrm_radeon: Optimize reloc writing to do less looping.

2010-03-10 Thread Pauli Nieminen
2010/3/10 Michel Dänzer mic...@daenzer.net: On Wed, 2010-03-10 at 18:20 +0200, Pauli Nieminen wrote: Bit has table will be first checked from BO if we can quarentee this BO is not in this cs already. To quarentee that there is no other cs with same id number of CS that can have id

[PATCH 2/2] libdrm_radeon: Optimize cs_gem_reloc to do less looping.

2010-03-10 Thread Pauli Nieminen
objects rest will get id 0. This optimization decreases cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Signed-off-by: Pauli Nieminen suok...@gmail.com --- radeon/radeon_bo_gem.c |1 + radeon/radeon_bo_int.h |4 +- radeon/radeon_cs.c |6 ++ radeon/radeon_cs.h |2

[PATCH 1/2] libdrm: Move intel_atomic.h to libdrm core for sharing. (V2)

2010-03-10 Thread Pauli Nieminen
intel_atomic.h includes very usefull atomic operations for lock free parrallel access of variables. Moving these to core libdrm for code sharing with radeon. V2: Fix remaining references to intel_atomic.h and libdrm-intel. Signed-off-by: Pauli Nieminen suok...@gmail.com --- Makefile.am

Re: [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode

2010-03-11 Thread Pauli Nieminen
2010/3/11 Michel Dänzer mic...@daenzer.net: On Wed, 2010-03-10 at 13:10 -0500, Alex Deucher wrote: On Wed, Mar 10, 2010 at 1:05 PM, Alex Deucher alexdeuc...@gmail.com wrote: On Wed, Mar 10, 2010 at 12:42 PM, James Simmons jsimm...@infradead.org wrote: See my other post about what fbdev

[PATCH 2/3] libdrm_radeon: Optimize cs_gem_reloc to do less looping. (V2)

2010-03-12 Thread Pauli Nieminen
cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Signed-off-by: Pauli Nieminen suok...@gmail.com --- configure.ac | 27 --- radeon/radeon_bo_gem.c |9 radeon/radeon_bo_gem.h |1 + radeon/radeon_cs.c |6 ++ radeon/radeon_cs.h |2 +- radeon

[PATCH 1/3] libdrm: Move intel_atomic.h to libdrm core for sharing. (V3)

2010-03-12 Thread Pauli Nieminen
intel_atomic.h includes very usefull atomic operations for lock free parrallel access of variables. Moving these to core libdrm for code sharing with radeon. V2: Fix remaining references to intel_atomic.h and libdrm-intel. V3: Remove useless wrapper header intel_atomic.h Signed-off-by: Pauli

[PATCH 3/3] libdrm: Move all noninstalled headers to noinst_HEADERS.

2010-03-12 Thread Pauli Nieminen
Cleanup make system so that all noninstalled headers are put to noinst_HEADERS. This quarentees that header will be present in tar ball but not installed with make install. CC: nouv...@lists.freedesktop.org Signed-off-by: Pauli Nieminen suok...@gmail.com --- Makefile.am |6

Re: [Bug 25597] SIGSEGV in _radeon_bo_unref

2010-03-16 Thread Pauli Nieminen
This looks like screen is destroyed before context. Can someone reproduce this in valgrind and attach the log? It may not crash in valgrind but there should be double free report with same backtrace. -- Download

[PATCH 0/7] drm/ttm: Pool allocator

2010-03-17 Thread Pauli Nieminen
When allocating wc/uc pages cache state transition requires cache flush which is expensive operation. To avoid cache flushes allocation of wc/uc pages should be done in large groups when only single cache flush is required for whole group of pages. In some cases drivers need t oallocate and

[PATCH 7/7] drm/ttm: Use set_pages_array_wc instead of set_memory_wc.

2010-03-17 Thread Pauli Nieminen
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

[PATCH 6/7] arch/x86: Add array variants for setting memory to wc caching.

2010-03-17 Thread Pauli Nieminen
-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

[PATCH 3/7] drm/radeon/kms: Add ttm page pool debugfs file.

2010-03-17 Thread Pauli Nieminen
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

[PATCH 2/7] drm/ttm: Add debugfs output entry to pool allocator.

2010-03-17 Thread Pauli Nieminen
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

[PATCH 4/7] drm/nouveau: Add ttm page pool debugfs file.

2010-03-17 Thread Pauli Nieminen
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

[PATCH 5/7] drm/ttm: Dynamically scale the allocation sizes of pools.

2010-03-17 Thread Pauli Nieminen
. The allocation sizes of pools is doubled everytime refill is done more than once between shrink calls. While the size is halfed happens if there is no refills for manager-shrink_alloc_interval seconds. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 105

[PATCH 1/7] drm/ttm: add pool wc/uc page allocator

2010-03-17 Thread Pauli Nieminen
...@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 | 775 ++ drivers/gpu/drm/ttm

Re: [PATCH 6/7] arch/x86: Add array variants for setting memory to wc caching.

2010-03-18 Thread Pauli Nieminen
On Thu, Mar 18, 2010 at 1:52 AM, Dave Airlie airl...@gmail.com wrote: On Thu, Mar 18, 2010 at 6:50 AM, Pauli Nieminen suok...@gmail.com wrote: 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

Re: [PATCH 6/7] arch/x86: Add array variants for setting memory to wc caching.

2010-03-18 Thread Pauli Nieminen
On Thu, Mar 18, 2010 at 9:29 PM, Suresh Siddha suresh.b.sid...@intel.com wrote: On Thu, 2010-03-18 at 02:41 -0700, Pauli Nieminen wrote: On Thu, Mar 18, 2010 at 1:52 AM, Dave Airlie airl...@gmail.com wrote: On Thu, Mar 18, 2010 at 6:50 AM, Pauli Nieminen suok...@gmail.com wrote: Setting

Re: [PATCH 2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.

2010-03-19 Thread Pauli Nieminen
On Fri, Mar 19, 2010 at 2:35 AM, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com We can get this if the user moves the mouse when we are waiting to move some stuff around in the validate. Don't fail. Signed-off-by: Dave Airlie airl...@redhat.com ---  

Re: [PATCH 2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.

2010-03-19 Thread Pauli Nieminen
On Fri, Mar 19, 2010 at 8:43 AM, Pauli Nieminen suok...@gmail.com wrote: On Fri, Mar 19, 2010 at 2:35 AM, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com We can get this if the user moves the mouse when we are waiting to move some stuff around in the validate. Don't

[PATCH] drm/radeon/kms: Fix NULL pointer dereference if memory allocation failed.

2010-03-19 Thread Pauli Nieminen
code. Signed-off-by: Pauli Nieminen suok...@gmail.com --- drivers/gpu/drm/radeon/radeon_cs.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 70ba02e..dffb356 100644 --- a/drivers/gpu/drm

Re: [PATCH 0/7] drm/ttm: Pool allocator

2010-03-19 Thread Pauli Nieminen
Pauli Nieminen wrote: When allocating wc/uc pages cache state transition requires cache flush which is expensive operation. To avoid cache flushes allocation of wc/uc pages should be done in large groups when only single cache flush is required for whole group of pages. In some cases

drm/ttm: Pool allocator simplification and sysfs interface

2010-03-24 Thread Pauli Nieminen
This patch series simplifies pool management code and adds sysfd interface to control pool functionality from sysfs. Pool size reduction only happens when mm shrinker request for free pages. To prevent pool from wasting too much free memory there is user configureable maximum size. If pool tries

[PATCH 4/7] drm/nouveau: Add ttm page pool debugfs file.

2010-03-24 Thread Pauli Nieminen
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

[PATCH 3/7] drm/radeon/kms: Add ttm page pool debugfs file.

2010-03-24 Thread Pauli Nieminen
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

[PATCH 6/7] drm/ttm: Use set_pages_array_wc instead of set_memory_wc.

2010-03-24 Thread Pauli Nieminen
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

[PATCH 2/7] drm/ttm: Add debugfs output entry to pool allocator.

2010-03-24 Thread Pauli Nieminen
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

[PATCH 1/7] drm/ttm: add pool wc/uc page allocator

2010-03-24 Thread Pauli Nieminen
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

[PATCH 5/7] arch/x86: Add array variants for setting memory to wc caching.

2010-03-24 Thread Pauli Nieminen
-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

[PATCH 7/7] drm/ttm: Add sysfs interface to control pool allocator.

2010-03-24 Thread Pauli Nieminen
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

Re: [PATCH 1/7] drm/ttm: add pool wc/uc page allocator

2010-03-26 Thread Pauli Nieminen
On Fri, Mar 26, 2010 at 3:59 PM, Jerome Glisse gli...@freedesktop.org wrote: On Thu, Mar 25, 2010 at 12:36:43AM +0200, Pauli Nieminen wrote: 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

  1   2   >