[Intel-gfx] [PATCH 4/4] drm/i915: Extract object reserver/reloc/bind

2013-03-13 Thread Ben Widawsky
These operations are all quite similar and moving them to a separate function provides a clean split if we want to do something other than immediately binding the work into the ring. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 77 -- 1

[Intel-gfx] [PATCH 3/4] drm/i915: Make eb do more

2013-03-13 Thread Ben Widawsky
I've written a couple of versions of this patch, and it's always in prep for some scheduler work I am doing. Only difference this time is a new maintainer to never merge them. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 38 +++--- 1 file c

[Intel-gfx] [PATCH 1/4] drm/i915: Remove unused file arg from execbuf

2013-03-13 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 934396c..bc5a5fa 100644 --- a/drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH 2/4] drm/i915: Remove unneeded dev argument

2013-03-13 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index bc5a5fa..354cecf 100644 --- a/drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH] MAINTAINERS: intel-gfx is no longer subscribers-only

2013-03-13 Thread Daniel Vetter
It is though still filtered for non-subscribers, but without pissing off people with moderation queue spam. So drop the subscribers-only tag to make getmaintainers.pl tdrt. Signed-off-by: Daniel Vetter --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINER

[Intel-gfx] [PATCH 09/10] drm/i915: Introduce IVB_FEATURES for device definition

2013-03-13 Thread Ben Widawsky
Recommended by Chris. Cc: Chris Wilson Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index a63abd7..2ee89c2 100644 -

[Intel-gfx] [PATCH 10/10] [v2] drm/i915: Add a pipeless ivybridge configuration

2013-03-13 Thread Ben Widawsky
FIXME: This is based on some HW being used for a demo. We should probably wait until we have confirmation on the IDs before upstreaming this patch. v2: Use IVB_FEATURES (Chris) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 18 +- 1 file changed, 17 insertions

[Intel-gfx] [PATCH 05/10] [v2] drm/i915: Don't initialize watermark stuff with PCH_NOP

2013-03-13 Thread Ben Widawsky
v2: Move check to the top (Chris) Add BUG_ON for !ivybridge, since it's all we support for now (Ben) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_pm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 01/10] [v2] drm/i915: Move num_pipes to intel info

2013-03-13 Thread Ben Widawsky
Requested by Daniel. v2: Fix incorrect num_pipe settings. (Chris) Cc: Daniel Vetter Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 9 +-- drivers/gpu/drm/i915/i915_drv.c | 48 ++-- drivers/gpu/drm/i915/i915_drv.h | 4 +--

Re: [Intel-gfx] [PATCH v3] drm/i915: bounds check execbuffer relocation count

2013-03-13 Thread Daniel Vetter
On Tue, Mar 12, 2013 at 09:07:46AM +, Chris Wilson wrote: > On Mon, Mar 11, 2013 at 05:31:45PM -0700, Kees Cook wrote: > > It is possible to wrap the counter used to allocate the buffer for > > relocation copies. This could lead to heap writing overflows. > > > > CVE-2013-0913 > > > > v3: col

Re: [Intel-gfx] linux-next: build failure after merge of the final tree (drm-intel tree related)

2013-03-13 Thread Daniel Vetter
On Tue, Mar 12, 2013 at 03:22:26PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the final tree, today's linux-next build (i386 defconfig) > failed like this: > > drivers/built-in.o: In function `i915_min_freq_set': > i915_debugfs.c:(.text+0xb1adc): undefined reference to `__udivdi3'

Re: [Intel-gfx] linux-next: build failure after merge of the final tree (drm-intel tree related)

2013-03-13 Thread Kees Cook
On Mon, Mar 11, 2013 at 9:22 PM, Stephen Rothwell wrote: > Hi all, > > After merging the final tree, today's linux-next build (i386 defconfig) > failed like this: > > drivers/built-in.o: In function `i915_min_freq_set': > i915_debugfs.c:(.text+0xb1adc): undefined reference to `__udivdi3' > drivers

[Intel-gfx] [PATCH] drm/i915: use do_div() as needed in debugfs code

2013-03-13 Thread Kees Cook
This replaces the open-coded divisions in the debugfs code by calls to do_div(). Signed-off-by: Kees Cook Cc: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/g

[Intel-gfx] [PATCH v3] drm/i915: bounds check execbuffer relocation count

2013-03-13 Thread Kees Cook
It is possible to wrap the counter used to allocate the buffer for relocation copies. This could lead to heap writing overflows. CVE-2013-0913 v3: collapse test, improve comment v2: move check into validate_exec_list Signed-off-by: Kees Cook Reported-by: Pinkie Pie Cc: sta...@vger.kernel.org --

Re: [Intel-gfx] [PATCH] drm/i915: use simple attribute in debugfs routines

2013-03-13 Thread Kees Cook
On Mon, Mar 11, 2013 at 4:03 PM, Daniel Vetter wrote: > On Sun, Mar 10, 2013 at 02:10:06PM -0700, Kees Cook wrote: >> This replaces the manual read/write routines in debugfs with the common >> simple attribute helpers. Doing this gets rid of repeated copy/pasting >> of copy_from_user and value for

[Intel-gfx] [PATCH] intel: don't crash when freeing an uninitialized screen

2013-03-13 Thread Aaron Plattner
When intel_scrn_create creates a screen, it sets scrn->driverPrivate to (void *)(match_data | 1). Normally, this is read by I830PreInit and then replaced with a pointer to the intel_screen_private structure. However, it's possible for the server to delete the screen before initializing it, which

Re: [Intel-gfx] [PATCH] drm/i915: use do_div() as needed in debugfs code

2013-03-13 Thread Daniel Vetter
On Mon, Mar 11, 2013 at 10:46:31PM -0700, Kees Cook wrote: > This replaces the open-coded divisions in the debugfs code by calls > to do_div(). > > Signed-off-by: Kees Cook > Cc: Daniel Vetter Squashed into the debugfs patch which introduced this regression, thanks for the quick fixup. -Daniel

Re: [Intel-gfx] [PATCH] drm/i915: reduce power in the ilk rc6 enable error message

2013-03-13 Thread Daniel Vetter
On Tue, Mar 12, 2013 at 10:49:19AM +0200, Jani Nikula wrote: > Even if "power power" is good for grepping. > > Signed-off-by: Jani Nikula Queued for -next, thanks for the patch. Fyi I've merged a few other patches, but might be that the merge confirmation mails have been lost in the awful confere

Re: [Intel-gfx] [PATCH 0/9] displayless PCH

2013-03-13 Thread Ben Widawsky
On Wed, Mar 13, 2013 at 06:58:06PM +, Chris Wilson wrote: > On Wed, Mar 13, 2013 at 11:20:59AM -0700, Ben Widawsky wrote: > > Certain fusing options allow customers to fuse off the South Display > > which would result in hangs when reading/writing to those registers. In > > addition, certain CP

Re: [Intel-gfx] [PATCH 0/9] displayless PCH

2013-03-13 Thread Chris Wilson
On Wed, Mar 13, 2013 at 11:20:59AM -0700, Ben Widawsky wrote: > Certain fusing options allow customers to fuse off the South Display > which would result in hangs when reading/writing to those registers. In > addition, certain CPU display registers (like backlight) may actually > invoke writes to S

Re: [Intel-gfx] [PATCH 9/9] drm/i915: Add a pipeless ivybridge configuration

2013-03-13 Thread Chris Wilson
On Wed, Mar 13, 2013 at 11:21:08AM -0700, Ben Widawsky wrote: > FIXME: This is based on some HW being used for a demo. We should > probably wait until we have confirmation on the IDs before upstreaming > this patch. > > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_drv.c | 22 +++

Re: [Intel-gfx] [PATCH 5/9] drm/i915: Don't initialize watermark stuff with PCH_NOP

2013-03-13 Thread Chris Wilson
On Wed, Mar 13, 2013 at 11:21:04AM -0700, Ben Widawsky wrote: > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/intel_pm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 52203fd..3166aa4

Re: [Intel-gfx] i915 fails to build on 32bit Systems

2013-03-13 Thread Ben Widawsky
On Wed, Mar 13, 2013 at 07:33:42PM +0100, Egbert Eich wrote: > i915.ko does not build due to the following function in i915_debugfs.c: > > i915_min_freq_set(void *data, u64 val) > { > ... > dev_priv->rps.min_delay = val / GT_FREQUENCY_MULTIPLIER; > ... > } > > Doing a 64bi

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Move num_pipes to intel info

2013-03-13 Thread Ben Widawsky
On Wed, Mar 13, 2013 at 06:31:16PM +, Chris Wilson wrote: > On Wed, Mar 13, 2013 at 11:21:00AM -0700, Ben Widawsky wrote: > > Requested by Daniel. > > > > Cc: Daniel Vetter > > Signed-off-by: Ben Widawsky > > --- > > drivers/gpu/drm/i915/i915_dma.c | 9 +-- > > drivers/gpu/drm/i91

[Intel-gfx] i915 fails to build on 32bit Systems

2013-03-13 Thread Egbert Eich
i915.ko does not build due to the following function in i915_debugfs.c: i915_min_freq_set(void *data, u64 val) { ... dev_priv->rps.min_delay = val / GT_FREQUENCY_MULTIPLIER; ... } Doing a 64bit integer division on 32bit requires a compiler run time library to be linked in,

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Move num_pipes to intel info

2013-03-13 Thread Chris Wilson
On Wed, Mar 13, 2013 at 11:21:00AM -0700, Ben Widawsky wrote: > Requested by Daniel. > > Cc: Daniel Vetter > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_dma.c | 9 +-- > drivers/gpu/drm/i915/i915_drv.c | 48 > ++-- > drivers/gpu/

[Intel-gfx] [PATCH 7/9] drm/i915: Don't wait for PCH on reset

2013-03-13 Thread Ben Widawsky
BIOS should be setting this, but in case it doesn't... Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 1417fc6..e

[Intel-gfx] [PATCH 8/9] drm/i915: Set PCH_NOP

2013-03-13 Thread Ben Widawsky
Set up PCH_NOP when we match a certain platform. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 0849651..0fa55cb 100644 --- a/drivers/gpu/drm/

[Intel-gfx] [PATCH 9/9] drm/i915: Add a pipeless ivybridge configuration

2013-03-13 Thread Ben Widawsky
FIXME: This is based on some HW being used for a demo. We should probably wait until we have confirmation on the IDs before upstreaming this patch. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff -

[Intel-gfx] [PATCH 5/9] drm/i915: Don't initialize watermark stuff with PCH_NOP

2013-03-13 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 52203fd..3166aa4 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/inte

[Intel-gfx] [PATCH 6/9] drm/i915: PCH_NOP suspend/resume

2013-03-13 Thread Ben Widawsky
More registers we can't write. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_suspend.c | 57 ++--- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index c1e02b0.

[Intel-gfx] [PATCH 4/9] drm/i915: Don't touch South display when PCH_NOP

2013-03-13 Thread Ben Widawsky
Interrupts, clock gating, and gmbus are all within the, "this will hang the CPU" range when we have PCH_NOP. There is a bit of a hack in init clock gating. We want to do most of the block gating, but the part we skip will hang the system. It could probably be abstracted a bit better, but I don't f

[Intel-gfx] [PATCH 3/9] drm/i915: PCH_NOP

2013-03-13 Thread Ben Widawsky
Given certain fusing options discussed in the previous patch, it's possible to end up with platforms that normally have PCH but that PCH doesn't actually exist. In many cases, this is easily remedied with setting 0 pipes. This covers the other corners. Requiring this is a symptom of improper code

[Intel-gfx] [PATCH 2/9] drm/i915: Support PCH no display

2013-03-13 Thread Ben Widawsky
GEN supports a fusing option which subtracts the PCH display (making the CPU display also useless). In this configuration MMIO which gets decoded to a certain range will hang the CPU. For us, this is sort of the equivalent of having no pipes, and we can easily modify some code to not do certain th

[Intel-gfx] [PATCH 1/9] drm/i915: Move num_pipes to intel info

2013-03-13 Thread Ben Widawsky
Requested by Daniel. Cc: Daniel Vetter Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 9 +-- drivers/gpu/drm/i915/i915_drv.c | 48 ++-- drivers/gpu/drm/i915/i915_drv.h | 4 +-- drivers/gpu/drm/i915/i915_irq.c | 3 +--

[Intel-gfx] [PATCH 0/9] displayless PCH

2013-03-13 Thread Ben Widawsky
Certain fusing options allow customers to fuse off the South Display which would result in hangs when reading/writing to those registers. In addition, certain CPU display registers (like backlight) may actually invoke writes to South Display. This patch series enables our code to run displayless w

Re: [Intel-gfx] linux-next: build failure after merge of the final tree (drm-intel tree related)

2013-03-13 Thread Sedat Dilek
On Tue, Mar 12, 2013 at 10:50 AM, Sedat Dilek wrote: > On Tue, Mar 12, 2013 at 6:46 AM, Kees Cook wrote: >> On Mon, Mar 11, 2013 at 9:22 PM, Stephen Rothwell >> wrote: >>> Hi all, >>> >>> After merging the final tree, today's linux-next build (i386 defconfig) >>> failed like this: >>> >>> drive