[Intel-gfx] [PATCH v2 3/8] drm/i915: Partition the fence registers for vgpu in i915 driver

2014-10-17 Thread Yu Zhang
In XenGT, the fence registers are partitioned by multiple vgpu instances in different VMs. Routine i915_gem_load() is modified to reset the num_fence_regs, when the driver detects it's runing in a VM. And the allocated fence numbers is provided in PV INFO page structure. Signed-off-by: Yu Zhang

[Intel-gfx] [PATCH v2 2/8] drm/i915: Adds graphic address space ballooning logic

2014-10-17 Thread Yu Zhang
In XenGT, the global graphic memory space is partitioned by multiple vgpu instances in different VMs. The ballooning code is added in i915_gem_setup_global_gtt(), utilizing the drm mm allocator APIs to mark the graphic address space which are partitioned out to other vgpus as reserved. v2: take

[Intel-gfx] [PATCH v2 1/8] drm/i915: Introduce a PV INFO page structure for Intel GVT-g.

2014-10-17 Thread Yu Zhang
Introduce a PV INFO structure, to facilitate the Intel GVT-g technology, which is a GPU virtualization solution with mediated pass-through(previously known as XenGT). This page contains the shared information between i915 driver and the mediator. For now, this structure utilizes an area of 4K

[Intel-gfx] [PATCH v2 4/8] drm/i915: Disable framebuffer compression for i915 driver in VM

2014-10-17 Thread Yu Zhang
Framebuffer compression is disabled when driver detects it's running in XenGT VM, because XenGT does not provide emulations for FBC related operations, and we do not expose stolen memory to the VM. v2: take Chris' comments: - move the code into intel_update_fbc() Signed-off-by: Yu Zhang

[Intel-gfx] [PATCH v2 7/8] drm/i915: Create vgpu specific write MMIO to reduce traps

2014-10-17 Thread Yu Zhang
In the virtualized environment, forcewake operations are not necessory for the driver, because mmio accesses will be trapped and emulated by the host side, and real forcewake operations are also done in the host. New mmio write handlers are added to directly call the __raw_i915_write, therefore

[Intel-gfx] [PATCH v2 6/8] drm/i915: Disable power management for i915 driver in VM

2014-10-17 Thread Yu Zhang
In XenGT, GPU power management is controlled by host i915 driver, so there is no need to provide virtualized GPU PM support. In the future it might be useful to gather VM input for freq boost, but now let's disable it simply. v2: take Chris' comments: - do not special case this to gen6+

[Intel-gfx] [PATCH v2 8/8] drm/i915: Support alias ppgtt in VM if ppgtt is enabled

2014-10-17 Thread Yu Zhang
The current XenGT only supports alias ppgtt. And the emulation is done in XenGT host by first trapping PP_DIR_BASE mmio accesses. Updating PP_DIR_BASE by using instructions such as MI_LOAD_REGISTER_IMM are hard to detect and are not supported in current XenGT. Therefore this patch also added a new

[Intel-gfx] [PULL] drm-intel-next-fixes for 3.18

2014-10-17 Thread Jani Nikula
Hi Dave - Here's the first batch of fixes for 3.18. BR, Jani. The following changes since commit ebb69c95175609990af708ec90c46530f5a2c819: drm/i915: Enable pixel replicated modes on BDW and HSW. (2014-10-01 10:01:41 +0200) are available in the git repository at:

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports

2014-10-17 Thread Ville Syrjälä
On Thu, Oct 16, 2014 at 12:38:55PM -0700, Todd Previte wrote: On 10/16/2014 10:46 AM, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do a dummy DPCD read before the actual read

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without errors. My HP ZR24w monitor seems

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to perform aux transfers. This would lead to an endless cycle of vdd

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Don't claim that we're resetting PCH ADPA register

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com intel_crt_reset() resets the ADPA register on all gen5+ platforms. However the debug message claims it's touching the PCH ADPA register which is clearly not what it does on VLV. Drop

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do a dummy DPCD read before the actual read

2014-10-17 Thread Ville Syrjälä
On Fri, Oct 17, 2014 at 11:43:21AM +0300, Jani Nikula wrote: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the

Re: [Intel-gfx] [PATCH 2/5] drm/i915: Fix GMBUSFREQ on vlv/chv

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com vlv_cdclk_freq is in kHz but we need MHz for the GMBUSFREQ divider. This is a regression from: commit f8bf63fdcb1f82459dae7a3f22ee5ce92f3ea727 Author: Ville Syrjälä

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports

2014-10-17 Thread Ville Syrjälä
On Fri, Oct 17, 2014 at 11:49:54AM +0300, Jani Nikula wrote: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to handle hpd we would need to turn on vdd to

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Fix chv PCS DW11 register defines

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com I managed to fumble the per spline PCS DW11 register defines in: commit 9d4f193b077c1973add53e40ff9410a3371900af Looks like commit 570e2a747bc06cd8620662c5125ec2dc964c511b in my repo.

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv

2014-10-17 Thread Jani Nikula
On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Only ports B and C have the power sequencer and backlight controls, so complain if we ever try to register an eDP connector on some other port. Signed-off-by: Ville Syrjälä

Re: [Intel-gfx] DRI3 only DDX driver

2014-10-17 Thread Steven Newbury
On Mon, 2014-09-01 at 12:09 +0100, Steven Newbury wrote: I tried building the xorg intel ddx driver with only DRI3 support, with DRI1 and DRI2 disabled. glxinfo says direct rendering is enabled, but gives no core contexts*. gnome-shell appears to be using software fallback, generally

Re: [Intel-gfx] [PATCH] drm/i915: call drm_vblank_cleanup() earlier at unload

2014-10-17 Thread Ville Syrjälä
On Wed, Oct 15, 2014 at 02:15:04PM -0300, Paulo Zanoni wrote: From: Paulo Zanoni paulo.r.zan...@intel.com In its current place, it just segfaults while trying to access the CRTC structures: [ 9132.421681] Call Trace: [ 9132.421707] [a01130d8] i915_get_crtc_scanoutpos+0x1e8/0x220

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv

2014-10-17 Thread Ville Syrjälä
On Fri, Oct 17, 2014 at 12:47:31PM +0300, Jani Nikula wrote: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Only ports B and C have the power sequencer and backlight controls, so complain if we ever try to register an eDP

[Intel-gfx] [PATCH i-g-t] skl_ddb_allocation: Respect the minimum number of blocks

2014-10-17 Thread Damien Lespiau
Signed-off-by: Damien Lespiau damien.lesp...@intel.com --- tests/skl_ddb_allocation.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/skl_ddb_allocation.c b/tests/skl_ddb_allocation.c index ca6b892..4d8e6d1 100644 --- a/tests/skl_ddb_allocation.c

[Intel-gfx] [PATCH] drm/i915/skl: Make sure to allocate mininum sizes in the DDB

2014-10-17 Thread Damien Lespiau
I overlooked the fact that we need to allocate a minimum 8 blocks and that just allocating the planes depending on how much they need to fetch from the DDB in proportion of how much memory bw is necessary for the whole display can lead to cases where we don't respect those minima (and thus

Re: [Intel-gfx] [PATCH 00/89] Basic Skylake enabling (reviewers)

2014-10-17 Thread Damien Lespiau
Hi Ville, I've compiled the list of patches for which I finally have versions that should fix your comments and still require your r-b tag. You're in luck! there are also a few additional follow-up patches, some to address your concerns and one to address a known issue I listed here. On Thu, Sep

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Ignore long hpds on eDP ports

2014-10-17 Thread Todd Previte
On 10/17/2014 1:43 AM, Ville Syrjälä wrote: On Thu, Oct 16, 2014 at 12:38:55PM -0700, Todd Previte wrote: On 10/16/2014 10:46 AM, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Turning vdd on/off can generate a long hpd pulse on eDP ports. In order to

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do a dummy DPCD read before the actual read

2014-10-17 Thread Todd Previte
On 10/17/2014 1:43 AM, Jani Nikula wrote: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is filled with the same byte, and the operation completed without

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do a dummy DPCD read before the actual read

2014-10-17 Thread Todd Previte
On 10/17/2014 2:06 AM, Ville Syrjälä wrote: On Thu, Oct 16, 2014 at 12:39:29PM -0700, Todd Previte wrote: On 10/16/2014 10:46 AM, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Sometimes we seem to get utter garbage from DPCD reads. The resulting

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do a dummy DPCD read before the actual read

2014-10-17 Thread Todd Previte
On 10/17/2014 1:59 AM, Ville Syrjälä wrote: On Fri, Oct 17, 2014 at 11:43:21AM +0300, Jani Nikula wrote: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Sometimes we seem to get utter garbage from DPCD reads. The resulting buffer is

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv

2014-10-17 Thread Mika Kuoppala
Jani Nikula jani.nik...@linux.intel.com writes: On Thu, 16 Oct 2014, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä ville.syrj...@linux.intel.com Only ports B and C have the power sequencer and backlight controls, so complain if we ever try to register an eDP connector on some

[Intel-gfx] [PATCH 2/3] drm/i915: Change order of operations for VLV/CHV to not train DP link before PHYs are ready

2014-10-17 Thread Todd Previte
Reorder the function calls in chv/vlv_pre_enable_dp() such that link training is not initiated before the PHYs come up out of reset. Also check the status of vlv_wait_port_ready() and only attempt to train if the PHYs are actually running. The specification lists the wait for the PHYs as one of

[Intel-gfx] [PATCH V2] drm/i915: Change order of operations for VLV/CHV to not train DP link before PHYs are ready

2014-10-17 Thread Todd Previte
V2 changes: - Moved the intel_dp_enable_port() call out of intel_dp_enable() and placed it before the calls to intel_dp_enable() and vlv_wait_port_ready() - Cleaned up a spacing issues with the code indents - Amended the commit message to be under 80 characters per line and expanded on the

[Intel-gfx] [PATCH] drm/i915: run intel_uncore_early_sanitize earlier on resume on non-VLV

2014-10-17 Thread Paulo Zanoni
From: Paulo Zanoni paulo.r.zan...@intel.com As far as I understand, intel_uncore_early_sanitize() was supposed to be ran before any register access, but currently intel_resume_prepare() is ran earlier, and it does register access. I don't think it should be safe to be calling I915_{READ,WRITE}

[Intel-gfx] dmar messages caused by graphics.

2014-10-17 Thread Dave Jones
Just hit this while fuzz-testing, (curiously, no graphics related stuff was happening, X isn't even loaded on that box). dmar: DRHD: handling fault status reg 2 dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 7ff000 DMAR:[fault reason 05] PTE Write access is not set 00:02:0 is..

[Intel-gfx] [PATCH] drm/i915: disable IPS while getting the pipe CRCs.

2014-10-17 Thread Paulo Zanoni
From: Paulo Zanoni paulo.r.zan...@intel.com For some yet-undiscovered reason, when IPS gets enabled, the pipe CRC changes. Since hsw_enable_ips() doesn't really guarantees to enable IPS (it depends on package C-states), we can't really predict if IPS is enabled or disabled while running our CRC

[Intel-gfx] [PATCH] drm/i915/chv: Use 16 and 32 for low and high drain latency precision.

2014-10-17 Thread Rodrigo Vivi
Current chv spec teels we can only use either 16 or 32 bits as precision. Although in the past VLV went from 16/32 to 32/64 and spec might not be updated, these precision values brings stability and fixes some issues Wayne was facing. Cc: Wayne Boyer wayne.bo...@intel.com Cc: Ville Syrjälä

Re: [Intel-gfx] [PATCH] tests/kms_cursor_crc: HSW/BDW only have square cursors

2014-10-17 Thread Paulo Zanoni
2014-10-14 16:43 GMT-03:00 Paulo Zanoni przan...@gmail.com: 2014-10-14 16:32 GMT-03:00 Ville Syrjälä ville.syrj...@linux.intel.com: On Tue, Oct 14, 2014 at 02:05:42PM -0300, Paulo Zanoni wrote: From: Paulo Zanoni paulo.r.zan...@intel.com When I look at BSpec, and at cursor_size_ok() (from the