Re: [Intel-gfx] [PATCH v2] drm/i915: Limit the number of loops for reading a split 64bit register

2015-09-09 Thread Jani Nikula
On Tue, 08 Sep 2015, Daniel Vetter wrote: > On Tue, Sep 08, 2015 at 02:17:13PM +0100, Chris Wilson wrote: >> In I915_READ64_2x32 we attempt to read a 64bit register using 2 32bit >> reads. Due to the nature of the registers we try to read in this manner, >> they may increment between the two instr

Re: [Intel-gfx] [PATCH] drm/i915: Fix broken mst get_hw_state.

2015-09-09 Thread Jani Nikula
On Thu, 03 Sep 2015, Ander Conselvan De Oliveira wrote: > On Wed, 2015-09-02 at 16:14 +0200, Maarten Lankhorst wrote: >> Op 02-09-15 om 16:07 schreef Ander Conselvan De Oliveira: >> > On Thu, 2015-08-27 at 13:13 +0200, Maarten Lankhorst wrote: >> > > connector->encoder is initialized as NULL. Fix

[Intel-gfx] [PULL] topic/drm-fixes for v4.3

2015-09-09 Thread Jani Nikula
Hi Dave - An atomic bookkeeping fix from Maarten, and DP i2c-over-aux retry loop fixes from Ville. BR, Jani. The following changes since commit 879a37d00f1882b1e56a66e626af4194d592d257: Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into d

[Intel-gfx] [PATCH i-g-t] tests/gem_ctx_param_basic.c: fix non-root-set-no-zeromap subtest

2015-09-09 Thread daniele . ceraolospurio
From: Daniele Ceraolo Spurio The test expects an ioctl failure when it tries to set CONTEXT_PARAM_NO_ZEROMAP from a non-root process. However, there is no requirement in the kernel for the user to be root to set this parameter, so the test is failing (it never passed as far as I'm aware of). Fix

[Intel-gfx] [RFC] drm/i915: Handle E2BIG error in i915_gem_fault

2015-09-09 Thread Michel Thierry
i915_gem_object_bind_to_vm returns -E2BIG when the user tries to bind an object larger than the aperture, but i915_gem_fault does not handle this return code: [501906.530985] gem_mmap_gtt: starting subtest big-bo-tiledX [501906.541992] gem_mmap_gtt (22362): drop_caches: 3 [501906.610774] WARNING:

Re: [Intel-gfx] [RFC] drm/i915: Handle E2BIG error in i915_gem_fault

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 11:29:52AM +0100, Michel Thierry wrote: > i915_gem_object_bind_to_vm returns -E2BIG when the user tries to bind an > object larger than the aperture, but i915_gem_fault does not handle this > return code: > > [501906.530985] gem_mmap_gtt: starting subtest big-bo-tiledX > [5

Re: [Intel-gfx] [PATCH i-g-t] Add a link training test

2015-09-09 Thread Thomas Wood
On 8 September 2015 at 13:28, Ander Conselvan de Oliveira wrote: > This adds a test that compiles the link training code from i915 into a > separate executable and uses it to train a fake sink device. The test > also uses device information from i915 to exercise the different code > paths for diff

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: Only update the current userptr worker

2015-09-09 Thread Tvrtko Ursulin
On 08/10/2015 09:51 AM, Chris Wilson wrote: The userptr worker allows for a slight race condition where upon there may two or more threads calling get_user_pages for the same object. When we have the array of pages, then we serialise the update of the object. However, the worker should only over

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: Only update the current userptr worker

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 11:39:01AM +0100, Tvrtko Ursulin wrote: > > On 08/10/2015 09:51 AM, Chris Wilson wrote: > >The userptr worker allows for a slight race condition where upon there > >may two or more threads calling get_user_pages for the same object. When > >we have the array of pages, then

[Intel-gfx] Skylake Linux 4.2 FIFO underruns

2015-09-09 Thread Daniel Drake
Hi, Using Linux 4.2 on a new Skylake laptop, I frequently see the display go momentarily black, with a coinciding message in the logs: [drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO underrun Testing linus master, the problem is gone. Does anyone know what commit might have fix

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 02:30:58AM +0300, Konduru, Chandra wrote: > > > > > + if (fb->pixel_format == DRM_FORMAT_NV12) { > > > > > + int height_in_mem = > > > > > (fb->offsets[1]/fb->pitches[0]); > > > > > + /* > > > > > + *

[Intel-gfx] [PATCH] drm/core: Do not call drm_framebuffer_remove internally during teardown.

2015-09-09 Thread Maarten Lankhorst
This may cause issues because encoders are already destroyed so removing active primaries may use freed memory. Instead free the fb directly, ignoring refcount. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

Re: [Intel-gfx] [PATCH 14/15] drm/i915: skl nv12 workarounds

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 02:51:58AM +0300, Konduru, Chandra wrote: > > > > > +static void skl_wa_clkgate(struct drm_i915_private *dev_priv, > > > > > + int pipe, int enable) > > > > > +{ > > > > > + if (pipe == PIPE_A || pipe == PIPE_B) { > > > > > + if (enable) > > > > > +

Re: [Intel-gfx] [PATCH] drm/core: Do not call drm_framebuffer_remove internally during teardown.

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 01:46:21PM +0200, Maarten Lankhorst wrote: > This may cause issues because encoders are already destroyed so removing > active primaries may use freed memory. Instead free the fb directly, > ignoring refcount. So what about fixing the cause, not the symptom? That is remove

Re: [Intel-gfx] [PATCH v4 4/5] drm: Add decoding of i915 ioctls

2015-09-09 Thread Dmitry V. Levin
On Tue, Sep 08, 2015 at 04:30:52AM +0300, Dmitry V. Levin wrote: > On Tue, Sep 08, 2015 at 04:18:11AM +0300, Dmitry V. Levin wrote: > [...] > > So the whole function should look smth like this: > > > > static int i915_getparam(struct tcb *tcp, const unsigned int code, long arg) > > { > > struc

Re: [Intel-gfx] [PATCH] drm/core: Do not call drm_framebuffer_remove internally during teardown.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 9, 2015 at 1:51 PM, Ville Syrjälä wrote: > On Wed, Sep 09, 2015 at 01:46:21PM +0200, Maarten Lankhorst wrote: >> This may cause issues because encoders are already destroyed so removing >> active primaries may use freed memory. Instead free the fb directly, >> ignoring refcount. > > So

Re: [Intel-gfx] [PATCH i-g-t] intel_reg: ensure "intel_reg help" always works

2015-09-09 Thread Jani Nikula
On Mon, 07 Sep 2015, Thomas Wood wrote: > Signed-off-by: Thomas Wood I'm lagging behind with my mails, and I see you already pushed this... but care to explain the scenario where 'intel_reg help' does not work? Should be part of the commit message... BR, Jani. > --- > tools/intel_reg.c | 2 +-

Re: [Intel-gfx] [PATCH 06/11] drm: Define a drm_invalid_op ioctl implementation

2015-09-09 Thread David Herrmann
Hi On Tue, Sep 8, 2015 at 1:56 PM, Daniel Vetter wrote: > And use it in radeon to replace all the ioctls no longer valid in kms > mode. I plan to also use this later on when nuking the ums support for > i915. > > Note that setting the function pointer in the ioctl table to NULL > would amount to

Re: [Intel-gfx] [PATCH 3/3] drm: Make drm_av_sync_delay() 'mode' argument const

2015-09-09 Thread Alex Deucher
On Mon, Sep 7, 2015 at 11:22 AM, wrote: > From: Ville Syrjälä > > drm_av_sync_delay() doesn't change the passed in mode, so make it const. > > Signed-off-by: Ville Syrjälä For the series: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/drm_edid.c | 2 +- > include/drm/drm_edid.h | 2 +

Re: [Intel-gfx] [PATCH 3/3] drm: Make drm_av_sync_delay() 'mode' argument const

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 08:45:14AM -0400, Alex Deucher wrote: > On Mon, Sep 7, 2015 at 11:22 AM, wrote: > > From: Ville Syrjälä > > > > drm_av_sync_delay() doesn't change the passed in mode, so make it const. > > > > Signed-off-by: Ville Syrjälä > > For the series: > Reviewed-by: Alex Deucher

Re: [Intel-gfx] [PATCH 01/11] drm: Remove __OS_HAS_AGP

2015-09-09 Thread Ville Syrjälä
On Tue, Sep 08, 2015 at 01:56:21PM +0200, Daniel Vetter wrote: > We already express the drm/agp depencies correctly in Kconfig, so we > can rip this remnant from the shared drm core days. > > Aside: Pretty much all the #ifdefs in radeon/nouveau could be killed > if ttm would provide dummy function

Re: [Intel-gfx] [PATCH 04/11] drm/i915: Remove setparam ioctl

2015-09-09 Thread Ville Syrjälä
On Tue, Sep 08, 2015 at 01:56:24PM +0200, Daniel Vetter wrote: > This was only used for the ums+gem combo, so ripe for removal now that > we only have kms code left. > > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_dma.c | 31 +-- > 1 file changed, 1

Re: [Intel-gfx] [PATCH i-g-t] intel_reg: ensure "intel_reg help" always works

2015-09-09 Thread Thomas Wood
On 9 September 2015 at 13:20, Jani Nikula wrote: > On Mon, 07 Sep 2015, Thomas Wood wrote: >> Signed-off-by: Thomas Wood > > I'm lagging behind with my mails, and I see you already pushed > this... but care to explain the scenario where 'intel_reg help' does not > work? Should be part of the com

[Intel-gfx] [PATCH i-g-t] tools/Android.mk: Fix compile error in intel_reg.c

2015-09-09 Thread Derek Morton
The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file sy

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_ctx_param_basic.c: fix non-root-set-no-zeromap subtest

2015-09-09 Thread Thomas Wood
On 9 September 2015 at 09:46, wrote: > From: Daniele Ceraolo Spurio > > The test expects an ioctl failure when it tries to set > CONTEXT_PARAM_NO_ZEROMAP from a non-root process. However, there is no > requirement in the kernel for the user to be root to set this parameter, > so the test is fail

Re: [Intel-gfx] [PATCH 1/3] tools/intel_reg: Use pci device from config on write

2015-09-09 Thread Thomas Wood
On 28 August 2015 at 16:16, Jani Nikula wrote: > On Fri, 28 Aug 2015, Mika Kuoppala wrote: >> Use the pre configured pci device from config also >> in write path. >> >> Cc: Jani Nikula >> Signed-off-by: Mika Kuoppala >> --- >> tools/intel_reg.c | 2 +- >> 1 file changed, 1 insertion(+), 1 dele

Re: [Intel-gfx] [PATCH i-g-t] tools/Android.mk: Fix compile error in intel_reg.c

2015-09-09 Thread Thomas Wood
On 9 September 2015 at 14:30, Derek Morton wrote: > The patch "tools: install the register definition files" caused > a build error on android as it added 'PKGDATADIR' which was not > defined in the Android build environment. This patch adds that > define to tools/Android.mk. It also copies the fi

Re: [Intel-gfx] [PATCH] drm/i915: Split alloc from init for lrc

2015-09-09 Thread Daniel, Thomas
This needs a rebase as a new GuC TLB invalidation call has been added when the context objects are pinned. Your patch misses this for the default context. In fact I reckon there's a case to consolidate the two (default / non-default) object pinning sequence into a single function to avoid furt

Re: [Intel-gfx] [PATCH v3 0/7] igt: adding parameter to drm_open_any and drm_open_any_master to allow specification of non-intel GPUs

2015-09-09 Thread Thomas Wood
On 14 August 2015 at 16:22, Micah Fedke wrote: > Changes since last version of patch: > > Now using the core_* tests as demonstrations rather than drm_read. Apologies for not getting to this sooner, but it no longer applies to master. Can you rebase the series and send it again? > > Micah Fedke

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915: Fix userptr deadlock with aliased GTT mmappings

2015-09-09 Thread Tvrtko Ursulin
Hi, On 08/10/2015 09:51 AM, Chris Wilson wrote: > Michał Winiarski found a really evil way to trigger a struct_mutex > deadlock with userptr. He found that if he allocated a userptr bo and > then GTT mmaped another bo, or even itself, at the same address as the > userptr using MAP_FIXED, he could

[Intel-gfx] [PATCH v6 2/2] drm/i915: Add soft-pinning API for execbuffer

2015-09-09 Thread Michał Winiarski
From: Chris Wilson Userspace can pass in an offset that it presumes the object is located at. The kernel will then do its utmost to fit the object into that location. The assumption is that userspace is handling its own object locations (for example along with full-ppgtt) and that the kernel will

[Intel-gfx] [RFC libdrm] intel: Softpin support

2015-09-09 Thread Michał Winiarski
The goal of this series is to start a discussion whether the interface and implementation of softpin support proposed for libdrm is acceptable by all interested parties. The i915 patches are added so that it's easy to apply the series on latest drm-intel-nightly and libdrm master and start using so

[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Allow adventurous users to select enable_ppgtt=3

2015-09-09 Thread Michał Winiarski
While support for 48b ppgtt is here, parameter enabling it is not known to the sanitize function. Let's update it to allow selecting full_48bit_ppgtt using module parameter. Cc: Michel Thierry Cc: Mika Kuoppala Signed-off-by: Michał Winiarski --- drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +

[Intel-gfx] [RFC libdrm] intel: Add support for softpin

2015-09-09 Thread Michał Winiarski
Softpin allows userspace to take greater control of GPU virtual address space and eliminates the need of relocations. It can also be used to mirror addresses between GPU and CPU (shared virtual memory). Calls to drm_intel_bo_emit_reloc are still required to build the list of drm_i915_gem_exec_objec

Re: [Intel-gfx] [PATCH v6 2/2] drm/i915: Add soft-pinning API for execbuffer

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 04:07:09PM +0200, Michał Winiarski wrote: > From: Chris Wilson > > Userspace can pass in an offset that it presumes the object is located > at. The kernel will then do its utmost to fit the object into that > location. The assumption is that userspace is handling its own o

Re: [Intel-gfx] [PATCH] drm/core: Do not call drm_framebuffer_remove internally during teardown.

2015-09-09 Thread Maarten Lankhorst
Op 09-09-15 om 13:59 schreef Daniel Vetter: > On Wed, Sep 9, 2015 at 1:51 PM, Ville Syrjälä > wrote: >> On Wed, Sep 09, 2015 at 01:46:21PM +0200, Maarten Lankhorst wrote: >>> This may cause issues because encoders are already destroyed so removing >>> active primaries may use freed memory. Instead

[Intel-gfx] [PATCH 2/2] drm/core: Preserve the fb id on close.

2015-09-09 Thread Maarten Lankhorst
Keep the fb_id, which means that any application exiting without unsetting the framebuffer from all planes will preserve its contents. This is similar to preserving the initial framebuffer, except all planes are preserved. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_crtc.c | 11 +--

[Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Maarten Lankhorst
Previously RMFB and fd close chose to disable any plane that had an active framebuffer from this file. If it was a primary plane the crtc was disabled. However the fbdev code or any system compositor should restore the planes anyway so there's no need to do it twice. The old fb_id is zero'd, so th

[Intel-gfx] [PATCH 0/2] Preserve framebuffer during rmfb / drm fd close.

2015-09-09 Thread Maarten Lankhorst
This is breaks the abi slightly, but allows preserving the framebuffer contents across processes. Any system compositor or fbdev should take care of resetting the planes and mode anyway. Restoring a framebuffer requires a call to getfb, which checks for CAP_SYS_ADMIN, DRM_MASTER or access to the

[Intel-gfx] [PATCH] drm/i915: Mark getparam ioctl as DRM_UNLOCKED

2015-09-09 Thread Daniel Vetter
With kms all the data getparam looks at is actually invariant, and certainly not protected by the global kms mutex. With ums all the setup code is already racy as hell, so this won't make things any worse. I've done this change so that all ioctl still used by kms drivers are marked as DRM_UNLOCKED

Re: [Intel-gfx] [PATCH] drm/core: Do not call drm_framebuffer_remove internally during teardown.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 04:33:33PM +0200, Maarten Lankhorst wrote: > Op 09-09-15 om 13:59 schreef Daniel Vetter: > > On Wed, Sep 9, 2015 at 1:51 PM, Ville Syrjälä > > wrote: > >> On Wed, Sep 09, 2015 at 01:46:21PM +0200, Maarten Lankhorst wrote: > >>> This may cause issues because encoders are alr

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-09-09 Thread Tvrtko Ursulin
On 08/10/2015 09:51 AM, Chris Wilson wrote: Whilst discussing possible ways to trigger an invalidate_range on a userptr with an aliased GGTT mmapping (and so cause a struct_mutex deadlock), the conclusion is that we can, and we must, prevent any possible deadlock by avoiding taking the mutex at a

[Intel-gfx] [PATCH] drm: Remove __OS_HAS_AGP

2015-09-09 Thread Daniel Vetter
We already express the drm/agp depencies correctly in Kconfig, so we can rip this remnant from the shared drm core days. Aside: Pretty much all the #ifdefs in radeon/nouveau could be killed if ttm would provide dummy functions. I'm not going to volunteer for that though. v2: Use IS_ENABLED(CONFIG

[Intel-gfx] [PATCH] drm/i915: Fix CSR MMIO address check

2015-09-09 Thread Takashi Iwai
Fix a wrong logical AND (&&) used for the range check of CSR MMIO. Spotted nicely by gcc -Wlogical-op flag: drivers/gpu/drm/i915/intel_csr.c: In function ‘finish_csr_load’: drivers/gpu/drm/i915/intel_csr.c:353:41: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-o

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
Hi, On 09/09/2015 03:40 PM, Maarten Lankhorst wrote: Previously RMFB and fd close chose to disable any plane that had an active framebuffer from this file. If it was a primary plane the crtc was disabled. However the fbdev code or any system compositor should restore the planes anyway so there'

Re: [Intel-gfx] About GVT-g Interrupt in i915 Host

2015-09-09 Thread Wang, Zhi A
Hi Daniel: Really appreciate the reply! :) I just read the code again. And we will prepare the PoC patch based on the new ideas! :) -Original Message- From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter Sent: Wednesday, September 09, 2015 4:40 AM To: Wang, Z

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 04:40:56PM +0200, Maarten Lankhorst wrote: > Previously RMFB and fd close chose to disable any plane that had > an active framebuffer from this file. If it was a primary plane the > crtc was disabled. However the fbdev code or any system compositor > should restore the plane

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 03:51:50PM +0100, Tvrtko Ursulin wrote: > > Hi, > > On 09/09/2015 03:40 PM, Maarten Lankhorst wrote: > >Previously RMFB and fd close chose to disable any plane that had > >an active framebuffer from this file. If it was a primary plane the > >crtc was disabled. However the

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915: Fix userptr deadlock with aliased GTT mmappings

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 02:56:16PM +0100, Tvrtko Ursulin wrote: > > Hi, > > On 08/10/2015 09:51 AM, Chris Wilson wrote: > > +out: > > drm_free_large(pvec); > > return ret; > > + > > +err: > > + /* No pages here, no need for the mmu-notifier to wake us */ > > + __i915_gem_userptr_set_a

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 03:45:40PM +0100, Tvrtko Ursulin wrote: > On 08/10/2015 09:51 AM, Chris Wilson wrote: > >Whilst discussing possible ways to trigger an invalidate_range on a > >userptr with an aliased GGTT mmapping (and so cause a struct_mutex > >deadlock), the conclusion is that we can, and

Re: [Intel-gfx] [PATCH] drm/i915: add kerneldoc for i915_audio_component

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 01:45:47AM +, Yang, Libin wrote: > Hi Daniel, > > As Takashi has already accepted the first 3 patches for > sync_audio_rate() and the patches are not merged > into -nightly branch. If I make a kerneldoc patch > based on currently -nightly branch, there will > be confli

Re: [Intel-gfx] [PATCH] drm/i915: add kerneldoc for i915_audio_component

2015-09-09 Thread Takashi Iwai
On Wed, 09 Sep 2015 17:09:52 +0200, Daniel Vetter wrote: > > On Wed, Sep 09, 2015 at 01:45:47AM +, Yang, Libin wrote: > > Hi Daniel, > > > > As Takashi has already accepted the first 3 patches for > > sync_audio_rate() and the patches are not merged > > into -nightly branch. If I make a kern

Re: [Intel-gfx] [PATCH] drm/i915: Call encoder hot_plug hook only for hdmi

2015-09-09 Thread Daniel Vetter
On Tue, Sep 08, 2015 at 05:08:02PM +0530, Jindal, Sonika wrote: > > > On 9/8/2015 10:12 AM, Jindal, Sonika wrote: > > > > > >On 9/7/2015 9:56 PM, Daniel Vetter wrote: > >>On Mon, Sep 07, 2015 at 10:34:34AM +0530, Sonika Jindal wrote: > >>>If the same port is enumerated as hdmi as well as DP, this

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 04:04 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 03:51:50PM +0100, Tvrtko Ursulin wrote: Hi, On 09/09/2015 03:40 PM, Maarten Lankhorst wrote: Previously RMFB and fd close chose to disable any plane that had an active framebuffer from this file. If it was a primary plane t

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 04:08 PM, Chris Wilson wrote: On Wed, Sep 09, 2015 at 03:45:40PM +0100, Tvrtko Ursulin wrote: On 08/10/2015 09:51 AM, Chris Wilson wrote: Whilst discussing possible ways to trigger an invalidate_range on a userptr with an aliased GGTT mmapping (and so cause a struct_mutex deadloc

Re: [Intel-gfx] [RFC] drm/i915: Render decompression support for Gen9 and above

2015-09-09 Thread Daniel Vetter
On Tue, Sep 08, 2015 at 03:07:40PM -0700, Jesse Barnes wrote: > On 09/07/2015 09:35 AM, Daniel Vetter wrote: > > On Sat, Sep 05, 2015 at 01:12:50AM +0530, Vandana Kannan wrote: > >> This patch includes enabling render decompression after checking all the > >> requirements (format, tiling, rotation

Re: [Intel-gfx] [RFC] drm/i915: Render decompression support for Gen9 and above

2015-09-09 Thread Jesse Barnes
On 09/09/2015 08:23 AM, Daniel Vetter wrote: > On Tue, Sep 08, 2015 at 03:07:40PM -0700, Jesse Barnes wrote: >> On 09/07/2015 09:35 AM, Daniel Vetter wrote: >>> On Sat, Sep 05, 2015 at 01:12:50AM +0530, Vandana Kannan wrote: This patch includes enabling render decompression after checking all

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 04:18:02PM +0100, Tvrtko Ursulin wrote: > > On 09/09/2015 04:04 PM, Daniel Vetter wrote: > >On Wed, Sep 09, 2015 at 03:51:50PM +0100, Tvrtko Ursulin wrote: > >> > >>Hi, > >> > >>On 09/09/2015 03:40 PM, Maarten Lankhorst wrote: > >>>Previously RMFB and fd close chose to disa

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use DDR DVFS on CHV when disabled in the BIOS

2015-09-09 Thread Ville Syrjälä
On Tue, Sep 08, 2015 at 09:16:11PM +0100, Chris Wilson wrote: > On Tue, Sep 08, 2015 at 09:05:12PM +0300, ville.syrj...@linux.intel.com wrote: > > From: Ville Syrjälä > > > > If one disables DDR DVFS in the BIOS, Punit will apparently ignores > > all DDR DVFS request. Currently we assume that DDR

Re: [Intel-gfx] [PATCH] drm/i915: Fix CSR MMIO address check

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 04:52:09PM +0200, Takashi Iwai wrote: > Fix a wrong logical AND (&&) used for the range check of CSR MMIO. > > Spotted nicely by gcc -Wlogical-op flag: > drivers/gpu/drm/i915/intel_csr.c: In function ‘finish_csr_load’: > drivers/gpu/drm/i915/intel_csr.c:353:41: warning:

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use DDR DVFS on CHV when disabled in the BIOS

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 06:28:50PM +0300, Ville Syrjälä wrote: > On Tue, Sep 08, 2015 at 09:16:11PM +0100, Chris Wilson wrote: > > Would it make sense to disable dvfs after a failure as well, > > then the user is shown a single DRM_ERROR at runtime and we should > > recover (by not going to the ful

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 04:20:08PM +0100, Tvrtko Ursulin wrote: > > On 09/09/2015 04:08 PM, Chris Wilson wrote: > >On Wed, Sep 09, 2015 at 03:45:40PM +0100, Tvrtko Ursulin wrote: > >>On 08/10/2015 09:51 AM, Chris Wilson wrote: > >>>Whilst discussing possible ways to trigger an invalidate_range on

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 04:29 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 04:18:02PM +0100, Tvrtko Ursulin wrote: On 09/09/2015 04:04 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 03:51:50PM +0100, Tvrtko Ursulin wrote: Hi, On 09/09/2015 03:40 PM, Maarten Lankhorst wrote: Previously RMFB an

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 09, 2015 at 04:47:08PM +0100, Tvrtko Ursulin wrote: > > On 09/09/2015 04:29 PM, Daniel Vetter wrote: > >On Wed, Sep 09, 2015 at 04:18:02PM +0100, Tvrtko Ursulin wrote: > >> > >>On 09/09/2015 04:04 PM, Daniel Vetter wrote: > >>>On Wed, Sep 09, 2015 at 03:51:50PM +0100, Tvrtko Ursulin wr

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 04:56 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 04:47:08PM +0100, Tvrtko Ursulin wrote: On 09/09/2015 04:29 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 04:18:02PM +0100, Tvrtko Ursulin wrote: On 09/09/2015 04:04 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 03:

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 9, 2015 at 6:03 PM, Tvrtko Ursulin wrote: > It was just an example of a class of vulnerabilities which would be possible > with these changes. If they, as you said, will preserve the last frame on > screen when the compositor crashes. If your compositor crashes something should take o

Re: [Intel-gfx] [PATCH] drm/i915: Don't try to use DDR DVFS on CHV when disabled in the BIOS

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 04:41:04PM +0100, Chris Wilson wrote: > On Wed, Sep 09, 2015 at 06:28:50PM +0300, Ville Syrjälä wrote: > > On Tue, Sep 08, 2015 at 09:16:11PM +0100, Chris Wilson wrote: > > > Would it make sense to disable dvfs after a failure as well, > > > then the user is shown a single D

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 05:07 PM, Daniel Vetter wrote: On Wed, Sep 9, 2015 at 6:03 PM, Tvrtko Ursulin wrote: It was just an example of a class of vulnerabilities which would be possible with these changes. If they, as you said, will preserve the last frame on screen when the compositor crashes. If you

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Maarten Lankhorst
Op 09-09-15 om 18:15 schreef Tvrtko Ursulin: > > On 09/09/2015 05:07 PM, Daniel Vetter wrote: >> On Wed, Sep 9, 2015 at 6:03 PM, Tvrtko Ursulin >> wrote: >>> It was just an example of a class of vulnerabilities which would be possible >>> with these changes. If they, as you said, will preserve the

Re: [Intel-gfx] [RFC] drm/i915: Render decompression support for Gen9 and above

2015-09-09 Thread Smith, Gary K
I don't understand why this is an issue. Surely the fb is to describe static state about the buffer, not dynamic state. The fb should be created with the compressed modifier. The compressed property is just a hint to the kernel that the buffer has been completely resolved, hence currently it can

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Tvrtko Ursulin
On 09/09/2015 05:26 PM, Maarten Lankhorst wrote: Op 09-09-15 om 18:15 schreef Tvrtko Ursulin: On 09/09/2015 05:07 PM, Daniel Vetter wrote: On Wed, Sep 9, 2015 at 6:03 PM, Tvrtko Ursulin wrote: It was just an example of a class of vulnerabilities which would be possible with these changes. I

Re: [Intel-gfx] [PATCH i-g-t] tools/Android.mk: Fix compile error in intel_reg.c

2015-09-09 Thread Morton, Derek J
-Original Message- From: Thomas Wood [mailto:thomas.w...@intel.com] Sent: Wednesday, September 9, 2015 2:48 PM To: Morton, Derek J Cc: Intel Graphics Development Subject: Re: [PATCH i-g-t] tools/Android.mk: Fix compile error in intel_reg.c > >On 9 September 2015 at 14:30, Derek Morton w

[Intel-gfx] [PATCH i-g-t v2] tools/Android.mk: Fix compile error in intel_reg.c

2015-09-09 Thread Derek Morton
The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file sy

Re: [Intel-gfx] [RFC] drm/i915: Handle E2BIG error in i915_gem_fault

2015-09-09 Thread Michel Thierry
On 9/9/2015 11:33 AM, Chris Wilson wrote: On Wed, Sep 09, 2015 at 11:29:52AM +0100, Michel Thierry wrote: i915_gem_object_bind_to_vm returns -E2BIG when the user tries to bind an object larger than the aperture, but i915_gem_fault does not handle this return code: [501906.530985] gem_mmap_gtt:

Re: [Intel-gfx] [RFC] drm/i915: Render decompression support for Gen9 and above

2015-09-09 Thread Jesse Barnes
[Adding Rob & Thierry] On 09/09/2015 09:36 AM, Smith, Gary K wrote: > I don't understand why this is an issue. Surely the fb is to describe static > state about the buffer, not dynamic state. The fb should be created with the > compressed modifier. The compressed property is just a hint to the k

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Konduru, Chandra
> > > > > > + /* For tile-Yf, uv-subplane tile width is 2x of > > > > > > Y- > subplane > > > > > */ > > > > > > + aux_stride = fb->modifier[0] == > > > > > I915_FORMAT_MOD_Yf_TILED ? > > > > > > + stride / 2 : stride; > > > > > > > > >

Re: [Intel-gfx] [PATCH 14/15] drm/i915: skl nv12 workarounds

2015-09-09 Thread Konduru, Chandra
> > > > > > + > > > > > > + /* workaround for NV12 */ > > > > > > + skl_wa_clkgate(dev_priv, pipe, 1); > > > > > > > > > > I wonder what's the cost of having this > > > > > a) always enabled > > > > > b) enabled when the pipe is enabled > > > > > c) enabled only when NV12 is used > > > > > ? >

Re: [Intel-gfx] [RFC] drm/i915: Handle E2BIG error in i915_gem_fault

2015-09-09 Thread Chris Wilson
On Wed, Sep 09, 2015 at 05:53:57PM +0100, Michel Thierry wrote: > On 9/9/2015 11:33 AM, Chris Wilson wrote: > >On Wed, Sep 09, 2015 at 11:29:52AM +0100, Michel Thierry wrote: > >>i915_gem_object_bind_to_vm returns -E2BIG when the user tries to bind an > >>object larger than the aperture, but i915_g

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 05:12:06PM +, Konduru, Chandra wrote: > > > > > > > + /* For tile-Yf, uv-subplane tile width is 2x of > > > > > > > Y- > > subplane > > > > > > */ > > > > > > > + aux_stride = fb->modifier[0] == > > > > > > I915_FORMAT_MOD_Yf_TILED ? > >

Re: [Intel-gfx] [PATCH i-g-t 1/2] build: fix unused-result warnings

2015-09-09 Thread Zanoni, Paulo R
Em Seg, 2015-09-07 às 12:34 +0100, Thomas Wood escreveu: > Signed-off-by: Thomas Wood > --- > benchmarks/kms_vblank.c| 7 --- > debugger/eudb.c| 4 +++- > lib/igt_aux.c | 8 ++-- > overlay/gpu-top.c | 4 +++- > overlay/overlay.c

Re: [Intel-gfx] [PATCH 1/6] drm/i915: add attached connector to hdmi container

2015-09-09 Thread Rodrigo Vivi
Reviewed-by: Rodrigo Vivi On Fri, Sep 4, 2015 at 6:37 AM Sonika Jindal wrote: > From: Shashank Sharma > > This patch adds the intel_connector initialized to intel_hdmi > display, during the init phase, just like the other encoders do. > This attachment is very useful when we need to extract th

Re: [Intel-gfx] [PATCH 2/6] drm/i915: Add HDMI probe function

2015-09-09 Thread Rodrigo Vivi
I liked the approach and agree with Daniel, so with his suggestions feel free to use: Reviewed-by: Rodrigo Vivi On Fri, Sep 4, 2015 at 7:46 AM Daniel Vetter wrote: > On Fri, Sep 04, 2015 at 06:56:12PM +0530, Sonika Jindal wrote: > > From: Shashank Sharma > > > > This patch adds a separate prob

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Make intel_digital_port_connected global

2015-09-09 Thread Rodrigo Vivi
On Fri, Sep 4, 2015 at 6:37 AM Sonika Jindal wrote: > This is to allow live status check for HDMI as well. > Also, using intel_encoder->hpd_pin to check the live status > for bxt because of BXT A0/A1 WA for HPD pins. > This is actually the only thing this patch does... So please use separated pa

Re: [Intel-gfx] [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.

2015-09-09 Thread Daniel Vetter
On Wed, Sep 9, 2015 at 6:36 PM, Tvrtko Ursulin wrote: > I am not even going that far, just talking about last frame stuck on screen. > For me making that easier is a regression. So let's look at various systems: - super-modern fbdev less system: logind keeps a dup of every master-capabel drm fd.

Re: [Intel-gfx] [PATCH 4/6] drm/i915: drm/i915: Check live status before reading edid

2015-09-09 Thread Rodrigo Vivi
On Fri, Sep 4, 2015 at 7:47 AM Daniel Vetter wrote: > On Fri, Sep 04, 2015 at 06:56:14PM +0530, Sonika Jindal wrote: > > The Bspec is very clear that Live status must be checked about before > > trying to read EDID over DDC channel. This patch makes sure that HDMI > > EDID is read only when live

Re: [Intel-gfx] [PATCH 5/6] drm/i915: drm/i915: Process hpd only for hdmi inside hotplug_work_func

2015-09-09 Thread Rodrigo Vivi
I was also going to say that I believe this breaks DP hotplug, but this was agreed already... But I also don't understand how hot_plug is called twice since it calls encoder->hot_plug... and dp has no ->hot_plug... And also if this is happening how this code that checks for connector would help...

Re: [Intel-gfx] [PATCH 6/6] drm/i915/bxt: Fix irq_port for eDP

2015-09-09 Thread Rodrigo Vivi
Nak: I don't believe we need this... Actually I believe we need the opposite... we need to enable HPD on port A for eDP errors handling... On Fri, Sep 4, 2015 at 6:38 AM Sonika Jindal wrote: > From: Durgadoss R > > Currently, HDMI hotplug with eDP as local panel is failing > because the HDMI

[Intel-gfx] [PATCH i-g-t 2/2] tools/intel_reg: Print the potential port names in the help text

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä Signed-off-by: Ville Syrjälä --- tools/intel_reg.c | 2 ++ tools/intel_reg_spec.c | 9 + tools/intel_reg_spec.h | 1 + 3 files changed, 12 insertions(+) diff --git a/tools/intel_reg.c b/tools/intel_reg.c index fb3461f..26f908f 100644 --- a/tools/intel_reg.c +++

[Intel-gfx] [PATCH i-g-t 1/2] tools/intel_reg: Set register stride to 1 for VGA registers

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä VGA registers are generally 8 bits long, so set the stride to 1 byte. Signed-off-by: Ville Syrjälä --- tools/intel_reg_spec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c index 6b7e30c..b49e0dc 10064

[Intel-gfx] [PATCH i-g-t 1/4] tools/intel_display_poller: Add CHV support

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä Add CHV support by adding a pipe_offset[] thingy (like we have in the kernel) to deal with the wonky register offsets. Signed-off-by: Ville Syrjälä --- tools/intel_display_poller.c | 278 --- 1 file changed, 49 insertions(+), 229 dele

[Intel-gfx] [PATCH i-g-t 4/4] tools/intel_display_poller: Align DSPSURF to 128k to appease gen4/vlv/chv

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä gen4/vlv/chv require DSPSURF to be 128k aligned. Try to respect that in order to avoid ugly glitches. Signed-off-by: Ville Syrjälä --- tools/intel_display_poller.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/intel_display_poller.c b/tools

Re: [Intel-gfx] [PATCH] drm/i915: Fix CSR MMIO address check

2015-09-09 Thread Animesh Manna
On 9/9/2015 9:00 PM, Daniel Vetter wrote: On Wed, Sep 09, 2015 at 04:52:09PM +0200, Takashi Iwai wrote: Fix a wrong logical AND (&&) used for the range check of CSR MMIO. Spotted nicely by gcc -Wlogical-op flag: drivers/gpu/drm/i915/intel_csr.c: In function ‘finish_csr_load’: drivers/gp

[Intel-gfx] [PATCH i-g-t 2/4] tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä Check the pipe assignment for each plane (excluding plane C since the kernel doesn't use that one) and pick the first one that's assigned to the target pipe. Signed-off-by: Ville Syrjälä --- tools/intel_display_poller.c | 26 +- 1 file changed, 17 in

[Intel-gfx] [PATCH i-g-t 3/4] tools/intel_display_poller: Make pipe name alphabetic

2015-09-09 Thread ville . syrjala
From: Ville Syrjälä Instead of raw numbers the user can now specify the pipe as 'a',b'... or 'A','B'... Signed-off-by: Ville Syrjälä --- tools/intel_display_poller.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/intel_display_poller.c b/tools/intel_disp

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Konduru, Chandra
> -Original Message- > From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com] > Sent: Wednesday, September 09, 2015 11:06 AM > To: Konduru, Chandra > Cc: Syrjala, Ville; intel-gfx@lists.freedesktop.org; Vetter, Daniel > Subject: Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to prim

Re: [Intel-gfx] [DMC_BUGFIX_SKL_V2 1/5] drm/i915/skl: Added a check for the hardware status of csr fw before loading.

2015-09-09 Thread Animesh Manna
On 9/2/2015 2:24 PM, Daniel Vetter wrote: On Wed, Aug 26, 2015 at 07:40:54PM +0530, Animesh Manna wrote: On 8/26/2015 6:40 PM, Daniel Vetter wrote: On Wed, Aug 26, 2015 at 01:36:05AM +0530, Animesh Manna wrote: Dmc will restore the csr program except DC9, cold boot, warm reset, PCI function

Re: [Intel-gfx] [DMC_BUGFIX_SKL_V2 1/5] drm/i915/skl: Added a check for the hardware status of csr fw before loading.

2015-09-09 Thread Animesh Manna
On 9/7/2015 9:52 PM, Daniel Vetter wrote: On Mon, Sep 07, 2015 at 04:34:30PM +0530, Sunil Kamath wrote: On Wednesday 26 August 2015 01:36 AM, Animesh Manna wrote: Dmc will restore the csr program except DC9, cold boot, warm reset, PCI function level reset, and hibernate/suspend. intel_csr_lo

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 08:10:30PM +, Konduru, Chandra wrote: > > > > -Original Message- > > From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com] > > Sent: Wednesday, September 09, 2015 11:06 AM > > To: Konduru, Chandra > > Cc: Syrjala, Ville; intel-gfx@lists.freedesktop.org; Ve

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Konduru, Chandra
> > > > > > > > > > + /* For tile-Yf, uv-subplane tile width > > > > > > > > > > is > 2x of Y- > > > > > subplane > > > > > > > > > */ > > > > > > > > > > + aux_stride = fb->modifier[0] == > > > > > > > > > I915_FORMAT_MOD_Yf_TILED ? > > > > > > > > > > +

Re: [Intel-gfx] [PATCH 11/15] drm/i915: Add NV12 to primary plane programming.

2015-09-09 Thread Ville Syrjälä
On Wed, Sep 09, 2015 at 09:09:27PM +, Konduru, Chandra wrote: > > > > > > > > > > > > + /* For tile-Yf, uv-subplane tile width > > > > > > > > > > > is > > 2x of Y- > > > > > > subplane > > > > > > > > > > */ > > > > > > > > > > > + aux_stride = fb->modifier[0]

  1   2   >