Re: [Intel-gfx] [PATCH] drm: Split out drm_probe_helper.h

2019-01-22 Thread Daniel Vetter
On Mon, Jan 21, 2019 at 11:13 PM Sam Ravnborg wrote: > > Hi Daniel et al. > > > > > > > Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy > > > kms drivers. Just removing it from all the atomic drivers caused lots of > > > fallout, I expect even more if you entirely remove

[Intel-gfx] [PATCH v2 1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup

2019-01-22 Thread Jani Nikula
With new platforms not having CRT support and most conditions in intel_crt_present() being specific to DDI, split out the CRT initialization to platform specific blocks in the if ladder. Add new Pineview block for this. This puts intel_crt_init() more in line with the rest of the outputs, and make

[Intel-gfx] [PATCH v2 7/7] drm/i915/crt: simplify CRT VBT check on pre-VLV/DDI

2019-01-22 Thread Jani Nikula
The VBT int_crt_support can't be trusted on earlier platforms, and is always set to true in intel_bios.c for pre-DDI and pre-VLV platforms. We can simplify the output setup by unconditionally calling intel_crt_init() for these platforms. Suggested-by: Ville Syrjälä Signed-off-by: Jani Nikula ---

[Intel-gfx] [PATCH v2 4/7] drm/i915/tv: only call intel_tv_init() on platforms that might have TV

2019-01-22 Thread Jani Nikula
With most platforms not having TV support, only call intel_tv_init() on platforms that might actually have TV, specifically gens 3 and 4. This puts intel_tv_init() more in line with the rest of the outputs, and makes it slightly easier for the uninitiated to figure out which platforms actually hav

Re: [Intel-gfx] [PATCH 3/5] drm/i915/lvds: nuke intel_lvds_supported()

2019-01-22 Thread Jani Nikula
On Mon, 21 Jan 2019, Ville Syrjälä wrote: > On Mon, Jan 21, 2019 at 04:21:32PM +0200, Jani Nikula wrote: >> Now that intel_lvds_init() is only called for platforms that might have >> LVDS, move the remaining checks to intel_setup_outputs(), again similar >> to other outputs, and remove the overlap

[Intel-gfx] [PATCH v2 3/7] drm/i915/lvds: nuke intel_lvds_supported()

2019-01-22 Thread Jani Nikula
Now that intel_lvds_init() is only called for platforms that might have LVDS, move the remaining checks to intel_setup_outputs(), again similar to other outputs, and remove the overlapping checks. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_display.c |

[Intel-gfx] [PATCH v2 6/7] drm/i915/lvds: simplify gen 2 lvds presence

2019-01-22 Thread Jani Nikula
Gen 2 mobile and not I830 is, in fact, I85X. Simplify. Suggested-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c

[Intel-gfx] [PATCH v2 5/7] drm/i915: rename has_edp_a() to ilk_has_edp_a()

2019-01-22 Thread Jani Nikula
Clarify that the name is specific to ILK+ PCH platforms. v2: prefix the name with ilk rather than pch (Ville) Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drive

[Intel-gfx] [PATCH v2 2/7] drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS

2019-01-22 Thread Jani Nikula
With new platforms not having LVDS support, only call intel_lvds_init() on platforms that might actually have LVDS. Move the comment about eDP init to the PCH block where it's relevant. This puts intel_lvds_init() more in line with the rest of the outputs, and makes it slightly easier for the unin

Re: [Intel-gfx] [PATCH 4/5] drm/i915/tv: only call intel_tv_init() on platforms that might have TV

2019-01-22 Thread Jani Nikula
On Mon, 21 Jan 2019, Ville Syrjälä wrote: > On Mon, Jan 21, 2019 at 04:21:33PM +0200, Jani Nikula wrote: >> With most platforms not having TV support, only call intel_tv_init() on >> platforms that might actually have TV, specifically gens 3 and 4. >> >> This puts intel_tv_init() more in line wit

Re: [Intel-gfx] [PATCH 1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup

2019-01-22 Thread Jani Nikula
On Mon, 21 Jan 2019, Ville Syrjälä wrote: > On Mon, Jan 21, 2019 at 04:21:30PM +0200, Jani Nikula wrote: >> With new platforms not having CRT support and most conditions in >> intel_crt_present() being specific to DDI, split out the CRT >> initialization to platform specific blocks in the if ladde

Re: [Intel-gfx] [PATCH] drm/dp: use DRM_DEBUG_DP() instead of drm_dbg for logging

2019-01-22 Thread Jani Nikula
On Mon, 21 Jan 2019, Ville Syrjälä wrote: > On Mon, Jan 21, 2019 at 01:27:58PM +0200, Jani Nikula wrote: >> We have a wrapper for a reason. >> >> Signed-off-by: Jani Nikula > > Reviewed-by: Ville Syrjälä Thanks, pushed to drm-misc-next. BR, Jani. > >> --- >> drivers/gpu/drm/drm_dp_helper.c

Re: [Intel-gfx] [PATCH] dma-buf: Enhance dma-fence tracing

2019-01-22 Thread Koenig, Christian
Am 22.01.19 um 00:20 schrieb Chris Wilson: > Rather than every backend and GPU driver reinventing the same wheel for > user level debugging of HW execution, the common dma-fence framework > should include the tracing infrastructure required for most client API > level flow visualisation. > > With t

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup

2019-01-22 Thread Patchwork
== Series Details == Series: series starting with [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup URL : https://patchwork.freedesktop.org/series/55540/ State : success == Summary == CI Bug Log - changes from CI_DRM_5459 -> Patchwork_12003 ==

Re: [Intel-gfx] [PATCH] dma-buf: Enhance dma-fence tracing

2019-01-22 Thread Chris Wilson
Quoting Koenig, Christian (2019-01-22 08:49:30) > Am 22.01.19 um 00:20 schrieb Chris Wilson: > > Rather than every backend and GPU driver reinventing the same wheel for > > user level debugging of HW execution, the common dma-fence framework > > should include the tracing infrastructure required fo

Re: [Intel-gfx] [PATCH 14/34] drm/i915: Pull VM lists under the VM mutex.

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:20, Chris Wilson wrote: A starting point to counter the pervasive struct_mutex. For the goal of avoiding (or at least blocking under them!) global locks during user request submission, a simple but important step is being able to manage each clients GTT separately. For which, we

Re: [Intel-gfx] [PATCH] dma-buf: Enhance dma-fence tracing

2019-01-22 Thread Daniel Vetter
On Tue, Jan 22, 2019 at 10:06 AM Chris Wilson wrote: > > Quoting Koenig, Christian (2019-01-22 08:49:30) > > Am 22.01.19 um 00:20 schrieb Chris Wilson: > > > Rather than every backend and GPU driver reinventing the same wheel for > > > user level debugging of HW execution, the common dma-fence fra

Re: [Intel-gfx] [PATCH] drm/i915: Don't use the second dbuf slice on icl

2019-01-22 Thread Mahesh Kumar
Hi, On Mon, Jan 21, 2019 at 9:01 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > The code managing the dbuf slices is borked and needs some > real work to fix. In the meantime let's just stop using the > second slice. > > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/intel_pm.

Re: [Intel-gfx] [PATCH 25/38] drm/i915/pmu: Always sample an active ringbuffer

2019-01-22 Thread Tvrtko Ursulin
On 18/01/2019 14:00, Chris Wilson wrote: As we no longer have a precise indication of requests queued to an engine, make no presumptions and just sample the ring registers to see if the engine is busy. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_pmu.c | 47 +++--

Re: [Intel-gfx] [PATCH] drm/i915: Don't use the second dbuf slice on icl

2019-01-22 Thread Mahesh Kumar
Hi, On Mon, Jan 21, 2019 at 9:01 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > The code managing the dbuf slices is borked and needs some > real work to fix. In the meantime let's just stop using the > second slice. > > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/intel_pm.c

Re: [Intel-gfx] [PATCH 27/38] drm/i915: Introduce the i915_user_extension_method

2019-01-22 Thread Tvrtko Ursulin
On 18/01/2019 14:00, Chris Wilson wrote: An idea for extending uABI inspired by Vulkan's extension chains. Instead of expanding the data struct for each ioctl every time we need to add a new feature, define an extension chain instead. As we add optional interfaces to control the ioctl, we define

Re: [Intel-gfx] [PATCH 18/34] drm/i915/selftests: Use common mock_engine::advance

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: Replace the open-coding of advance with a call instead. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/mock_engine.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests

Re: [Intel-gfx] [PATCH 19/34] drm/i915: Tidy common test_bit probing of i915_request->fence.flags

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: A repeated pattern is to test the signaled bit of our request->fence.flags. Make this an inline to shorten a few lines and remove unnecessary line continuations. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_irq.c | 3 +-- driver

Re: [Intel-gfx] [PATCH 1/3] drm: Add debug prints for the various object lookup errors

2019-01-22 Thread Daniel Vetter
On Mon, Jan 21, 2019 at 10:24:28PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Only some of the drm mode object lookups have a corresponding debug > print for the lookup failure. That makes logs a bit hard to parse > when you can't see where the bad object ID is being used. Add a bunch

Re: [Intel-gfx] [PATCH 2/3] drm: Sync errno values for property lookup errors

2019-01-22 Thread Daniel Vetter
On Mon, Jan 21, 2019 at 10:24:29PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Use ENOENT consistently for the case where the requested property > isn't found, and EINVAL for the case where the object has no > properties whatsoever. Currenrly these are handled differently > in the atomi

Re: [Intel-gfx] [PATCH 3/3] drm: Add a debug print for drm_modeset_backoff()

2019-01-22 Thread Daniel Vetter
On Mon, Jan 21, 2019 at 10:24:30PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Logs can get confusing when some operations are done multiple times > due to the ww mutex backoff. Add a debug print into > drm_modeset_backoff() so that at least the reason for the odd > looking logs will be

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup

2019-01-22 Thread Patchwork
== Series Details == Series: series starting with [v2,1/7] drm/i915/crt: split out intel_crt_present() to platform specific setup URL : https://patchwork.freedesktop.org/series/55540/ State : success == Summary == CI Bug Log - changes from CI_DRM_5459_full -> Patchwork_12003_full

Re: [Intel-gfx] Forced push done to drm-intel-next-queued

2019-01-22 Thread Daniel Vetter
On Tue, Jan 15, 2019 at 12:46:50PM +0100, Hans de Goede wrote: > Hi, > > On 15-01-19 10:56, Daniel Vetter wrote: > > On Thu, Dec 27, 2018 at 04:24:51PM +0100, Hans de Goede wrote: > > > Hi, > > > > > > On 27-12-18 15:42, Jani Nikula wrote: > > > > On Tue, 25 Dec 2018, Hans de Goede wrote: > > >

Re: [Intel-gfx] [PATCH] dma-buf: Enhance dma-fence tracing

2019-01-22 Thread Chris Wilson
Quoting Daniel Vetter (2019-01-22 09:11:53) > On Tue, Jan 22, 2019 at 10:06 AM Chris Wilson > wrote: > > > > Quoting Koenig, Christian (2019-01-22 08:49:30) > > > Am 22.01.19 um 00:20 schrieb Chris Wilson: > > > > Rather than every backend and GPU driver reinventing the same wheel for > > > > use

Re: [Intel-gfx] [PATCH] dma-buf: Enhance dma-fence tracing

2019-01-22 Thread Daniel Vetter
On Tue, Jan 22, 2019 at 10:58 AM Chris Wilson wrote: > > Quoting Daniel Vetter (2019-01-22 09:11:53) > > On Tue, Jan 22, 2019 at 10:06 AM Chris Wilson > > wrote: > > > > > > Quoting Koenig, Christian (2019-01-22 08:49:30) > > > > Am 22.01.19 um 00:20 schrieb Chris Wilson: > > > > > Rather than e

Re: [Intel-gfx] [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-22 Thread Joerg Roedel
On Fri, Jan 18, 2019 at 12:17:05PM +, Eric Wong wrote: > @@ -5411,6 +5411,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e20, > quirk_iommu_g4x_gfx); > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_g4x_gfx); > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, q

Re: [Intel-gfx] [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-22 Thread Daniel Vetter
On Tue, Jan 22, 2019 at 11:39 AM Joerg Roedel wrote: > > On Fri, Jan 18, 2019 at 12:17:05PM +, Eric Wong wrote: > > @@ -5411,6 +5411,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e20, > > quirk_iommu_g4x_gfx); > > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_g4x_

Re: [Intel-gfx] [PATCH 27/38] drm/i915: Introduce the i915_user_extension_method

2019-01-22 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-22 09:31:31) > > On 18/01/2019 14:00, Chris Wilson wrote: > > +/* > > + * SPDX-License-Identifier: MIT > > + * > > + * Copyright © 2018 Intel Corporation > > + */ > > + > > +#include > > +#include > > +#include > > + > > +#include "i915_user_extensions.h" > > + >

Re: [Intel-gfx] [PATCH 23/34] drm/i915: Share per-timeline HWSP using a slab suballocator

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: If we restrict ourselves to only using a cacheline for each timeline's HWSP (we could go smaller, but want to avoid needless polluting cachelines on different engines between different contexts), then we can suballocate a single 4k page into 64 different

Re: [Intel-gfx] [PATCH 0/7] drm/i915/perf: add OA interrupt support

2019-01-22 Thread Lionel Landwerlin
Any taker? -Lionel On 16/01/2019 15:36, Lionel Landwerlin wrote: Taking the RFC off this series. To quite the vTune team that tried the previous version : "It reduces data collection overhead in VTune by 11x. It is great!" The GPA team's report on the previous version was a drop in CPU

Re: [Intel-gfx] [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-22 Thread Joerg Roedel
Hi Daniel, On Tue, Jan 22, 2019 at 11:46:39AM +0100, Daniel Vetter wrote: > Note that the string of platforms which have various issues with iommu > and igfx is very long, thus far we only disabled it where there's no > workaround to stop it from hanging the box, but otherwise left it > enabled. S

Re: [Intel-gfx] [PATCH 27/38] drm/i915: Introduce the i915_user_extension_method

2019-01-22 Thread Tvrtko Ursulin
On 22/01/2019 10:47, Chris Wilson wrote: Quoting Tvrtko Ursulin (2019-01-22 09:31:31) On 18/01/2019 14:00, Chris Wilson wrote: +/* + * SPDX-License-Identifier: MIT + * + * Copyright © 2018 Intel Corporation + */ + +#include +#include +#include + +#include "i915_user_extensions.h" + +int i9

Re: [Intel-gfx] [PATCH 23/34] drm/i915: Share per-timeline HWSP using a slab suballocator

2019-01-22 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-22 10:47:11) > > On 21/01/2019 22:21, Chris Wilson wrote: > > If we restrict ourselves to only using a cacheline for each timeline's > > HWSP (we could go smaller, but want to avoid needless polluting > > cachelines on different engines between different contexts),

Re: [Intel-gfx] [PATCH 23/34] drm/i915: Share per-timeline HWSP using a slab suballocator

2019-01-22 Thread Tvrtko Ursulin
On 22/01/2019 11:12, Chris Wilson wrote: Quoting Tvrtko Ursulin (2019-01-22 10:47:11) On 21/01/2019 22:21, Chris Wilson wrote: If we restrict ourselves to only using a cacheline for each timeline's HWSP (we could go smaller, but want to avoid needless polluting cachelines on different engines

Re: [Intel-gfx] [PATCH 1/4] drm/i915/vbt: Add 'tp4' to varibles holding TP2/3/4 PSR wakeup time

2019-01-22 Thread Jani Nikula
On Wed, 16 Jan 2019, José Roberto de Souza wrote: > Recent update in spec made the field holding the TP2 and TP3 wakeup > time for PSR also hold the TP4, so lets rename the variables to > reflect that. > > BSpec: 20131 > > Cc: Dhinakaran Pandiyan > Signed-off-by: José Roberto de Souza > --- > d

Re: [Intel-gfx] [PATCH 05/34] drm/i915/selftests: Track evict objects explicitly

2019-01-22 Thread Matthew Auld
On Mon, 21 Jan 2019 at 22:22, Chris Wilson wrote: > > During review of commit 71fc448c1aaf ("drm/i915/selftests: Make evict > tolerant of foreign objects"), Matthew mentioned it would be better if > we explicitly tracked the objects we created. We have an obj->st_link > hook for this purpose, so a

Re: [Intel-gfx] [PATCH 2/5] drm/i915: always return something

2019-01-22 Thread Kahola, Mika
Patch look ok to me. On Thu, 2019-01-17 at 12:21 -0800, Lucas De Marchi wrote: > Even if we don't have the correct clock and get a warning, we should > not > skip the return. > > Fixes: 1fa11ee2d9d0 ("drm/i915/icl: start adding the TBT pll") > Cc: Paulo Zanoni > Cc: # v4.19+ Reviewed-by: Mika

Re: [Intel-gfx] [PATCH 06/34] drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting

2019-01-22 Thread Matthew Auld
On Mon, 21 Jan 2019 at 23:41, Chris Wilson wrote: > > Some tests (e.g. igt_vma_pin1) presume that we have a completely clean > GGTT so that it can probe boundaries without fear that something is > already allocated there. However, the mock device is starting to get > complicated and following simi

Re: [Intel-gfx] [PATCH 2/4] drm/i915/psr: Store VBT TP wakeup times into a enum

2019-01-22 Thread Jani Nikula
On Wed, 16 Jan 2019, José Roberto de Souza wrote: > Newer VBTs and the PSR registers uses a enum to set the TPs wakeup > time, so lets use this format to store wakeup times and avoid > conversions every time that PSR is activated. The VBT is a messy blob of data, and intel_bios.c in many places t

Re: [Intel-gfx] [PATCH 3/4] drm/i915/vbt: Parse and use the new field with PSR2 TP2/3/4 wakeup time

2019-01-22 Thread Jani Nikula
On Wed, 16 Jan 2019, José Roberto de Souza wrote: > A new field with the training pattern(TP) wakeup time for PSR2 was > added to VBT, so lets use it when available otherwise it will > fallback to PSR1 wakeup time. Same problems as with the two previous patches: - The new field name is too long.

Re: [Intel-gfx] [PATCH 24/34] drm/i915: Track the context's seqno in its own timeline HWSP

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: Now that we have allocated ourselves a cacheline to store a breadcrumb, we can emit a write from the GPU into the timeline's HWSP of the per-context seqno as we complete each request. This drops the mirroring of the per-engine HWSP and allows each context

Re: [Intel-gfx] [PATCH 07/34] drm/i915: Refactor out intel_context_init()

2019-01-22 Thread Matthew Auld
On Mon, 21 Jan 2019 at 23:41, Chris Wilson wrote: > > Prior to adding a third instance of intel_context_init() and extending > the information stored therewithin, refactor out the common assignments. > > Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld __

Re: [Intel-gfx] [PATCH 03/34] drm/i915: Show all active engines on hangcheck

2019-01-22 Thread Mika Kuoppala
Chris Wilson writes: > This turns out to be quite useful if one happens to be debugging > semaphore deadlocks. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/intel_hangcheck.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH 04/34] drm/i915/selftests: Refactor common live_test framework

2019-01-22 Thread Matthew Auld
On Mon, 21 Jan 2019 at 22:22, Chris Wilson wrote: > > Before adding yet another copy of struct live_test and its handler, > refactor the existing code into a common framework for live selftests. > For many live selftests, we want to know if the GPU hung or otherwise > misbehaved during the executi

Re: [Intel-gfx] [PATCH 07/34] drm/i915: Refactor out intel_context_init()

2019-01-22 Thread Mika Kuoppala
Chris Wilson writes: > Prior to adding a third instance of intel_context_init() and extending > the information stored therewithin, refactor out the common assignments. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_gem_context.c | 7 ++- > drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH] drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12

2019-01-22 Thread Juha-Pekka Heikkila
Using visible plane width for testing NV12 source suitability may fail randomly when plane is clipped. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109381 Signed-off-by: Juha-Pekka Heikkila --- drivers/gpu/drm/i915/intel_sprite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [Intel-gfx] [PATCH 03/34] drm/i915: Show all active engines on hangcheck

2019-01-22 Thread Chris Wilson
Quoting Mika Kuoppala (2019-01-22 12:33:00) > Chris Wilson writes: > > > This turns out to be quite useful if one happens to be debugging > > semaphore deadlocks. > > > > Signed-off-by: Chris Wilson > > --- > > drivers/gpu/drm/i915/intel_hangcheck.c | 15 +++ > > 1 file changed, 11

Re: [Intel-gfx] [PATCH 07/34] drm/i915: Refactor out intel_context_init()

2019-01-22 Thread Chris Wilson
Quoting Mika Kuoppala (2019-01-22 12:39:08) > Chris Wilson writes: > > +static inline void > > +intel_context_init(struct intel_context *ce, > > +struct i915_gem_context *ctx, > > +struct intel_engine_cs *engine) > > +{ > > + ce->gem_context = ctx; > > +} > > +

Re: [Intel-gfx] [PATCH v3 02/15] drm/i915: Don't try to use the hardware frame counter with i965gm TV output

2019-01-22 Thread Imre Deak
On Tue, Nov 27, 2018 at 10:05:50PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > On i965gm the hardware frame counter does not work when > the TV encoder is active. So let's not try to consult > the hardware frame counter in that case. Instead we'll > fall back to the timestamp based gues

Re: [Intel-gfx] [PATCH 03/15] drm/i915/tv: Fix interlaced ysize calculation

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:47PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Fix the calculation of the vertical active period for interlaced > TV modes. > > Signed-off-by: Ville Syrjälä Matches the spec: Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/intel_tv.c | 2 +- > 1

Re: [Intel-gfx] [PATCH 04/15] drm/i915/tv: Fix tv mode clocks

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:48PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > The oversample clock is always supposed to be either 108 MHz > or 148.5 MHz. Make it so. > > Signed-off-by: Ville Syrjälä Matches the spec: Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/intel_tv.c

[Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Mika Kahola
Avoid divide by zero warning on static analysis. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/intel_pm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 8b63afa3a221..6a8e8b3f44c2 100644 ---

Re: [Intel-gfx] [PATCH 05/15] drm/i915/tv: Store the TV oversampling factor in the TV mode

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:49PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Store the oversampling factor as a number in the TV modes. We > shall want to arithmetic with this which is easier if it's > a number we can use directly. > > Signed-off-by: Ville Syrjälä Reviewed-by: Imre

Re: [Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Jani Nikula
On Tue, 22 Jan 2019, Mika Kahola wrote: > Avoid divide by zero warning on static analysis. > > Signed-off-by: Mika Kahola > --- > drivers/gpu/drm/i915/intel_pm.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/

Re: [Intel-gfx] [PATCH 06/15] drm/i915/tv: Use bools where appropriate

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:50PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > 'component_only' is a bool. Initialize it like a bool. > > Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/intel_tv.c | 24 > 1 file changed, 12

Re: [Intel-gfx] [PATCH 07/15] drm/i915/tv: Nuke silly 0 initialzation of xpos/ypos

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:51PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Just assign the margin values directly to xpos/ypos instead > of first initializing to zero and then adding the values. > > Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Kahola, Mika
On Tue, 2019-01-22 at 15:07 +0200, Jani Nikula wrote: > On Tue, 22 Jan 2019, Mika Kahola wrote: > > Avoid divide by zero warning on static analysis. > > > > Signed-off-by: Mika Kahola > > --- > > drivers/gpu/drm/i915/intel_pm.c | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > >

Re: [Intel-gfx] [PATCH] drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12

2019-01-22 Thread Juha-Pekka Heikkila
Please ignore this. This patch is all wrong. /Juha-Pekka On 22.1.2019 14.41, Juha-Pekka Heikkila wrote: Using visible plane width for testing NV12 source suitability may fail randomly when plane is clipped. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109381 Signed-off-by: Juha-Pekka

Re: [Intel-gfx] [PATCH 07/38] drm/i915: Stop tracking MRU activity on VMA

2019-01-22 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-18 16:03:27) > > On 18/01/2019 14:00, Chris Wilson wrote: > > Our goal is to remove struct_mutex and replace it with fine grained > > locking. One of the thorny issues is our eviction logic for reclaiming > > space for an execbuffer (or GTT mmaping, among a few othe

Re: [Intel-gfx] [PATCH v8 1/7] drm/i915: initialize unused MOCS entries to PTE

2019-01-22 Thread Chris Wilson
Quoting Lucas De Marchi (2019-01-22 05:12:21) > Instead of initializing them to uncached, let's set them to PTE for > kernel tracking. While at it do some minor adjustments to comments and > coding style. > > Signed-off-by: Lucas De Marchi I'm in favour. I do not think this contributes an ABI ch

Re: [Intel-gfx] [PATCH v8 3/7] drm/i915/skl: Rework MOCS tables to keep common part in a define

2019-01-22 Thread Chris Wilson
Quoting Lucas De Marchi (2019-01-22 05:12:23) > From: Tomasz Lis > > The MOCS tables are going to be very similar across platforms. > > To reduce the amount of copied code, this patch rips the common part and > puts it into a definition valid for all gen9 platforms. > > v2: Made defines for or-

Re: [Intel-gfx] [PATCH v8 4/7] drm/i915: use a macro to define MOCS entries

2019-01-22 Thread Chris Wilson
Quoting Lucas De Marchi (2019-01-22 05:12:24) > Let's use a macro to make tables smaller and at the same time allow us > to add fields that apply to all entries in future. > > For the sake of readability, I'm calling an exception on 80 chars limit. > Lines are aligned for easy comparison of the en

Re: [Intel-gfx] [PATCH v8 6/7] drm/i915: cache number of MOCS entries

2019-01-22 Thread Chris Wilson
Quoting Lucas De Marchi (2019-01-22 05:12:26) > Instead of checking the gen number every time we need to know the max > number of entries, just save it into the table struct so we don't need > extra branches throughout the code. This will be useful for Ice Lake > that has 64 rather than 62 defined

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12

2019-01-22 Thread Patchwork
== Series Details == Series: drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12 URL : https://patchwork.freedesktop.org/series/8/ State : success == Summary == CI Bug Log - changes from CI_DRM_5463 -> Patchwork_12004

Re: [Intel-gfx] [PATCH v8 5/7] drm/i915: keep track of used entries in MOCS table

2019-01-22 Thread Chris Wilson
Quoting Lucas De Marchi (2019-01-22 05:12:25) > Instead of considering we have defined entries for any index in the > table, let's keep track of the ones we explicitly defined. This will > allow Gen 11 to have it's new table defined in which we have holes of > undefined entries. > > Repeated comme

Re: [Intel-gfx] [PATCH 08/15] drm/i915/tv: Deobfuscate preferred mode selection

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:53PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Rewrite the preferred mode selection to just check > whether the TV modes is HD or SD. For SD TV modes we > favor 480 line modes, for 720p we prefer 720 line modes, > and for 1080i/p we prefer 1080 line modes

Re: [Intel-gfx] [PATCH 09/15] drm/i915/tv: Use drm_mode_set_name() to name TV modes

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:54PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > No point in storing the mode names in the array. drm_mode_set_name() > will give us the same names without wasting space for these string > constants. > > Signed-off-by: Ville Syrjälä Reviewed-by: Imre Dea

Re: [Intel-gfx] [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-22 Thread Joonas Lahtinen
Quoting Joerg Roedel (2019-01-22 13:01:09) > Hi Daniel, > > On Tue, Jan 22, 2019 at 11:46:39AM +0100, Daniel Vetter wrote: > > Note that the string of platforms which have various issues with iommu > > and igfx is very long, thus far we only disabled it where there's no > > workaround to stop it f

Re: [Intel-gfx] [PATCH 10/15] drm/i915/tv: Make TV mode autoselection actually useable

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:55PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > The current code insists on picking a new TV mode when > switching between component and non-component cables. > That's super annoying. Let's just keep the current TV > mode unless the new cable type actually

Re: [Intel-gfx] [PATCH 25/34] drm/i915: Track active timelines

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: Now that we pin timelines around use, we have a clearly defined lifetime and convenient points at which we can track only the active timelines. This allows us to reduce the list iteration to only consider those active timelines and not all. Signed-off-by

Re: [Intel-gfx] [PATCH 11/15] drm/i915/tv: Nuke reported_modes[]

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:56PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Remove the silly reported_modes[] array. I suppse once upon a time > this actually had something to do with modes we reported to userspace. > Now it is just the placeholder for the mode we use for load detect

Re: [Intel-gfx] [PATCH 12/15] drm/i915/tv: Add 1080p30/50/60 TV modes

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:57PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Add the missing 1080p TV modes. On gen4 all of them work just fine, > whereas on gen3 only the 30Hz mode actually works correctly. > > Signed-off-by: Ville Syrjälä Matches the spec: Reviewed-by: Imre Deak

Re: [Intel-gfx] [PATCH 25/34] drm/i915: Track active timelines

2019-01-22 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-22 14:56:32) > > On 21/01/2019 22:21, Chris Wilson wrote: > > Now that we pin timelines around use, we have a clearly defined lifetime > > and convenient points at which we can track only the active timelines. > > This allows us to reduce the list iteration to only

Re: [Intel-gfx] [PATCH 26/34] drm/i915: Identify active requests

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: To allow requests to forgo a common execution timeline, one question we need to be able to answer is "is this request running?". To track whether a request has started on HW, we can emit a breadcrumb at the beginning of the request and check its timeline'

Re: [Intel-gfx] [PATCH 26/34] drm/i915: Identify active requests

2019-01-22 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-22 15:34:07) > > On 21/01/2019 22:21, Chris Wilson wrote: > > To allow requests to forgo a common execution timeline, one question we > > need to be able to answer is "is this request running?". To track > > whether a request has started on HW, we can emit a breadcr

Re: [Intel-gfx] [PATCH 27/34] drm/i915: Remove the intel_engine_notify tracepoint

2019-01-22 Thread Tvrtko Ursulin
On 21/01/2019 22:21, Chris Wilson wrote: The global seqno is defunct and so we have no meaningful indicator of forward progress for an engine. You need to listen to the request signaling tracepoints instead. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_irq.c | 2 -- drivers/

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Avoid divide by zero

2019-01-22 Thread Patchwork
== Series Details == Series: drm/i915: Avoid divide by zero URL : https://patchwork.freedesktop.org/series/55560/ State : success == Summary == CI Bug Log - changes from CI_DRM_5464 -> Patchwork_12005 Summary --- **SUCCESS** No re

Re: [Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Ville Syrjälä
On Tue, Jan 22, 2019 at 02:58:24PM +0200, Mika Kahola wrote: > Avoid divide by zero warning on static analysis. > > Signed-off-by: Mika Kahola > --- > drivers/gpu/drm/i915/intel_pm.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b

Re: [Intel-gfx] [PATCH 7/7] drm/i915/perf: add flushing ioctl

2019-01-22 Thread Joonas Lahtinen
Quoting Lionel Landwerlin (2019-01-16 17:36:22) > With the currently available parameters for the i915-perf stream, > there are still situations that are not well covered : > > If an application opens the stream with polling disable or at very low > frequency and OA interrupt enabled, no data will

Re: [Intel-gfx] [PATCH v3] drm/i915: correct the pitch check for NV12 framebuffer

2019-01-22 Thread Sitaram, Raviraj P
Hi Ville, NV12 support for small src viewport sizes and rotation vs clipping scenarios are added into IGT by JP. Commit details are as follows. commit 8614d5eb114a660c3bd7ff77eab8bed53424cd30 Author: Juha-Pekka Heikkila Date: Fri Dec 21 15:42:33 2018 +0200 tests/kms_rotation_crc: add NV1

Re: [Intel-gfx] [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-22 Thread Joerg Roedel
On Tue, Jan 22, 2019 at 04:48:26PM +0200, Joonas Lahtinen wrote: > According to our IOMMU folks there exists some desire to be able to assign > the iGFX device aka have intel_iommu=on instead of intel_iommu=igfx_off > due to how the devices might be grouped in IOMMU groups. Even when you > would no

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12

2019-01-22 Thread Patchwork
== Series Details == Series: drm/i915: Use fb width to measure fb width instead of visible plane width when verify NV12 URL : https://patchwork.freedesktop.org/series/8/ State : success == Summary == CI Bug Log - changes from CI_DRM_5463_full -> Patchwork_12004_full ==

Re: [Intel-gfx] [PATCH 13/15] drm/i915/tv: Generate better pipe timings for TV encoder

2019-01-22 Thread Imre Deak
On Mon, Nov 12, 2018 at 06:59:58PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > To make vblank timestamps work better with the TV encoder let's > scale the pipe timings such that the relationship between the > TV active and TV blanking periods is mirrored in the > corresponding pipe timi

Re: [Intel-gfx] [PATCH 13/15] drm/i915/tv: Generate better pipe timings for TV encoder

2019-01-22 Thread Ville Syrjälä
On Tue, Jan 22, 2019 at 07:22:24PM +0200, Imre Deak wrote: > On Mon, Nov 12, 2018 at 06:59:58PM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > To make vblank timestamps work better with the TV encoder let's > > scale the pipe timings such that the relationship between the > > TV acti

Re: [Intel-gfx] [PATCH 1/5] drm/i915/backlight: Restore backlight on resume, v3.

2019-01-22 Thread Jani Nikula
On Tue, 08 Jan 2019, Maarten Lankhorst wrote: > Restore our saved values for backlight. This way even with fastset on > S4 resume we will correctly restore the backlight to the active values. > > Changes since v1: > - Call enable_backlight() when backlight.level is set. On suspend > backlight.e

Re: [Intel-gfx] [PATCH 2/5] drm/i915/backlight: Fix backlight takeover on LPT, v3.

2019-01-22 Thread Jani Nikula
On Tue, 08 Jan 2019, Maarten Lankhorst wrote: > On lynxpoint the bios sometimes sets up the backlight using the CPU > display, but the driver expects using the PWM PCH override register. > > Read the value from the CPU register, then convert it to the other > units by converting from the old duty

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Enable fastset for non-boot modesets.

2019-01-22 Thread Jani Nikula
On Tue, 08 Jan 2019, Maarten Lankhorst wrote: > Now that our state comparison functions are pretty complete, we should > enable fastset by default when a modeset can be avoided. Even if we're > not completely certain about the inherited state, we can be certain > after the first modeset that our

Re: [Intel-gfx] [PATCH 7/7] drm/i915/perf: add flushing ioctl

2019-01-22 Thread Lionel Landwerlin
On 22/01/2019 16:25, Joonas Lahtinen wrote: Quoting Lionel Landwerlin (2019-01-16 17:36:22) With the currently available parameters for the i915-perf stream, there are still situations that are not well covered : If an application opens the stream with polling disable or at very low frequency a

Re: [Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Jani Nikula
On Tue, 22 Jan 2019, Ville Syrjälä wrote: > On Tue, Jan 22, 2019 at 02:58:24PM +0200, Mika Kahola wrote: >> Avoid divide by zero warning on static analysis. >> >> Signed-off-by: Mika Kahola >> --- >> drivers/gpu/drm/i915/intel_pm.c | 6 -- >> 1 file changed, 4 insertions(+), 2 deletions(-)

[Intel-gfx] [PATCH] drm/i915/selftests: Apply a subtest filter

2019-01-22 Thread Chris Wilson
In bringup on simulated HW even rudimentary tests are slow, and so many may fail that we want to be able to filter out the noise to focus on the specific problem. Even just the tests groups provided for igt is not specific enough, and we would like to isolate one particular subtest (and probably su

[Intel-gfx] [PATCH i-g-t] i915/selftest: Allow filtering of individual subtests

2019-01-22 Thread Chris Wilson
Take an environment variable, SELFTESTS=foo,bar, and pass that along to the kernel (as i915.st_filter=foo,bar) to provide fine grained test selection. This can be either as an exact match to select only that test, or to exclude only test. For example, SELFTESTS=igt_vma_create,igt_vma_pin1 i915_sel

Re: [Intel-gfx] [PATCH] drm/i915: Avoid divide by zero

2019-01-22 Thread Ville Syrjälä
On Tue, Jan 22, 2019 at 08:09:40PM +0200, Jani Nikula wrote: > On Tue, 22 Jan 2019, Ville Syrjälä wrote: > > On Tue, Jan 22, 2019 at 02:58:24PM +0200, Mika Kahola wrote: > >> Avoid divide by zero warning on static analysis. > >> > >> Signed-off-by: Mika Kahola > >> --- > >> drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drm/i915/selftests: Apply a subtest filter

2019-01-22 Thread Chris Wilson
In bringup on simulated HW even rudimentary tests are slow, and so many may fail that we want to be able to filter out the noise to focus on the specific problem. Even just the tests groups provided for igt is not specific enough, and we would like to isolate one particular subtest (and probably su

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Avoid divide by zero

2019-01-22 Thread Patchwork
== Series Details == Series: drm/i915: Avoid divide by zero URL : https://patchwork.freedesktop.org/series/55560/ State : success == Summary == CI Bug Log - changes from CI_DRM_5464_full -> Patchwork_12005_full Summary --- **SUCCESS*

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Apply a subtest filter (rev2)

2019-01-22 Thread Patchwork
== Series Details == Series: drm/i915/selftests: Apply a subtest filter (rev2) URL : https://patchwork.freedesktop.org/series/55576/ State : success == Summary == CI Bug Log - changes from CI_DRM_5464 -> Patchwork_12006 Summary --- *

  1   2   >