Re: [Intel-gfx] [PATCH] drm/i915: Sanitize the enable_ppgtt module option once

2014-04-23 Thread Ben Widawsky
> > > with vt-d enabled. This regression was introduced in > > > > > > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549 > > > Author: Ben Widawsky > > > Date: Fri Dec 6 14:11:14 2013 -0800 > > > > > > drm/i915: Reorganize intel_enab

Re: [Intel-gfx] [RFC 0/3] render state initialization (bdw rc6)

2014-04-23 Thread Ben Widawsky
t being discussed, and it will certainly be more explicit if the right > bits are poked into the context directly to keep the hw from falling over. > -Chris > Paper is better than no paper. Anyway there are a couple of units where we know NULL is better than not NULL (VFE is one). I have be

Re: [Intel-gfx] [PATCH] drm/i915: Do not access stolen memory directly by the CPU, even for error capture

2014-04-24 Thread Ben Widawsky
i << PAGE_SHIFT; > - > - memcpy_fromio(d, (void __iomem *) offset, PAGE_SIZE); > } else { > struct page *page; > void *s; > @@ -604,11 +618,9 @@ i915_error_object_create_sized(struct drm_i915_priva

Re: [Intel-gfx] [PATCH 01/10] drm/i915/bdw: Implement a basic PM interrupt handler

2014-04-25 Thread Ben Widawsky
On Mon, Apr 21, 2014 at 01:34:05PM +0530, deepa...@linux.intel.com wrote: > From: Ben Widawsky > > Almost all of it is reusable from the existing code. The primary > difference is we need to do even less in the interrupt handler, since > interrupts are not shared in the same way.

Re: [Intel-gfx] [PATCH 02/10] drm/i915: Enable PM Interrupts target via Display Interface.

2014-04-25 Thread Ben Widawsky
u8 val) > if (INTEL_INFO(dev_priv->dev)->gen <= 7 && !IS_HASWELL(dev_priv->dev)) > mask |= GEN6_PM_RP_UP_EI_EXPIRED; > > + mask |= GEN8_PMINTR_REDIRECT_TO_NON_DISP; > + > return ~mask; > } if (IS_BROADWELL(dev)), or gen>= 8

Re: [Intel-gfx] [PATCH 03/10] drm/i915/chv: Enable Render Standby (RC6) for Cheeryview

2014-04-25 Thread Ben Widawsky
rm_device *dev) > ironlake_enable_rc6(dev); > intel_init_emon(dev); > } else if (IS_GEN6(dev) || IS_GEN7(dev)) { > + if (IS_VALLEYVIEW(dev)) > + valleyview_setup_pctx(dev); Spurious hunk? > /* >

Re: [Intel-gfx] [PATCH 03/10] drm/i915/chv: Enable Render Standby (RC6) for Cheeryview

2014-04-25 Thread Ben Widawsky
Also, s/Cheeryview/Cherryview On Fri, Apr 25, 2014 at 02:42:26PM -0700, Ben Widawsky wrote: > On Mon, Apr 21, 2014 at 01:34:07PM +0530, deepa...@linux.intel.com wrote: > > From: Deepak S > > > > v2: Configure PCBR if BIOS fails allocate pcbr (deepak) > > > > v3

Re: [Intel-gfx] [PATCH 04/10] drm/i915/chv: Added CHV specific register read and write

2014-04-25 Thread Ben Widawsky
dev_priv->uncore.funcs.mmio_readl = chv_read32; > + dev_priv->uncore.funcs.mmio_readq = chv_read64; > + > + } else { > + dev_priv->uncore.funcs.mmio_writeb = gen8_write8; > +

Re: [Intel-gfx] [PATCH 05/10] drm/i915/chv: Enable RPS (Turbo) for Cheeryview

2014-04-25 Thread Ben Widawsky
diff --git a/drivers/gpu/drm/i915/intel_sideband.c > b/drivers/gpu/drm/i915/intel_sideband.c > index b1a5514..8f6904d 100644 > --- a/drivers/gpu/drm/i915/intel_sideband.c > +++ b/drivers/gpu/drm/i915/intel_sideband.c > @@ -106,6 +106,21 @@ void vlv_bunit_write(struct drm_i915_private *dev_p

Re: [Intel-gfx] [PATCH 06/10] drm/i915/chv: Streamline CHV forcewake stuff

2014-04-25 Thread Ben Widawsky
ORCEWAKE_RENDER & fwengine)) { \ > - if (--dev_priv->uncore.fw_rendercount == 0) \ > - > (dev_priv)->uncore.funcs.force_wake_put(dev_priv, \ > - > fwengine); \ > -

Re: [Intel-gfx] [PATCH 08/10] drm/i915/chv: Skip gen6_gt_check_fifodbg() on CHV

2014-04-25 Thread Ben Widawsky
same cacheline, but !FORCEWAKE_VLV */ > + __raw_posting_read(dev_priv, FORCEWAKE_ACK_VLV); > + if (!IS_CHERRYVIEW(dev_priv->dev)) > + gen6_gt_check_fifodbg(dev_priv); You could save a read for the VLV case, but no big deal. Reviewed-by: Ben Widawsky >

Re: [Intel-gfx] [PATCH 09/10] drm/i915/chv: Added CHV specific DDR fetch into init_clock_gating

2014-04-25 Thread Ben Widawsky
+ break; > + } > > DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & 0x10 ? "yes" : "no"); > DRM_DEBUG_DRIVER("GPU status: 0x%08x\n", val); This, like all the other patches related to freq. don't seem to be findable b

Re: [Intel-gfx] [PATCH 10/10] drm/i915/chv: Freq(opcode) request value for CHV.

2014-04-25 Thread Ben Widawsky
ew_delay = dev_priv->rps.cur_freq + adj; > } else { /* unknown event */ > new_delay = dev_priv->rps.cur_freq; splitting hairs a bit, but adding a new function that isn't named well doesn't really improve readability. Since we only ever do it for one c

[Intel-gfx] [PATCH] drm/i915: Support 64b relocations

2014-04-28 Thread Ben Widawsky
There are a few places that expect 32b values for offsets and these all won't work. Cc: Rafael Barbalho Cc: Chris Wilson Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/d

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-04-28 Thread Ben Widawsky
On Sat, Jan 25, 2014 at 08:10:06PM +0100, Daniel Vetter wrote: > On Fri, Jan 24, 2014 at 12:13:44PM -0800, Ben Widawsky wrote: > > ping > > Merged the first patch to topic/ppgtt, but punted on the 2nd - I think > with Mika's improvement to the guilty batch detection we

[Intel-gfx] [PATCH] drm/i915: Expand error state's address width to 64b

2014-04-28 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 539f16db..cdde849

[Intel-gfx] [PATCH] [v2] drm/i915: Expand error state's address width to 64b

2014-04-28 Thread Ben Widawsky
v2: 0 pad the new 8B fields or else intel_error_decode has a hard time. Note, regardless we need an igt update. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 16 +--- 2 files changed, 11 insertions(+), 9

[Intel-gfx] [PATCH] intel_error_decode: use 64b gtt_offset

2014-04-28 Thread Ben Widawsky
See the relevant kernel patch for the details. I guess this breaks support for older error state, I am not actually sure. Without versioning our error state though, I cannot think of a better way. Suggestions are welcome. Signed-off-by: Ben Widawsky --- tools/intel_error_decode.c | 14

Re: [Intel-gfx] [PATCH v2] drm/i915: Debugfs disable RPS boost and idle

2014-04-28 Thread Ben Widawsky
riv->rps.enabled > + && !dev_priv->rps.debugfs_disable_boost) { > if (IS_VALLEYVIEW(dev)) > vlv_set_rps_idle(dev_priv); > else > @@ -3178,7 +3180,9 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv) > struct drm_device *d

[Intel-gfx] [PATCH] [v3] drm/i915: Expand error state's address width to 64b

2014-04-28 Thread Ben Widawsky
v2: 0 pad the new 8B fields or else intel_error_decode has a hard time. Note, regardless we need an igt update. v3: Make reloc_offset 64b also. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 18 ++ 2

[Intel-gfx] [PATCH] drm/i915: Support 64b execbuf

2014-04-28 Thread Ben Widawsky
Previously, our code only had a 32b offset value for where the batchbuffer starts. With full PPGTT, and 64b canonical GPU address space, that is an insufficient value. The code to expand is pretty straight forward, and only one platform needs to do anything with the extra bits. Signed-off-by: Ben

Re: [Intel-gfx] [PATCH 10/13] drm/i915/bdw: collect semaphore error state

2014-04-29 Thread Ben Widawsky
On Mon, Feb 24, 2014 at 03:08:04PM +0200, Ville Syrjälä wrote: > On Wed, Feb 19, 2014 at 10:19:23PM -0800, Ben Widawsky wrote: > > Since the semaphore information is in an object, just dump it, and let > > the user parse it later. > > > > NOTE: The page being

[Intel-gfx] [PATCH 12/13] drm/i915: semaphore debugfs

2014-04-29 Thread Ben Widawsky
Simple debugfs file to display the current state of semaphores. This is useful if you want to see the state without hanging the GPU. NOTE: This patch is optional to the series. NOTE2: Like the GPU error state collection, the reads are currently incoherent. Signed-off-by: Ben Widawsky

[Intel-gfx] [PATCH 13/13] DONT_MERGE drm/i915: FORCE_RESTORE for gen8 semaphores

2014-04-29 Thread Ben Widawsky
This appears to not actually be needed on the current code. Just putting it on the ML so we can point bug reports at it later. As pointed out by Ville, the current code is "broken" since we do FORCE_RESTORE, and RESTORE_INHIBIT on the same dword. Anecdotally, this seems fine. Signed-o

[Intel-gfx] [PATCH 07/13] drm/i915/bdw: implement semaphore wait

2014-04-29 Thread Ben Widawsky
) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 33 + drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 10/13] drm/i915: Extract semaphore error collection

2014-04-29 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gpu_error.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 2d81985..a7eaab2 100644 --- a/drivers

[Intel-gfx] [PATCH 11/13] drm/i915/bdw: collect semaphore error state

2014-04-29 Thread Ben Widawsky
e) Do the proper math for the signal offset (Ville) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 51 ++--- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 - 3 files changed, 55 inser

[Intel-gfx] [PATCH 09/13] drm/i915/bdw: poll semaphores

2014-04-29 Thread Ben Widawsky
orkaround for certain > hardware issues, but it looks like those issues shouldn't affect us, > for the momemnt at least. So my suggestion was to try w/o polling > first (since there could be some power cost to polling) and add the > poll bit if problems arise. Signed-off-by: B

[Intel-gfx] [PATCH 02/13] drm/i915: Virtualize the ringbuffer signal func

2014-04-29 Thread Ben Widawsky
Syrjälä Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 42 - drivers/gpu/drm/i915/intel_ringbuffer.h | 11 + 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 01/13] drm/i915: Move semaphore specific ring members to struct

2014-04-29 Thread Ben Widawsky
This will be helpful in abstracting some of the code in preparation for gen8 semaphores. v2: Move mbox stuff to a separate struct v3: Rebased over VCS2 work Reviewed-by: Ville Syrjälä (v1) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 10 +-- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 06/13] drm/i915/bdw: implement semaphore signal

2014-04-29 Thread Ben Widawsky
14 14:01:11 2014 +0100 drm/i915: Consolidate binding parameters into flags v5: VCS2 rebase Replace hweight_long with hweight32 Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 5 +- drivers/gpu/drm/i915/i

[Intel-gfx] [PATCH 08/13] drm/i915: Implement MI decode for gen8

2014-04-29 Thread Ben Widawsky
From: Ben Widawsky This is needed to implement ipehr_is_semaphore_wait Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index

[Intel-gfx] [PATCH 04/13] drm/i915: Make semaphore updates more precise

2014-04-29 Thread Ben Widawsky
emit (Ville) Conditionally set .sync_to when semaphores are enabled (Ville) v3: Rebased on VCS2 Replace hweight_long with hweight32 (Ville) Reviewed-by: Ville Syrjälä (v1) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 173 +--- 1 file ch

[Intel-gfx] [PATCH 00/13] [REPOST] BDW Semaphores

2014-04-29 Thread Ben Widawsky
d, there's probably not much other than execlists to be painful The series is completely untested since the last rebase. I also didn't look really closely to make sure the rebase was correct - I'm just totally short on time atm. It was tested before that. Ben Widawsky (13): drm/i915

[Intel-gfx] [PATCH 05/13] drm/i915: gen specific ring init

2014-04-29 Thread Ben Widawsky
. v2: v1 had a stale commit message v3: Move everything in the is_semaphore_enabled() check v4: VCS2 rebase Remove double assignment of signal in render ring (Ville) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 187 +--- 1 file changed,

[Intel-gfx] [PATCH 03/13] drm/i915: Move ring_begin to signal()

2014-04-29 Thread Ben Widawsky
shared #define On a related not, gen8 will use a different number of dwords for semaphores, but not for add request. v2: Make number of dwords an explicit part of signalling (via function argument). (Chris) v3: very slight comment change Reviewed-by: Ville Syrjälä Signed-off-by: Ben Widawsky

Re: [Intel-gfx] [PATCH] intel_error_decode: use 64b gtt_offset

2014-04-29 Thread Ben Widawsky
On Tue, Apr 29, 2014 at 11:01:10AM +0200, Daniel Vetter wrote: > On Tue, Apr 29, 2014 at 10:52:44AM +0200, Daniel Vetter wrote: > > On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote: > > > See the relevant kernel patch for the details. I guess this breaks > > &

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Use timeout mode for RC6 on bdw

2014-04-29 Thread Ben Widawsky
DE(1) | > + rc6_mask); > > /* 4 Program defaults and thresholds for RPS*/ > I915_WRITE(GEN6_RPNSWREQ, > -- > 1.7.9.5 > > _______ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.or

Re: [Intel-gfx] [PATCH 13/13] DONT_MERGE drm/i915: FORCE_RESTORE for gen8 semaphores

2014-04-30 Thread Ben Widawsky
On Wed, Apr 30, 2014 at 08:13:25AM +0100, Chris Wilson wrote: > On Tue, Apr 29, 2014 at 02:52:40PM -0700, Ben Widawsky wrote: > > This appears to not actually be needed on the current code. Just putting > > it on the ML so we can point bug reports at it later. > > > > A

Re: [Intel-gfx] [PATCH 13/13] DONT_MERGE drm/i915: FORCE_RESTORE for gen8 semaphores

2014-04-30 Thread Ben Widawsky
On Wed, Apr 30, 2014 at 08:03:27PM +0100, Chris Wilson wrote: > On Wed, Apr 30, 2014 at 11:44:47AM -0700, Ben Widawsky wrote: > > On Wed, Apr 30, 2014 at 08:13:25AM +0100, Chris Wilson wrote: > > > On Tue, Apr 29, 2014 at 02:52:40PM -0700, Ben Widawsky wrote: > > > >

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Use timeout mode for RC6 on bdw

2014-04-30 Thread Ben Widawsky
On Wed, Apr 30, 2014 at 01:34:36PM -0700, Kristen Carlson Accardi wrote: > On Tue, 29 Apr 2014 22:31:49 -0700 > Ben Widawsky wrote: > > > On Wed, Apr 09, 2014 at 11:44:06AM -0700, Tom O'Rourke wrote: > > > Higher RC6 residency is observed using timeout mode &g

Re: [Intel-gfx] [PATCH] drm/i915: Hang counting is now always per-fd, so relax the ioctl for DEFAULT_CONTEXT

2014-05-01 Thread Ben Widawsky
t; > commit 0eea67eb26000657079b7fc41079097942339452 > Author: Ben Widawsky > Date: Fri Dec 6 14:11:19 2013 -0800 > > drm/i915: Create a per file_priv default context > > Signed-off-by: Chris Wilson > Cc: Ben Widawsky > Cc: Mika Kuoppala > Cc: Kenneth Graunke Acked-by

Re: [Intel-gfx] [RFC] libdrm_intel: Add support for userptr objects

2014-05-01 Thread Ben Widawsky
intel_bufmgr_priv.h b/intel/intel_bufmgr_priv.h > index 2592d42..3aa1abb 100644 > --- a/intel/intel_bufmgr_priv.h > +++ b/intel/intel_bufmgr_priv.h > @@ -60,7 +60,17 @@ struct _drm_intel_bufmgr { > const char *name, > unsigned long size, > unsigned int alignment); > - > + /** > + * Allocate a buffer object from an existing user accessible > + * address malloc'd with the provided size. > + * Alignment is used when mapping to the gtt. > + * Flags may be I915_VMAP_READ_ONLY or I915_USERPTR_UNSYNCHRONIZED > + */ > + drm_intel_bo *(*bo_alloc_userptr)(drm_intel_bufmgr *bufmgr, > + const char *name, void *addr, > + uint32_t tiling_mode, uint32_t stride, > + unsigned long size, > + unsigned long flags); > /** >* Allocate a tiled buffer object. >* Probably don't need the special function pointer yet since I don't think we can yet envision use cases which will require any kind of special handling. A simple has_userptr in bufmgr_gem will probably suffice. But I don't care too much either way. I couldn't spot any real bugs... -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Use timeout mode for RC6 on bdw

2014-05-01 Thread Ben Widawsky
On Wed, Apr 30, 2014 at 02:14:02PM -0700, Kristen Carlson Accardi wrote: > On Thu, 01 May 2014 00:03:15 +0300 > Imre Deak wrote: > > > On Wed, 2014-04-30 at 13:41 -0700, Ben Widawsky wrote: > > > On Wed, Apr 30, 2014 at 01:34:36PM -0700, Kristen Carlson Accardi wrote: >

[Intel-gfx] [PATCH] drm/i915/bdw: Don't allow the FBC base to be 0

2014-05-01 Thread Ben Widawsky
o make the code as future-proof, and as clear as possible, by match the spec. Cc: Art Runyan Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_stolen.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drive

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Don't allow the FBC base to be 0

2014-05-02 Thread Ben Widawsky
On Fri, May 02, 2014 at 04:00:25PM +0300, Ville Syrjälä wrote: > On Fri, May 02, 2014 at 09:38:11AM +0100, Chris Wilson wrote: > > On Fri, May 02, 2014 at 11:19:27AM +0300, Ville Syrjälä wrote: > > > On Thu, May 01, 2014 at 06:47:54PM -0700, Ben Widawsky wrote: > > > &

Re: [Intel-gfx] [RFC] libdrm_intel: Add support for userptr objects

2014-05-02 Thread Ben Widawsky
On Fri, May 02, 2014 at 11:27:45AM +0100, Tvrtko Ursulin wrote: > > On 05/01/2014 07:47 PM, Ben Widawsky wrote: > >On Wed, Feb 26, 2014 at 04:41:41PM +, Tvrtko Ursulin wrote: > >>From: Tvrtko Ursulin > >> > >>Allow userptr objects to be created and

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Don't allow the FBC base to be 0

2014-05-02 Thread Ben Widawsky
On Fri, May 02, 2014 at 09:35:20PM +0100, Chris Wilson wrote: > On Fri, May 02, 2014 at 10:00:01AM -0700, Ben Widawsky wrote: > > On Fri, May 02, 2014 at 04:00:25PM +0300, Ville Syrjälä wrote: > > > On Fri, May 02, 2014 at 09:38:11AM +0100, Chris Wilson wrote: > > > >

[Intel-gfx] [PATCH 12.1/13] drm/i915: Small semaphore debugfs fixup

2014-05-02 Thread Ben Widawsky
Each ring only has ring-1 sync seqnos. It is a bug to try to print extra. This should be squashed into drm/i915: semaphore debugfs. I don't have an easy way at the moment to do the rebase and resend, but that is what should be done. Signed-off-by: Ben Widawsky --- drivers/gpu/drm

[Intel-gfx] [PATCH 0/5] untested DRM node alloc cleanups

2014-05-03 Thread Ben Widawsky
nodes. With 64b PPGTT, and something like a userptr interface, doing this becomes a really desirable thing to do. In any event, I think the patches stand as a nice cleanup on their own, provided they don't blow anything up. I haven't had a chance to do anything but compile these

[Intel-gfx] [PATCH 1/5] drm/i915: Use topdown allocation for PPGTT PDEs on gen6/7

2014-05-03 Thread Ben Widawsky
what is what happens with the normal bottom up allocation we do today. Doing a top down allocation increases the odds that the HW contexts can get out of the way, especially with per FD contexts as is done in full PPGTT Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +

[Intel-gfx] [PATCH 3/5] drm/i915: WARN on unexpected return from drm_mm

2014-05-03 Thread Ben Widawsky
We only actually want to retry if the failure mode was not enough space, and so we'll evict. This will help us realize quickly in case we missed a change in the common drm code. NOTE: A similar check is already in place for the GEN7 PPGTT code. Signed-off-by: Ben Widawsky --- drivers/gp

[Intel-gfx] [PATCH 2/5] drm/i915: Extract node allocation from bind

2014-05-03 Thread Ben Widawsky
l. Frankly, I'd rather overflow the stack and blow it up than loop forever. In either case, this is addressed in the next patch. I believe, and intend, that other than the stack usage, there is no functional change here. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 4/5] drm/i915: Limit the number of node allocation retries

2014-05-03 Thread Ben Widawsky
eturn address and such)... it's way more than we want to use already. 64b architectures might be slightly better, since 6? of the first args will get passed through registers, but it's still bad. If anything, we might want to do way less than 100, like 3. Signed-off-by: Ben Widawsky ---

[Intel-gfx] [PATCH 5/5] drm/i915: Use new drm node allocator for PPGTT

2014-05-03 Thread Ben Widawsky
The two users were already really similar. By adding the flags (I hope you like a lot of arguments in your functions), we can satisfy both callers quite well. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 16 drivers/gpu/drm/i915/i915_gem.c | 34

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Flush request queue when waiting for ring space

2014-05-05 Thread Ben Widawsky
end upon (e.g. igt/gem_exec_lut_handle), this raises the > spectre that the ppgtt will randomly call i915_gpu_idle() and recurse > back into intel_ring_begin(). Forgive my ignorance. Why is i915_gpu_idle() randomly being called for PPGTT? I don't see anything PPGTT specific here. [snip

Re: [Intel-gfx] [PATCH 2/3] drm/i915: add render state initialization

2014-05-05 Thread Ben Widawsky
; +}; > + > +#endif /* __INTEL_RENDERSTATE_GEN6 */ > diff --git a/drivers/gpu/drm/i915/intel_renderstate_gen7.h > b/drivers/gpu/drm/i915/intel_renderstate_gen7.h > new file mode 100644 > index 000..9b1420b > --- /dev/null > +++ b/drivers/gpu/drm/i915/intel_renderstate_gen7.h > @@ -0,0 +1,11 @@ > +#ifndef __INTEL_RENDERSTATE_GEN7 > +#define __INTEL_RENDERSTATE_GEN7 > + > +static const uint32_t gen7_null_state_relocs[] = { > +}; > + > +static const uint32_t gen7_null_state_batch[] = { > + MI_BATCH_BUFFER_END, > +}; > + > +#endif /* __INTEL_RENDERSTATE_GEN7 */ > diff --git a/drivers/gpu/drm/i915/intel_renderstate_gen8.h > b/drivers/gpu/drm/i915/intel_renderstate_gen8.h > new file mode 100644 > index 000..d349dda > --- /dev/null > +++ b/drivers/gpu/drm/i915/intel_renderstate_gen8.h > @@ -0,0 +1,11 @@ > +#ifndef __INTEL_RENDERSTATE_GEN8 > +#define __INTEL_RENDERSTATE_GEN8 > + > +static const uint32_t gen8_null_state_relocs[] = { > +}; > + > +static const uint32_t gen8_null_state_batch[] = { > + MI_BATCH_BUFFER_END, > +}; > + > +#endif /* __INTEL_RENDERSTATE_GEN8 */ > -- > 1.7.9.5 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915/bdw: Only use 2g GGTT for 32b platforms

2014-05-06 Thread Ben Widawsky
From: Ben Widawsky Daniel requested in the bug that I use a 3GB fallback size. Since this is not in the spec as a valid size, I decided against it. We could potentially add a patch to bump it to 3GB on top of this one. This probably should be CC: stable - but I'll let the powers that be d

[Intel-gfx] [PATCH 6/9] drm/i915: Wrap VMA binding

2014-05-06 Thread Ben Widawsky
r the intended purpose, but I thought it was a nice patch to keep around. v2: s/i915_gem_bind_vma/i915_gem_vma_bind/ s/i915_gem_unbind_vma/i915_gem_vma_unbind/ (Chris) v3: Missed one spot Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 3 +++ drivers/gpu/drm

[Intel-gfx] [PATCH 1/9] drm/i915: Use topdown allocation for PPGTT PDEs on gen6/7

2014-05-06 Thread Ben Widawsky
what is what happens with the normal bottom up allocation we do today. Doing a top down allocation increases the odds that the HW contexts can get out of the way, especially with per FD contexts as is done in full PPGTT Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +

[Intel-gfx] [PATCH 3/9] drm/i915: WARN on unexpected return from drm_mm

2014-05-06 Thread Ben Widawsky
We only actually want to retry if the failure mode was not enough space, and so we'll evict. This will help us realize quickly in case we missed a change in the common drm code. NOTE: A similar check is already in place for the GEN7 PPGTT code. Signed-off-by: Ben Widawsky --- drivers/gp

[Intel-gfx] [PATCH 7/9] drm/i915: Make aliasing a 2nd class VM

2014-05-06 Thread Ben Widawsky
they shouldn't. I have no issue with an eventual revert of this patch. It makes sense for what we have today. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH 5/9] drm/i915: Use new drm node allocator for PPGTT

2014-05-06 Thread Ben Widawsky
The two users were already really similar. By adding the flags (I hope you like a lot of arguments in your functions), we can satisfy both callers quite well. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 16 drivers/gpu/drm/i915/i915_gem.c | 34

[Intel-gfx] [PATCH 8/9] drm/i915: Make pin global flags explicit

2014-05-06 Thread Ben Widawsky
zed should fix both of the issues. This patch which should have no functional impact begins to address these issues without intentionally breaking things. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 4 +++- drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 9/9] drm/i915: Split out aliasing binds

2014-05-06 Thread Ben Widawsky
requiring just this. A nice benefit of this is we should no longer be able to clobber GTT only objects from the aliasing PPGTT. TEST=gem_storedw_batches_loop Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 2 +- drivers/gpu/drm/i915/i915_gem.c| 6 -- drivers

[Intel-gfx] [PATCH 2/9] drm/i915: Extract node allocation from bind

2014-05-06 Thread Ben Widawsky
l. Frankly, I'd rather overflow the stack and blow it up than loop forever. In either case, this is addressed in the next patch. I believe, and intend, that other than the stack usage, there is no functional change here. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 4/9] drm/i915: Limit the number of node allocation retries

2014-05-06 Thread Ben Widawsky
eturn address and such)... it's way more than we want to use already. 64b architectures might be slightly better, since 6? of the first args will get passed through registers, but it's still bad. If anything, we might want to do way less than 100, like 3. Signed-off-by: Ben Widawsky ---

Re: [Intel-gfx] [PATCH 4/9] drm/i915: Limit the number of node allocation retries

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 09:49:57AM +0200, Daniel Vetter wrote: > On Tue, May 06, 2014 at 10:21:33PM -0700, Ben Widawsky wrote: > > AFAICT, it's impossible to actually infinitely retry the allocation in > > our current code. However, a small oversight on my part, slight bu

Re: [Intel-gfx] [PATCH 2/9] drm/i915: Extract node allocation from bind

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 08:02:38AM +0100, Chris Wilson wrote: > On Tue, May 06, 2014 at 10:21:31PM -0700, Ben Widawsky wrote: > > The DRM node allocation code was already a bit of an ugly bit of code > > within a complex function. Removing it serves the purpose of cleaning >

Re: [Intel-gfx] [PATCH 6/9] drm/i915: Wrap VMA binding

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 09:55:49AM +0200, Daniel Vetter wrote: > On Tue, May 06, 2014 at 10:21:35PM -0700, Ben Widawsky wrote: > > This will be useful for some upcoming patches which do more platform > > specific work. Having it in one central place just makes things a bit > &g

Re: [Intel-gfx] [PATCH 2/9] drm/i915: Extract node allocation from bind

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 04:53:08PM +0100, Chris Wilson wrote: > On Wed, May 07, 2014 at 08:45:38AM -0700, Ben Widawsky wrote: > > On Wed, May 07, 2014 at 08:02:38AM +0100, Chris Wilson wrote: > > > On Tue, May 06, 2014 at 10:21:31PM -0700, Ben Widawsky wrote: > > > >

Re: [Intel-gfx] [PATCH 08/13] drm/i915: Implement MI decode for gen8

2014-05-07 Thread Ben Widawsky
On Wed, Apr 30, 2014 at 02:21:15PM +0300, Ville Syrjälä wrote: > On Tue, Apr 29, 2014 at 02:52:35PM -0700, Ben Widawsky wrote: > > From: Ben Widawsky > > > > This is needed to implement ipehr_is_semaphore_wait > > > > Signed-off-by: Ben Widawsky > > -

[Intel-gfx] [PATCH 05/10] drm/i915: Implement MI decode for gen8

2014-05-07 Thread Ben Widawsky
From: Ben Widawsky This is needed to implement ipehr_is_semaphore_wait Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index

[Intel-gfx] [PATCH 03/10] drm/i915/bdw: implement semaphore signal

2014-05-07 Thread Ben Widawsky
14 14:01:11 2014 +0100 drm/i915: Consolidate binding parameters into flags v5: VCS2 rebase Replace hweight_long with hweight32 Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 5 +- drivers/gpu/drm/i915/i

[Intel-gfx] [PATCH 07/10] drm/i915/bdw: collect semaphore error state

2014-05-07 Thread Ben Widawsky
e) Do the proper math for the signal offset (Ville) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 51 ++--- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 - 3 files changed, 55 inser

[Intel-gfx] [PATCH 06/10] drm/i915: Extract semaphore error collection

2014-05-07 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gpu_error.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 2d81985..a7eaab2 100644 --- a/drivers

[Intel-gfx] [PATCH 09/10] drm/i915/bdw: poll semaphores

2014-05-07 Thread Ben Widawsky
orkaround for certain > hardware issues, but it looks like those issues shouldn't affect us, > for the momemnt at least. So my suggestion was to try w/o polling > first (since there could be some power cost to polling) and add the > poll bit if problems arise. Signed-off-by: B

[Intel-gfx] [PATCH 08/10] drm/i915: semaphore debugfs

2014-05-07 Thread Ben Widawsky
Simple debugfs file to display the current state of semaphores. This is useful if you want to see the state without hanging the GPU. NOTE: This patch is optional to the series. NOTE2: Like the GPU error state collection, the reads are currently incoherent. Signed-off-by: Ben Widawsky

[Intel-gfx] [PATCH 00/10] Semaphores again. Needs shepherd.

2014-05-07 Thread Ben Widawsky
g I am aware. If someone could take over the patches, and get them merged, I think it'd really help in getting this useful feature added to our driver for gen8. * The last two patches aren't needed, but are here for posterity. If nobody has taken this over when I return I will see if

[Intel-gfx] [PATCH 04/10] drm/i915/bdw: implement semaphore wait

2014-05-07 Thread Ben Widawsky
) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 33 + drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 02/10] drm/i915: gen specific ring init

2014-05-07 Thread Ben Widawsky
. v2: v1 had a stale commit message v3: Move everything in the is_semaphore_enabled() check v4: VCS2 rebase Remove double assignment of signal in render ring (Ville) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 225 +--- 1 file changed,

[Intel-gfx] [PATCH 10/10] DONT_MERGE drm/i915: FORCE_RESTORE for gen8 semaphores

2014-05-07 Thread Ben Widawsky
This appears to not actually be needed on the current code. Just putting it on the ML so we can point bug reports at it later. As pointed out by Ville, the current code is "broken" since we do FORCE_RESTORE, and RESTORE_INHIBIT on the same dword. Anecdotally, this seems fine. Signed-o

Re: [Intel-gfx] [PATCH 2/9] drm/i915: Extract node allocation from bind

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 05:55:00PM +0100, Chris Wilson wrote: > On Wed, May 07, 2014 at 09:00:16AM -0700, Ben Widawsky wrote: > > On Wed, May 07, 2014 at 04:53:08PM +0100, Chris Wilson wrote: > > > On Wed, May 07, 2014 at 08:45:38AM -0700, Ben Widawsky wrote: > > > >

[Intel-gfx] [PATCH 01/10] drm/i915: Make semaphore updates more precise

2014-05-07 Thread Ben Widawsky
emit (Ville) Conditionally set .sync_to when semaphores are enabled (Ville) v3: Rebased on VCS2 Replace hweight_long with hweight32 (Ville) v4: Pull out the accidentally squashed hunk from the next patch after rebase (Daniel). Reviewed-by: Ville Syrjälä (v1) Signed-off-by: Ben Widawsky --- dr

Re: [Intel-gfx] [PATCH] drm/i915/bdw: Only use 2g GGTT for 32b platforms

2014-05-07 Thread Ben Widawsky
On Wed, May 07, 2014 at 09:42:57AM +0200, Daniel Vetter wrote: > On Tue, May 06, 2014 at 09:58:59PM -0700, Ben Widawsky wrote: > > From: Ben Widawsky > > > > Daniel requested in the bug that I use a 3GB fallback size. Since this > > is not in the spec as a valid siz

[Intel-gfx] [PATCH] [v3] drm/i915/bdw: Only use 2g GGTT for 32b platforms

2014-05-07 Thread Ben Widawsky
ssion from a revert of the revert: commit 7907f45bf9f67a1c5e5d4ae05bab428d7c2f43b2 Author: Ben Widawsky Date: Wed Feb 19 22:05:46 2014 -0800 Revert "drm/i915/bdw: Limit GTT to 2GB" v2: Change ifdef to 32b, instead of ifndef update comment v3. Update comment to not wrap (Daniel)

[Intel-gfx] Broadwell bugs for the next 1.5 weeks

2014-05-08 Thread Ben Widawsky
Hi everyone. I'll be out on vacation until WW21.3. In my absence if you need an owner for any critical bugs, please make Rodrigo the point of contact. -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing list Inte

Re: [Intel-gfx] [RFC] libdrm_intel: Add support for userptr objects

2014-05-08 Thread Ben Widawsky
TR_UNSYNCHRONIZED 0x8000 > + /** > + * Returned handle for the object. > + * > + * Object handles are nonzero. > + */ > + __u32 handle; > +}; > + Oh yeah. I want a ctx_id here as well. Chris, any objection to adding this? [snip] -- Ben Widawsky

[Intel-gfx] [PATCH 02/56] Revert "drm/i915: Drop I915_PARAM_HAS_FULL_PPGTT again"

2014-05-09 Thread Ben Widawsky
This reverts commit 7d9c477966e739a52d4c9655149958a2671ef376. Conflicts: drivers/gpu/drm/i915/i915_dma.c include/uapi/drm/i915_drm.h --- drivers/gpu/drm/i915/i915_dma.c | 5 - include/uapi/drm/i915_drm.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/

[Intel-gfx] [PATCH 00/56] [RFCish] Dynamic page table alloc, 64b, and GPU/CPU mirror

2014-05-09 Thread Ben Widawsky
think it's really relevant here. One last thing. Intel GPU tools, as it stands today, makes a lot of assumptions about using an address space > 32b. I have not had time to fix this. It is something which needs fixing before this series could even be considered testable. [1] http://lists

[Intel-gfx] [PATCH 03/56] drm/i915: Prevent signals from interrupting close()

2014-05-09 Thread Ben Widawsky
vma and contexts under full-ppgtt, but this is useful piece of defensive programming enforcing our userspace API contract. Cc: Ben Widawsky Signed-off-by: Chris Wilson Reviewed-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 9 + 1 file changed, 9 insertions(+) diff --git a

[Intel-gfx] [PATCH 01/56] drm/i915: Fix flush before context switch comment

2014-05-09 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 6e2145b..29dd825 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 06/56] drm/i915: Split out aliasing binds

2014-05-09 Thread Ben Widawsky
requiring just this. A nice benefit of this is we should no longer be able to clobber GTT only objects from the aliasing PPGTT. v2: Only add aliasing binds for the GGTT/Aliasing PPGTT at execbuf Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 2 +- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 05/56] drm/i915: Make pin global flags explicit

2014-05-09 Thread Ben Widawsky
zed should fix both of the issues. This patch which should have no functional impact begins to address these issues without intentionally breaking things. v2: Replace PIN_GLOBAL with PIN_ALIASING in _pin(). Copy paste error Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 08/56] drm/i915: Rename to GEN8_LEGACY_PDPES

2014-05-09 Thread Ben Widawsky
In gen8, 32b PPGTT has always had one "pdp" (it doesn't actually have one, but it resembles having one). The #define was confusing as is, and using "PDPE" is a much better description. sed -i 's/GEN8_LEGACY_PDPS/GEN8_LEGACY_PDPES/' drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 04/56] drm/i915: Wrap VMA binding

2014-05-09 Thread Ben Widawsky
v2: s/i915_gem_bind_vma/i915_gem_vma_bind/ s/i915_gem_unbind_vma/i915_gem_vma_unbind/ (Chris) v3: Missed one spot v4: Don't change the trace events (Daniel) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 3 +++ drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 12/56] drm/i915: Setup less PPGTT on failed pagedir

2014-05-09 Thread Ben Widawsky
The current code will both potentially print a WARN, and setup part of the PPGTT structure. Neither of these harm the current code, it is simply for clarity, and to perhaps prevent later bugs, or weird debug messages. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 5

[Intel-gfx] [PATCH 13/56] drm/i915: clean up PPGTT init error path

2014-05-09 Thread Ben Widawsky
cific init, now that GEN8 exists. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 5ca8208..08b1b25 1

[Intel-gfx] [PATCH 19/56] drm/i915: Complete page table structures

2014-05-09 Thread Ben Widawsky
Move the remaining members over to the new page table structures. This can be squashed with the previous commit if desire. The reasoning is the same as that patch. I simply felt it is easier to review if split. Signed-off-by: Ben Widawsky Conflicts: drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 14/56] drm/i915: Un-hardcode number of page directories

2014-05-09 Thread Ben Widawsky
trivial. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index 7c06c43..2002393 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h

<    2   3   4   5   6   7   8   9   10   11   >