Re: [Intel-gfx] Help to enable Iris Pro on Retina MBP 11.3

2014-01-06 Thread Jani Nikula
On Mon, 06 Jan 2014, "Lu, Ran" wrote: > I just got a Retina MBP with Iris Pro and Nvidia GT 750. The iGPU works in > OSX(Mavericks), but when I boot into Linux, the device was disabled. I > debugged the kernel a little, apparently when pci_bus_read_dev_vendor_id is > called for PCI 00:2.0 (the

Re: [Intel-gfx] [RFC PATCH] drm/i915: move module parameters into a struct

2014-01-06 Thread Daniel Vetter
On Fri, Jan 03, 2014 at 02:19:51PM -0200, Paulo Zanoni wrote: > 2014/1/3 Jani Nikula : > > With 20+ module parameters I think referring to them via a struct > > improves clarity. The downsides are losing static on a couple of > > variables and not having the initialization and module_param_named()

Re: [Intel-gfx] [PATCH 4/5] intel: Intel full PPGTT param

2014-01-06 Thread Daniel Vetter
On Thu, Jan 02, 2014 at 07:50:33PM -1000, Ben Widawsky wrote: > This will allow mesa to determine if it needs to create a context, or > can reuse the default context. Reusing the default context saves memory, > and startup time. > > To keep the libdrm interface as dumb as possible, we simply expos

Re: [Intel-gfx] [PATCH] [v2] drm/i915/ppgtt: Never return a NULL context

2014-01-06 Thread Daniel Vetter
On Fri, Jan 03, 2014 at 02:07:47PM +0200, Mika Kuoppala wrote: > Ben Widawsky writes: > > > It makes all the code which calls into this function way too confusing. > > > > v2: Fix destroy IOCTL as well > > > > v3: Clarify the other two callers of i915_gem_context_get() to never > > check for NULL

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Only bind each object rather than for every execbuffer

2014-01-06 Thread Daniel Vetter
On Wed, Jan 01, 2014 at 02:00:54PM +, Chris Wilson wrote: > One side-effect of the introduction of ppgtt was that we needed to > rebind the object into the appropriate vm (and global gtt in some > peculiar cases). For simplicity this was done twice for every object on > every call to execbuffer

Re: [Intel-gfx] (no subject)

2014-01-06 Thread Daniel Vetter
On Mon, Dec 30, 2013 at 07:59:49AM +0530, Oravil Nair wrote: > Hi, > > i915_gem_object_pin(), during i915 driver create, seems to write to the > memory written by BIOS. Where can the start address be specified to > allocate memory so that the memory written by BIOS is not overwritten at > initiali

Re: [Intel-gfx] [PATCH 6/6] tests/kms_flip: free the test_output struct when counting modes

2014-01-06 Thread Daniel Vetter
On Mon, Dec 30, 2013 at 01:56:53PM -0200, Paulo Zanoni wrote: > From: Paulo Zanoni > > Looks like we have to do a lot of work just to count the number of > modes... > > Caught by Valgrind. > > Signed-off-by: Paulo Zanoni Nice set of patches, please push. I agree that the mode/output config ha

Re: [Intel-gfx] [PATCH] drm/i915: set ctx->initialized only after RCS

2014-01-06 Thread Daniel Vetter
On Sat, Dec 28, 2013 at 01:31:49PM -0800, Ben Widawsky wrote: > The initialized flag is used to specify a context has been initialized > and it's context is safe to load, ie. the 3d state is setup properly. > With full PPGTT, we emit the address space loads during context switch > and this currentl

Re: [Intel-gfx] [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h

2014-01-06 Thread Daniel Vetter
On Tue, Jan 7, 2014 at 12:31 AM, Jesse Barnes wrote: > On Thu, 19 Dec 2013 10:48:01 -0800 > Jesse Barnes wrote: > >> When fastbooting, we read out the pipe timings early on, and then in a >> panel fitted config, disable the fitter later. But we weren't updating >> the pipe src h/w, which meant t

Re: [Intel-gfx] A few clean-ups and a baby step towards unified register definitions

2014-01-06 Thread Kenneth Graunke
On 01/06/2014 07:02 AM, Damien Lespiau wrote: > Having one source for registers defines sounds like a good idea. These > patches, > written long ago, were a baby step towards that goal by cleaning-up the > INSTDONE definitons to be like the kernel ones. > > Along the way, I removed one tool that

[Intel-gfx] [PATCH] drm/i915/bdw: don't try to check IPS state on BDW

2014-01-06 Thread Jesse Barnes
According to Art, we don't have a way to read back the state reliably at runtime, at least not without risking disabling it again. So drop the readout and checking on BDW. References: https://bugs.freedesktop.org/show_bug.cgi?id=71906 Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_d

Re: [Intel-gfx] [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h

2014-01-06 Thread Jesse Barnes
On Thu, 19 Dec 2013 10:48:01 -0800 Jesse Barnes wrote: > When fastbooting, we read out the pipe timings early on, and then in a > panel fitted config, disable the fitter later. But we weren't updating > the pipe src h/w, which meant the mouse cursor was clipped to the > pfitted size rather than

Re: [Intel-gfx] Supporting fused display configurations v4

2014-01-06 Thread Paulo Zanoni
Hi 2014/1/6 Damien Lespiau : > Follow up of the v3: > http://lists.freedesktop.org/archives/intel-gfx/2013-December/037333.html > > The main change is the removal of INTEL_INFO() from the driver (patches 1 to > 5), a clean-up suggested by Chris: the usage of that macro hides that we go > from de

[Intel-gfx] [PATCH 12/12] drm/i915: Use I915_MAX_PIPES in the pipe/plane_to_crtc_mapping definitions

2014-01-06 Thread Damien Lespiau
Reviewed-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a0713e2..c289b8f 100644 --- a/d

[Intel-gfx] [PATCH 06/12] drm/i915: Constify the drm_i915_private pointer a bit more

2014-01-06 Thread Damien Lespiau
A lot of the WM functions are only reading from that structure and are already using const. While converting the code to use dev_priv instead of dev, I noticed a few places where we can give that hint. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_pm.c | 8 1 file changed

[Intel-gfx] [PATCH 09/12] drm/i915: Consolidate FUSE_STRAP in one set of defines

2014-01-06 Thread Damien Lespiau
We had 2 set of defines for the same register, so make it one. Reviewed-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_reg.h | 18 -- drivers/gpu/drm/i915/intel_ddi.c | 2 +- drivers/gpu/drm/i915/intel_display.

[Intel-gfx] [PATCH 01/12] drm/i915: Get rid of the INTEL_INFO() usage in i915_drv.h

2014-01-06 Thread Damien Lespiau
While the longer goal is to have dev_priv == dev by properly subclassing struct drm_device, quite a few macros in i915_drv.h need the dev argument. Let's not try to disrupt everything yet and just remove their usage of INTEL_INFO() as a first step. Signed-off-by: Damien Lespiau --- drivers/gpu/d

[Intel-gfx] [PATCH 10/12] drm/i915: Disable display when fused off

2014-01-06 Thread Damien Lespiau
FUSE_STRAP has a bit to inform us that the display has been fused off. Use it to setup the definitive number of pipes at run-time. v2: actually tweak num_pipes, not num_planes v3: also tests SFUSE_STRAP bit 7 v4: rebase on top of the INTEL_INFO() removal Reviewed-by: Mika Kuoppala (for v3) Revie

[Intel-gfx] [PATCH 02/12] drm/i915: Convert a few WM functions to use struct drm_i915_private directly

2014-01-06 Thread Damien Lespiau
A pointer to the struct drm_device is not needed in a few of the WM functions, so just pass a pointer to dev_priv. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_pm.c | 50 + 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/dri

[Intel-gfx] [PATCH 08/12] drm/i915: Move num_plane to the intel_device_info structure

2014-01-06 Thread Damien Lespiau
And rename it to num_sprites as this value doesn't count the primary plane. This limit lives with num_pipes really, and now that dev_priv->info is writable we can put it there instead. While at it, introduce a intel_device_info_runtime_init() where we'll be able to gather the device info fields a

[Intel-gfx] [PATCH 11/12] drm/i915: Remove the Quanta special case

2014-01-06 Thread Damien Lespiau
We now read out the FUSE_STRAP and SFUSE_STRAP registers, looking for configurations with display fused off. Let's remove the Quanta special case and rely on the programmed fuses to set num_pipes to 0. This patch is untested and could use a good soul with such a device to give it a go. Cc: Ben Wi

[Intel-gfx] [PATCH 05/12] drm/i915: Remove INTEL_INFO()

2014-01-06 Thread Damien Lespiau
Finally, we reach the goal of the last few patches: the removal of INTEL_INFO() in favor of a direct dev_priv usage. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_drv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH 04/12] drm/i915: Finish replacing INTEL_INFO() by direct dev_priv usage

2014-01-06 Thread Damien Lespiau
The last occurences of INTEL_INFO() that weren't caught by the sed in: drm/i915: Mass replace INTEL_INFO() by dev_priv->info Nothing particularly noticeable except, maybe, the nice feeling of removing a few back and forth between *dev and *dev_priv. Signed-off-by: Damien Lespiau --- drivers/g

[Intel-gfx] Supporting fused display configurations v4

2014-01-06 Thread Damien Lespiau
Follow up of the v3: http://lists.freedesktop.org/archives/intel-gfx/2013-December/037333.html The main change is the removal of INTEL_INFO() from the driver (patches 1 to 5), a clean-up suggested by Chris: the usage of that macro hides that we go from dev to dev_priv while we could use the dev_

[Intel-gfx] A few clean-ups and a baby step towards unified register definitions

2014-01-06 Thread Damien Lespiau
Having one source for registers defines sounds like a good idea. These patches, written long ago, were a baby step towards that goal by cleaning-up the INSTDONE definitons to be like the kernel ones. Along the way, I removed one tool that isn't even compiled and another unusued one. -- Damien _

[Intel-gfx] [PATCH igt 4/6] lib: Use INSTDONE_I965 and INSTDONE_1 for gen6

2014-01-06 Thread Damien Lespiau
The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old names (this is what the kernel does). Signed-off-by: Damien Lespiau --- lib/instdone.c | 6 +++--- tools/intel_reg_dumper.c | 4 ++-- 2 files changed

[Intel-gfx] [PATCH igt 2/6] instdone: Add an assert to make sure we never overflow instdone_bits

2014-01-06 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/instdone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/instdone.c b/lib/instdone.c index b4d51f0..1399df7 100644 --- a/lib/instdone.c +++ b/lib/instdone.c @@ -37,6 +37,7 @@ int num_instdone_bits = 0; static void add_instdone_bit(uint32_t reg, ui

[Intel-gfx] [PATCH igt 3/6] lib: Move the INSTDONE bit definitions to instdone.c

2014-01-06 Thread Damien Lespiau
This is the only place where they are used and we've even started using 1 << n constants with gen 7. Signed-off-by: Damien Lespiau --- lib/instdone.c | 242 lib/intel_reg.h | 237 -- 2 f

[Intel-gfx] [PATCH igt 6/6] tools: Remove intel_disable_clock_gating

2014-01-06 Thread Damien Lespiau
This tool only supports ILK. I take the fact that nobody has felt the need to update for later platform a sign it's not very useful. Signed-off-by: Damien Lespiau --- tools/.gitignore | 1 - tools/Makefile.sources | 1 - tools/intel_disable_clock_gating.c | 71 ---

[Intel-gfx] [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE

2014-01-06 Thread Damien Lespiau
That's how the registers are named in the kernel defines. Signed-off-by: Damien Lespiau --- lib/instdone.c | 6 +++--- lib/intel_reg.h| 6 +++--- tools/intel_error_decode.c | 2 +- tools/intel_gpu_top.c | 8 tools/intel_reg_dumper.c | 2 +- 5 files changed

[Intel-gfx] [PATCH igt 5/6] tools: Removed unused tools/intel_iosf_read.c

2014-01-06 Thread Damien Lespiau
Also intel_iosf_read() does not exist, and would need a bit more arguments. Signed-off-by: Damien Lespiau --- tools/intel_iosf_read.c | 70 - 1 file changed, 70 deletions(-) delete mode 100644 tools/intel_iosf_read.c diff --git a/tools/intel_iosf

Re: [Intel-gfx] [PATCH igt] intel_error_decode: Factor out common decoding code

2014-01-06 Thread Damien Lespiau
On Mon, Dec 16, 2013 at 12:02:53PM +, Damien Lespiau wrote: > 4 pieces of code were looking very similar. Let's factor out a common > function in the not so unlikely case we need to tweak that code. > > Signed-off-by: Damien Lespiau Pushed. -- Damien > --- > tools/intel_error_decode.c |

Re: [Intel-gfx] [PATCH] drm/i915: Fix refcount leak and possible NULL pointer dereference.

2014-01-06 Thread Daniel Vetter
On Sun, Jan 05, 2014 at 10:08:42AM +0900, Tetsuo Handa wrote: > Chris Wilson wrote: > > > Then, this file->pid in &dev->filelist keeps at least one reference. > > > OK. Updated patch follows. > > > > Looks good to me, and the comment is great. > > -Chris > > Please pick up this patch via your git

Re: [Intel-gfx] [REGRESSION] 3.13-rc2: locks up hard on trying to transfer a file to mmc based internal SD card slot [FOUND]

2014-01-06 Thread Martin Steigerwald
Am Dienstag, 31. Dezember 2013, 13:52:05 schrieb Martin Steigerwald: > Am Dienstag, 31. Dezember 2013, 13:41:22 schrieb Martin Steigerwald: > > Am Samstag, 30. November 2013, 14:53:51 schrieb Martin Steigerwald: > > > Just added linux-mmc. And I might git-bisect that at some time, but I do > > > no

Re: [Intel-gfx] [REGRESSION] 3.13-rc2: locks up hard on trying to transfer a file to mmc based internal SD card slot

2014-01-06 Thread Martin Steigerwald
Am Samstag, 30. November 2013, 14:53:51 schrieb Martin Steigerwald: > Just added linux-mmc. And I might git-bisect that at some time, but I do not > intend to do it during my precious weekend. The chances of me bisecting it > increase with workable suggestions on how to cut down the amount of > ite

[Intel-gfx] Help to enable Iris Pro on Retina MBP 11.3

2014-01-06 Thread Lu, Ran
Hi guys, I just got a Retina MBP with Iris Pro and Nvidia GT 750. The iGPU works in OSX(Mavericks), but when I boot into Linux, the device was disabled. I debugged the kernel a little, apparently when pci_bus_read_dev_vendor_id is called for PCI 00:2.0 (the intel gpu), it returns -1 which indic