Re: [Nouveau] [v3 PATCH 1/3] drm/atomic: Save flip flags in drm_crtct_state

2017-01-30 Thread Grodzovsky, Andrey


> -Original Message-
> From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
> Sent: Monday, January 30, 2017 6:05 AM
> To: Grodzovsky, Andrey
> Cc: dri-de...@lists.freedesktop.org; amd-...@lists.freedesktop.org;
> nouveau@lists.freedesktop.org; daniel.vet...@intel.com; dc_upstream
> Subject: Re: [v3 PATCH 1/3] drm/atomic: Save flip flags in drm_crtct_state
> 
> Hi Andrey,
> 
> Thank you for the patch.
> 
> On Saturday 28 Jan 2017 21:26:49 Andrey Grodzovsky wrote:
> > Allows using atomic flip helpers for drivers using ASYNC flip.
> > Remove ASYNC_FLIP restriction in helpers and caches the page flip
> > flags in drm_crtc_state to be used in the low level drivers.
> >
> > v2:
> > Resending the patch since the original was broken.
> >
> > v3:
> > Save flag in crtc_state instead of plane_state
> >
> > Signed-off-by: Andrey Grodzovsky 
> > ---
> >  drivers/gpu/drm/drm_atomic_helper.c | 19 +--
> >  include/drm/drm_crtc.h  |  8 +++-
> >  include/drm/drm_plane.h |  1 +
> >  3 files changed, 13 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c
> > b/drivers/gpu/drm/drm_atomic_helper.c index a4e5477..28065ee 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -2737,7 +2737,8 @@ static int page_flip_common(
> > struct drm_atomic_state *state,
> > struct drm_crtc *crtc,
> > struct drm_framebuffer *fb,
> > -   struct drm_pending_vblank_event *event)
> > +   struct drm_pending_vblank_event *event,
> > +   uint32_t flags)
> >  {
> > struct drm_plane *plane = crtc->primary;
> > struct drm_plane_state *plane_state; @@ -2749,12 +2750,12 @@
> static
> > int page_flip_common(
> > return PTR_ERR(crtc_state);
> >
> > crtc_state->event = event;
> > +   crtc_state->pflip_flags = flags;
> >
> > plane_state = drm_atomic_get_plane_state(state, plane);
> > if (IS_ERR(plane_state))
> > return PTR_ERR(plane_state);
> >
> > -
> > ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
> > if (ret != 0)
> > return ret;
> > @@ -2781,10 +2782,6 @@ static int page_flip_common(
> >   * Provides a default _crtc_funcs.page_flip implementation
> >   * using the atomic driver interface.
> >   *
> > - * Note that for now so called async page flips (i.e. updates which
> > are not
> > - * synchronized to vblank) are not supported, since the atomic
> > interfaces have - * no provisions for this yet.
> > - *
> >   * Returns:
> >   * Returns 0 on success, negative errno numbers on failure.
> >   *
> > @@ -2800,9 +2797,6 @@ int drm_atomic_helper_page_flip(struct drm_crtc
> > *crtc, struct drm_atomic_state *state;
> > int ret = 0;
> >
> > -   if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
> > -   return -EINVAL;
> > -
> > state = drm_atomic_state_alloc(plane->dev);
> > if (!state)
> > return -ENOMEM;
> > @@ -2810,7 +2804,7 @@ int drm_atomic_helper_page_flip(struct drm_crtc
> > *crtc,
> > state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
> >
> >  retry:
> > -   ret = page_flip_common(state, crtc, fb, event);
> > +   ret = page_flip_common(state, crtc, fb, event, flags);
> > if (ret != 0)
> > goto fail;
> >
> > @@ -2865,9 +2859,6 @@ int drm_atomic_helper_page_flip_target(
> > struct drm_crtc_state *crtc_state;
> > int ret = 0;
> >
> > -   if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
> > -   return -EINVAL;
> > -
> > state = drm_atomic_state_alloc(plane->dev);
> > if (!state)
> > return -ENOMEM;
> > @@ -2875,7 +2866,7 @@ int drm_atomic_helper_page_flip_target(
> > state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
> >
> >  retry:
> > -   ret = page_flip_common(state, crtc, fb, event);
> > +   ret = page_flip_common(state, crtc, fb, event, flags);
> > if (ret != 0)
> > goto fail;
> >
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index
> > 5c77c3f..76457a4 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -162,10 +162,16 @@ struct drm_crtc_state {
> >  * Target vertical blank period when a page flip
> >  * should take effect.
> >  */
> > -
> > u32 target_vblank;
> >
> > /**
> > +* @pflip_flags:
> > +*
> > +* Flip related config options
> 
> This isn't detailed enough. I propose something along the lines of
> 
> "DRM_MODE_PAGE_FLIP_* page flip flags, as passed to the page flip ioctl.
> Always zero for atomic commits that don't originate from a page flip ioctl."
> 
> You will then also need to reset the field to 0 at an appropriate point, as 
> it's
> more an atomic commit transaction information than a state. Apart from that
> this patch looks good to me.
Thanks for your 

[Nouveau] [PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex

2017-01-30 Thread Thierry Reding
From: Thierry Reding 

The gk20a implementation of instance memory uses vmap()/vunmap() to map
memory regions into the kernel's virtual address space. These functions
may sleep, so protecting them by a spin lock is not safe. This triggers
a warning if the DEBUG_ATOMIC_SLEEP Kconfig option is enabled. Fix this
by using a mutex instead.

Signed-off-by: Thierry Reding 
---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index a6a7fa0d7679..7f5244d57d2f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -94,7 +94,7 @@ struct gk20a_instmem {
struct nvkm_instmem base;
 
/* protects vaddr_* and gk20a_instobj::vaddr* */
-   spinlock_t lock;
+   struct mutex lock;
 
/* CPU mappings LRU */
unsigned int vaddr_use;
@@ -184,11 +184,10 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->base.imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
const u64 size = nvkm_memory_size(memory);
-   unsigned long flags;
 
nvkm_ltc_flush(ltc);
 
-   spin_lock_irqsave(>lock, flags);
+   mutex_lock(>lock);
 
if (node->base.vaddr) {
if (!node->use_cpt) {
@@ -216,7 +215,7 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
 
 out:
node->use_cpt++;
-   spin_unlock_irqrestore(>lock, flags);
+   mutex_unlock(>lock);
 
return node->base.vaddr;
 }
@@ -239,9 +238,8 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory)
struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
struct gk20a_instmem *imem = node->base.imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
-   unsigned long flags;
 
-   spin_lock_irqsave(>lock, flags);
+   mutex_lock(>lock);
 
/* we should at least have one user to release... */
if (WARN_ON(node->use_cpt == 0))
@@ -252,7 +250,7 @@ gk20a_instobj_release_iommu(struct nvkm_memory *memory)
list_add_tail(>vaddr_node, >vaddr_lru);
 
 out:
-   spin_unlock_irqrestore(>lock, flags);
+   mutex_unlock(>lock);
 
wmb();
nvkm_ltc_invalidate(ltc);
@@ -306,19 +304,18 @@ gk20a_instobj_dtor_iommu(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->base.imem;
struct device *dev = imem->base.subdev.device->dev;
struct nvkm_mm_node *r;
-   unsigned long flags;
int i;
 
if (unlikely(list_empty(>base.mem.regions)))
goto out;
 
-   spin_lock_irqsave(>lock, flags);
+   mutex_lock(>lock);
 
/* vaddr has already been recycled */
if (node->base.vaddr)
gk20a_instobj_iommu_recycle_vaddr(node);
 
-   spin_unlock_irqrestore(>lock, flags);
+   mutex_unlock(>lock);
 
r = list_first_entry(>base.mem.regions, struct nvkm_mm_node,
 rl_entry);
@@ -580,7 +577,7 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
return -ENOMEM;
nvkm_instmem_ctor(_instmem, device, index, >base);
-   spin_lock_init(>lock);
+   mutex_init(>lock);
*pimem = >base;
 
/* do not allow more than 1MB of CPU-mapped instmem */
-- 
2.11.0

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 99400] [nouveau] garbled rendering with glamor on G71

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99400

--- Comment #19 from Ilia Mirkin  ---
OH! DUH!

apitrace: warning: glMapBufferRange: MAP_COHERENT_BIT|MAP_WRITE_BIT unsupported


Right, so you need to run this with
MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage. Or find some way to force
glamor to disable it. apitrace doesn't like it. I'm sure that's why the
textures are garbage.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 99400] [nouveau] garbled rendering with glamor on G71

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99400

--- Comment #18 from Ilia Mirkin  ---
Curious. It should perhaps be noted that there are no instances of
glCopyTexSubImage2D in your trace. That means they happen some other way...

It should be noted that the warning in question can only come out as

  if (yoffset + subHeight > (GLint) destImage->Height) {
 _mesa_error(ctx, GL_INVALID_VALUE, "%s(yoffset+height)", func);
 return GL_TRUE;
  }

Anyways, looking at your recent trace, while it contains various useful items,
I can't get any of the framebuffers to show particularly useful data when
replaying to specific draws on an intel system. Can you find a draw that should
have a useful image?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [v3 PATCH 3/3] drm/amd/display: Switch to using atomic_helper for flip.

2017-01-30 Thread Harry Wentland
On 2017-01-28 09:26 PM, Andrey Grodzovsky wrote:
> Swicth to use atomic helper.
> Start using actual user's given target_vblank value for flip 
> instead of current value.
> 
> v3:
> Update for movig pflip flags to crtc_state
> 
> Change-Id: I25dae6d8c29de5d022a42aa99a18a32674b56cda
> Signed-off-by: Andrey Grodzovsky 
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h   |   1 -
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c| 109 
> -
>  2 files changed, 19 insertions(+), 91 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> index 4c0a86e..3ff3c14 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> @@ -443,7 +443,6 @@ struct amdgpu_crtc {
>   enum amdgpu_interrupt_state vsync_timer_enabled;
>  
>   int otg_inst;
> - uint32_t flip_flags;
>   /* After Set Mode target will be non-NULL */
>   struct dc_target *target;
>  };
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
> index a443b70..148780d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
> @@ -1060,83 +1060,6 @@ static int dm_crtc_funcs_atomic_set_property(
>   return 0;
>  }
>  
> -
> -static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
> - struct drm_framebuffer *fb,
> - struct drm_pending_vblank_event *event,
> - uint32_t flags)
> -{
> - struct drm_plane *plane = crtc->primary;
> - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
> - struct drm_atomic_state *state;
> - struct drm_plane_state *plane_state;
> - struct drm_crtc_state *crtc_state;
> - int ret = 0;
> -
> - state = drm_atomic_state_alloc(plane->dev);
> - if (!state)
> - return -ENOMEM;
> -
> - ret = drm_crtc_vblank_get(crtc);
> - if (ret)
> - return ret;
> -
> - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
> -retry:
> - crtc_state = drm_atomic_get_crtc_state(state, crtc);
> - if (IS_ERR(crtc_state)) {
> - ret = PTR_ERR(crtc_state);
> - goto fail;
> - }
> - crtc_state->event = event;
> -
> - plane_state = drm_atomic_get_plane_state(state, plane);
> - if (IS_ERR(plane_state)) {
> - ret = PTR_ERR(plane_state);
> - goto fail;
> - }
> -
> - ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
> - if (ret != 0)
> - goto fail;
> - drm_atomic_set_fb_for_plane(plane_state, fb);
> -
> - /* Make sure we don't accidentally do a full modeset. */
> - state->allow_modeset = false;
> - if (!crtc_state->active) {
> - DRM_DEBUG_ATOMIC("[CRTC:%d] disabled, rejecting legacy flip\n",
> -  crtc->base.id);
> - ret = -EINVAL;
> - goto fail;
> - }
> - acrtc->flip_flags = flags;
> -
> - ret = drm_atomic_nonblocking_commit(state);
> -
> -fail:
> - if (ret == -EDEADLK)
> - goto backoff;
> -
> - if (ret)
> - drm_crtc_vblank_put(crtc);
> -
> - drm_atomic_state_put(state);
> -
> - return ret;
> -backoff:
> - drm_atomic_state_clear(state);
> - drm_atomic_legacy_backoff(state);
> -
> - /*
> -  * Someone might have exchanged the framebuffer while we dropped locks
> -  * in the backoff code. We need to fix up the fb refcount tracking the
> -  * core does for us.
> -  */
> - plane->old_fb = plane->fb;
> -
> - goto retry;
> -}
> -
>  /* Implemented only the options currently availible for the driver */
>  static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
>   .reset = drm_atomic_helper_crtc_reset,
> @@ -1145,7 +1068,7 @@ static int amdgpu_atomic_helper_page_flip(struct 
> drm_crtc *crtc,
>   .destroy = amdgpu_dm_crtc_destroy,
>   .gamma_set = amdgpu_dm_atomic_crtc_gamma_set,
>   .set_config = drm_atomic_helper_set_config,
> - .page_flip = amdgpu_atomic_helper_page_flip,
> + .page_flip_target = drm_atomic_helper_page_flip_target,
>   .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
>   .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
>   .atomic_set_property = dm_crtc_funcs_atomic_set_property
> @@ -1626,7 +1549,8 @@ static void clear_unrelated_fields(struct 
> drm_plane_state *state)
>  static bool page_flip_needed(
>   const struct drm_plane_state *new_state,
>   const struct drm_plane_state *old_state,
> - bool commit_surface_required)
> + bool commit_surface_required,
> + uint32_t pflip_flags)
>  {
>   struct drm_plane_state old_state_tmp;
>   struct drm_plane_state new_state_tmp;
> @@ -1679,7 +1603,7 @@ static 

[Nouveau] [Bug 99147] xorg hangs at initial startup on linux-4.9.0

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99147

Peter Wu  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 CC||pe...@lekensteyn.nl
 Status|NEW |RESOLVED

--- Comment #11 from Peter Wu  ---
Seems related indeed, marking as dup.

*** This bug has been marked as a duplicate of bug 98690 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 99400] [nouveau] garbled rendering with glamor on G71

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99400

--- Comment #17 from Olivier Fourdan  ---

Updated traces and logs here:

https://people.freedesktop.org/~ofourdan/bug99400/Xwayland.log
https://people.freedesktop.org/~ofourdan/bug99400/Xwayland.trace

With this, I see interesting errors like:

Mesa: User error: GL_INVALID_VALUE in glCopyTexSubImage2D(xoffset+width)
(EE) glamor0: GL error: GL_INVALID_VALUE in glCopyTexSubImage2D(xoffset+width)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 99400] [nouveau] garbled rendering with glamor on G71

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99400

--- Comment #16 from Olivier Fourdan  ---
(In reply to Ilia Mirkin from comment #13)
> I'd like to help you, but I'm just not sure how -- I don't have Wayland (or
> any interest in setting that up), and your traces appear incomplete. I don't
> know why - I've never seen that before. But they don't create contexts.
> [...]
> While the Xwayland trace has none of those. Paradoxically, it starts at call
> 31. Perhaps you have a non-egl-enabled apitrace? Also note that there's not
> a single instance of UseProgram or any other shader-related items in the
> XWayland trace.
Oh right... Blimey! You got me thinking here, you're right, those Xwayland
traces are just wrong, it's libepoxy not playing nice with "apitrace --api-egl"
(https://github.com/anholt/libepoxy/issues/68) so I picked up the forked
version libexpoy, rebuilt apitrace and Xwayland and was able to capture a much
better trace!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [v3 PATCH 1/3] drm/atomic: Save flip flags in drm_crtct_state

2017-01-30 Thread Laurent Pinchart
Hi Andrey,

Thank you for the patch.

On Saturday 28 Jan 2017 21:26:49 Andrey Grodzovsky wrote:
> Allows using atomic flip helpers for drivers
> using ASYNC flip.
> Remove ASYNC_FLIP restriction in helpers and
> caches the page flip flags in drm_crtc_state
> to be used in the low level drivers.
> 
> v2:
> Resending the patch since the original was broken.
> 
> v3:
> Save flag in crtc_state instead of plane_state
> 
> Signed-off-by: Andrey Grodzovsky 
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 19 +--
>  include/drm/drm_crtc.h  |  8 +++-
>  include/drm/drm_plane.h |  1 +
>  3 files changed, 13 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c
> b/drivers/gpu/drm/drm_atomic_helper.c index a4e5477..28065ee 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -2737,7 +2737,8 @@ static int page_flip_common(
>   struct drm_atomic_state *state,
>   struct drm_crtc *crtc,
>   struct drm_framebuffer *fb,
> - struct drm_pending_vblank_event *event)
> + struct drm_pending_vblank_event *event,
> + uint32_t flags)
>  {
>   struct drm_plane *plane = crtc->primary;
>   struct drm_plane_state *plane_state;
> @@ -2749,12 +2750,12 @@ static int page_flip_common(
>   return PTR_ERR(crtc_state);
> 
>   crtc_state->event = event;
> + crtc_state->pflip_flags = flags;
> 
>   plane_state = drm_atomic_get_plane_state(state, plane);
>   if (IS_ERR(plane_state))
>   return PTR_ERR(plane_state);
> 
> -
>   ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
>   if (ret != 0)
>   return ret;
> @@ -2781,10 +2782,6 @@ static int page_flip_common(
>   * Provides a default _crtc_funcs.page_flip implementation
>   * using the atomic driver interface.
>   *
> - * Note that for now so called async page flips (i.e. updates which are not
> - * synchronized to vblank) are not supported, since the atomic interfaces
> have - * no provisions for this yet.
> - *
>   * Returns:
>   * Returns 0 on success, negative errno numbers on failure.
>   *
> @@ -2800,9 +2797,6 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc,
> struct drm_atomic_state *state;
>   int ret = 0;
> 
> - if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
> - return -EINVAL;
> -
>   state = drm_atomic_state_alloc(plane->dev);
>   if (!state)
>   return -ENOMEM;
> @@ -2810,7 +2804,7 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc,
> state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
> 
>  retry:
> - ret = page_flip_common(state, crtc, fb, event);
> + ret = page_flip_common(state, crtc, fb, event, flags);
>   if (ret != 0)
>   goto fail;
> 
> @@ -2865,9 +2859,6 @@ int drm_atomic_helper_page_flip_target(
>   struct drm_crtc_state *crtc_state;
>   int ret = 0;
> 
> - if (flags & DRM_MODE_PAGE_FLIP_ASYNC)
> - return -EINVAL;
> -
>   state = drm_atomic_state_alloc(plane->dev);
>   if (!state)
>   return -ENOMEM;
> @@ -2875,7 +2866,7 @@ int drm_atomic_helper_page_flip_target(
>   state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
> 
>  retry:
> - ret = page_flip_common(state, crtc, fb, event);
> + ret = page_flip_common(state, crtc, fb, event, flags);
>   if (ret != 0)
>   goto fail;
> 
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 5c77c3f..76457a4 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -162,10 +162,16 @@ struct drm_crtc_state {
>* Target vertical blank period when a page flip
>* should take effect.
>*/
> -
>   u32 target_vblank;
> 
>   /**
> +  * @pflip_flags:
> +  *
> +  * Flip related config options

This isn't detailed enough. I propose something along the lines of

"DRM_MODE_PAGE_FLIP_* page flip flags, as passed to the page flip ioctl. 
Always zero for atomic commits that don't originate from a page flip ioctl."

You will then also need to reset the field to 0 at an appropriate point, as 
it's more an atomic commit transaction information than a state. Apart from 
that this patch looks good to me.

> +  */
> + u32 pflip_flags;
> +
> + /**
>* @event:
>*
>* Optional pointer to a DRM event to signal upon completion of the
> diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
> index db3bbde..57414ae 100644
> --- a/include/drm/drm_plane.h
> +++ b/include/drm/drm_plane.h
> @@ -122,6 +122,7 @@ struct drm_plane_state {
>*/
>   bool visible;
> 
>   struct drm_atomic_state *state;
>  };

-- 
Regards,

Laurent Pinchart

___
Nouveau mailing list

[Nouveau] [Bug 99400] [nouveau] garbled rendering with glamor on G71

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99400

--- Comment #15 from Olivier Fourdan  ---
(In reply to Ilia Mirkin from comment #13)
> I'd like to help you, but I'm just not sure how

I know, and very much appreciate your help!

I'm sorry I can't be of more help, I spent like the past 5 days or so on this
and all I could come up with is pretty much summarized in comment 12, ie not
much.

> [...] I've never seen that before. But they don't create contexts.
> Compare your Xephyr trace, which has glXChooseFBConfig, glXCreateContext,
> glXMakeCurrent

I think this is normal, this is Wayland not X so it doesn't need/use GLX.

Xwayland is an X server for the X11 clients and a Wayland client to the Wayland
compositor, so that X11 application can still work on Wayland.

> While the Xwayland trace has none of those. Paradoxically, it starts at call
> 31. Perhaps you have a non-egl-enabled apitrace? Also note that there's not
> a single instance of UseProgram or any other shader-related items in the
> XWayland trace.

Yes, that's puzzling... I rebuilt apitrace current from github (instead of
using the one from Fedora) and it's the same.

> Does the Xephyr trace exhibit the problems for you when replayed? If so, I
> can investigate that. However on my GK208 (or with llvmpipe), when replayed,
> it doesn't appear to render anything.

Unfortunately I could never make apitrace replay anything here either.

(In reply to Ilia Mirkin from comment #14)
> nv30_vbo_validate - force it to take the vertex->need_conversion path (like
> we do on BE). No clue if that'll help, but it's a start.
> 
> Also did you check whether NV30_SWTNL=1 fixes things?

Neither forcing conversion in nv30_vbo_validate() nor using NV30_SWTNL=1 change
anything.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [v3 PATCH 0/3] Allow ASYNC flip with atomic helpers.

2017-01-30 Thread Emil Velikov
Hi Andrey,

Unrelated suggestion:

A handy trick - to save yourself a bit of time (and "get it right")
you can use `git format-patch -vX ...' [it also works with send-email]
to have the version in the subject prefix.
Feel free to share it with the team - it seems that many people
manually edit the patch(es).

-Emil
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 99396] Crash in nouveau_dri.so when switching apps with alt-tab in Gnome

2017-01-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99396

--- Comment #5 from Per Arnold Blaasmo  ---
I seem to experience the same problem.
I am using Fedora 25.
gnome-shell-3.22.2-2.fc25.x86_64
kernel-4.9.5-200.fc25.x86_64
xorg-x11-drv-nouveau-1.0.13-1.fc25.x86_64
mesa 13.0.3-1.fc25.x86_64

Not sure if it is related, but in the system log I get:

jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: fail ttm_validate
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validating bo list
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validate: -12
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: fail ttm_validate
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validating bo list
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validate: -12
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: fail ttm_validate
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validating bo list
jan. 30 08:45:43 nordt0206.corp.atmel.com kernel: nouveau :02:00.0:
gnome-shell[18725]: validate: -12

...

jan. 30 08:46:21 nordt0206.corp.atmel.com org.gnome.Shell.desktop[18725]:
nouveau: kernel rejected pushbuf: Cannot allocate memory
jan. 30 08:46:21 nordt0206.corp.atmel.com org.gnome.Shell.desktop[18725]:
nouveau: ch2: krec 0 pushes 1 bufs 54 relocs 0
jan. 30 08:46:21 nordt0206.corp.atmel.com org.gnome.Shell.desktop[18725]:
nouveau: ch2: buf  0002 0004 0004 
jan. 30 08:46:21 nordt0206.corp.atmel.com org.gnome.Shell.desktop[18725]:
nouveau: ch2: buf 0001 0006 0004  0004
jan. 30 08:46:21 nordt0206.corp.atmel.com org.gnome.Shell.desktop[18725]:
nouveau: ch2: buf 0002 0077 0004 0004 


-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau