[Intel-gfx] [PATCH] drm/i915: clean up ring id/semaphore sync index magic

2011-09-15 Thread Daniel Vetter
The calculation of the semaphore sync register index is obfuscated by some pointer calculation to get at the ring id (RCS, VCS and BCS). Now we already have a ring->id field, but that contains a flag value usefull for ORing together multiple rings - that's what the flushing code as the user of this

Re: [Intel-gfx] [PATCH] drm/i915: clean up ring id/semaphore sync index magic

2011-09-15 Thread Chris Wilson
On Thu, 15 Sep 2011 10:13:36 +0200, Daniel Vetter wrote: > The calculation of the semaphore sync register index is obfuscated > by some pointer calculation to get at the ring id (RCS, VCS and BCS). > Now we already have a ring->id field, but that contains a flag value > usefull for ORing together

[Intel-gfx] VAAPI GM45 benchmarks

2011-09-15 Thread Niccolò Belli
Hi, I did some benchmarks on my Samsung X360 laptop. The cpu: model name : Intel(R) Core(TM)2 Duo CPU U9400 @ 1.40GHz stepping: 6 cpu MHz : 1401.000 The sample video (89 seconds, 80 MB): http://download3.dvdloc8.com/trailers/divxdigest/bourne_ultimatum_trailer.zip Vi

Re: [Intel-gfx] xf86-video-intel: 6 commits - configure.ac src/sna/gen5_render.c src/sna/Makefile.am src/sna/sna_accel.c src/sna/sna_driver.c src/sna/sna.h src/sna/sna_trapezoids.c

2011-09-15 Thread Julien Cristau
On Mon, Sep 12, 2011 at 22:25:02 +0100, Chris Wilson wrote: > On Mon, 12 Sep 2011 23:12:19 +0200, Julien Cristau > wrote: > > Can I please get a way to opt out of this? I build from a git tree, but > > my .git isn't really something I want to put in my (or other people's) X > > logs. > > Doesn

[Intel-gfx] [gpu-tools 1/7] testdisplay: fix compiler warnings

2011-09-15 Thread przanoni
From: Paulo Zanoni testdisplay.c:117:1: warning: comparison between signed and unsigned integer expressions testdisplay.c:125:1: warning: comparison between signed and unsigned integer expressions testdisplay.c:145:1: warning: comparison between signed and unsigned integer expressions testdisplay

[Intel-gfx] [gpu-tools 2/7] Add missing files to .gitignore

2011-09-15 Thread przanoni
From: Paulo Zanoni Signed-off-by: Paulo Zanoni --- .gitignore | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 70736e2..592a1b8 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ tests/getclient tests/getstats tests/get

[Intel-gfx] [gpu-tools 3/7] testdisplay: test all modes if no option is provided

2011-09-15 Thread przanoni
From: Paulo Zanoni Previously, when called without any arguments, the application required user input to finish. However, testdisplay is ran by "make check", and it is not a good idea to run a program that requires user input in "make check". So we change the default behavior to something that d

[Intel-gfx] [gpu-tools 4/7] testdisplay: don't enter the main loop if dump_info or test_all_modes

2011-09-15 Thread przanoni
From: Paulo Zanoni If calls inside update_display fail, the function returns and we don't quit the program if dump_info or test_all_modes. So we enter the main loop and keep waiting for user input, even on cases where we are not supposed to require user input. To fix this, we move the check to ou

[Intel-gfx] [gpu-tools 5/7] testdisplay: remove wrong return statement

2011-09-15 Thread przanoni
From: Paulo Zanoni It seems that the kernel patches required by the TEST_PLANES feature are still not upstream, so I didn't test this patch. Signed-off-by: Paulo Zanoni --- tests/testdisplay.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tests/testdisplay.c b/tests/

[Intel-gfx] [gpu-tools 6/7] drm_open_any: explain why we are abort()ing

2011-09-15 Thread przanoni
From: Paulo Zanoni Signed-off-by: Paulo Zanoni --- lib/drmtest.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 95df93f..7e2c3fe 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -64,6 +64,7 @@ int drm_open_any(void)

[Intel-gfx] [gpu-tools 7/7] getstats: remove useless assertion

2011-09-15 Thread przanoni
From: Paulo Zanoni getstats.c:48:2: warning: comparison of unsigned expression >= 0 is always true Signed-off-by: Paulo Zanoni --- tests/getstats.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) This patch can be applied to both intel-gpu-tools and mesa/drm. Whoever apply this to

[Intel-gfx] [gpu-tools 6/7 v2] drm_open_any: explain why we are abort()ing

2011-09-15 Thread przanoni
From: Paulo Zanoni Signed-off-by: Paulo Zanoni --- lib/drmtest.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 95df93f..5d5d180 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -64,6 +64,7 @@ int drm_open_any(void)

[Intel-gfx] [PATCH] io-mapping: ensure io_mapping_map_atomic _is_ atomic

2011-09-15 Thread Daniel Vetter
For the !HAVE_ATOMIC_IOMAP case the stub functions did not call pagefault_disable/_enable. The i915 driver relies on the map actually being atomic, otherwise it can deadlock with it's own pagefault handler in the gtt pwrite fastpath. This is exercised by gem_mmap_gtt from the intel-gpu-toosl gem t

[Intel-gfx] Semaphore cleanups

2011-09-15 Thread Ben Widawsky
FWIW, I thought my original patch was the easiest to read, but this certainly removes the most magic. These had a ton of input from Daniel Vetter, and Chris Wilson. The goal is only to make the code more readable, and easier to veryify/debug. drivers/gpu/drm/i915/i915_debugfs.c| 10 ++-

[Intel-gfx] [PATCH 1/5] drm/i915: clean up ring id/semaphore sync index magic

2011-09-15 Thread Ben Widawsky
From: Daniel Vetter The calculation of the semaphore sync register index is obfuscated by some pointer calculation to get at the ring id (RCS, VCS and BCS). Now we already have a ring->id field, but that contains a flag value usefull for ORing together multiple rings - that's what the flushing co

[Intel-gfx] [PATCH 2/5] drm/i915: semaphore wait cleanup

2011-09-15 Thread Ben Widawsky
Add a per ring lookup table, and #defines to clarify semaphore waits. Rename ring variables in sync function to clearly show correct names based on canonical semaphore naming. Cc: Daniel Vetter Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_reg.h | 15 +++ driv

[Intel-gfx] [PATCH 3/5] drm/i915: semaphore signal cleanup

2011-09-15 Thread Ben Widawsky
Create another lookup table and #defines again to clarify ring signalling. Cut out previous black (yet clever) magic. Cc: Daniel Vetter Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_reg.h |6 ++ drivers/gpu/drm/i915/intel_ringbuffer.c |9 - drivers/gpu/d

[Intel-gfx] [PATCH 4/5] drm/i915: more semaphore cleanup

2011-09-15 Thread Ben Widawsky
This turns the black magic into brown magic. It's arguable whether or not this is more readable than the existing code. It does add a nice assertion, fewer lines of actual code, and some nice comments - as well as sticking to semantics now used in the ringbuffer code. Cc: Daniel Vetter Signed-of

[Intel-gfx] [PATCH 5/5] drm/i915: tracepoints for semaphores

2011-09-15 Thread Ben Widawsky
The tracepoints give enough info to figure the updates and compares (document terminology for signals and waits) and dependencies therein of the semaphore mailboxes. Here are arguments to perf to get interesting info (mostly copied from Chris): record -f -g -c 1 -e i915:intel_ringbuffer_add_reques

Re: [Intel-gfx] [PATCH 1/5] drm/i915: clean up ring id/semaphore sync index magic

2011-09-15 Thread Ben Widawsky
On Thu, 15 Sep 2011 19:08:57 -0700 Ben Widawsky wrote: > From: Daniel Vetter > > The calculation of the semaphore sync register index is obfuscated > by some pointer calculation to get at the ring id (RCS, VCS and BCS). > Now we already have a ring->id field, but that contains a flag value > us

Re: [Intel-gfx] [PATCH 4/5] drm/i915: more semaphore cleanup

2011-09-15 Thread Zou, Nanhai
>>-Original Message- >>From: intel-gfx-bounces+nanhai.zou=intel@lists.freedesktop.org >>[mailto:intel-gfx-bounces+nanhai.zou=intel@lists.freedesktop.org] On >>Behalf Of Ben Widawsky >>Sent: 2011年9月16日 10:09 >>To: intel-gfx@lists.freedesktop.org >>Cc: Daniel Vetter; Ben Widawsky >>Su