[Nouveau] [Bug 91535] [NVE7] Chrome can cause a nouveau 'multiple instances of buffer' message when overlaying a menu leading to X lockup

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91535

Ilia Mirkin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Ilia Mirkin  ---
I believe the last of the "multiple instances of buffer" issues are fixed with
Mesa 11.0.3. The set_domain issue is unrelated -- see bug 92504 for details.
Marking this resolved.

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


[Nouveau] [Bug 90871] NV30: Xfwm4 use_compositing - garbled display

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90871

--- Comment #47 from Olivier Fourdan  ---
(In reply to Ilia Mirkin from comment #46)
> Just my incompetence

Mine, rather.

> glMatrixMode has to go *before* glPushMatrix, not
> after. Oops. Moving it up makes the program behave as expected, at least on
> intel/hsw.
> 
> Pretty sure it's what I said -- the test program doesn't do a glXMakeCurrent
> before calling gl functions, which means their output is invalid. Not an
> epoxy issue. Rearranging the test program's code to fix this is annoying
> though.

No it's not, if the test program is invalid, it ought to be fixed.

> I wonder if this is a real issue in xfwm code as well.

Yes, most likely. This code is still early beta in xfwm4. I'll try to fix it
and Poma will be able to test I guess.

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 92504] [NVA5] Corruption in Plasma 5 on resume after changing screen configuration

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92504

Ilia Mirkin  changed:

   What|Removed |Added

 CC||seraf...@gmail.com

--- Comment #24 from Ilia Mirkin  ---
*** Bug 92213 has been marked as a duplicate of this bug. ***

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91598] Broken Rendering of Plasma 5 Desktop

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91598

Ilia Mirkin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #16 from Ilia Mirkin  ---


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

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


[Nouveau] [Bug 92213] nouveau hangs after resume on kwin present windows

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92213

Ilia Mirkin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Ilia Mirkin  ---
I believe this is the same issue and it's likely the same fix will help.

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

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 90871] NV30: Xfwm4 use_compositing - garbled display

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90871

--- Comment #46 from Ilia Mirkin  ---
(In reply to Hans de Goede from comment #44)
> Hi Ilia,
> 
> (In reply to Ilia Mirkin from comment #43)
> > Created attachment 118995 [details]
> > updated test program
> > 
> > With this I get the same results whether I set has_texture_rectangle = 1 or
> > 0. Attached the full updated source file, or use the patch below.
> 
> Thanks for the updated test program, this seems to fix things on nv3x. There
> still is an issue with then test program though (also reproduced on intel
> gfx) the program is supposed to change the color of the "box" when you click
> a mouse button (pressing a key exits the program), but currently when using
> rectangle textures it draws a red box on startup and then on a mouse click
> everything goes gray, where as the box should turn blue. As said this
> happens on intel gfx too, so I think there still is an issue with the test
> program when using rectangle textures.

Just my incompetence -- glMatrixMode has to go *before* glPushMatrix, not
after. Oops. Moving it up makes the program behave as expected, at least on
intel/hsw.

> 
> As for epoxy not seeing the extension, I believe that that is an epoxy
> issue, as said the extension is clearly listed in both glxinfo and glxgears
> -info output.

Pretty sure it's what I said -- the test program doesn't do a glXMakeCurrent
before calling gl functions, which means their output is invalid. Not an epoxy
issue. Rearranging the test program's code to fix this is annoying though.

I wonder if this is a real issue in xfwm code as well.

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 1/1] vga_switcheroo: Constify vga_switcheroo_handler

2015-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2015 at 01:15:08PM +0200, Christian König wrote:
> On 18.10.2015 13:05, Lukas Wunner wrote:
> >vga_switcheroo_client_ops has always been declared const since its
> >introduction with 26ec685ff9d9 ("vga_switcheroo: Introduce struct
> >vga_switcheroo_client_ops").
> >
> >Do so for vga_switcheroo_handler as well.
> >
> >  drivers/gpu/drm/amd/amdgpu/amdgpu.ko:
> >6 .rodata   9888
> >- 19 .data 1f00
> >+ 19 .data 1ee0
> >  drivers/gpu/drm/nouveau/nouveau.ko:
> >6 .rodata   000460b8
> >   17 .data 00018fe0
> >  drivers/gpu/drm/radeon/radeon.ko:
> >-  7 .rodata   00030944
> >+  7 .rodata   00030964
> >- 21 .data d6a0
> >+ 21 .data d678
> >  drivers/platform/x86/apple-gmux.ko:
> >-  7 .rodata   0140
> >+  7 .rodata   0160
> >- 11 .data 00e0
> >+ 11 .data 00b8
> >
> >Cc: Ben Skeggs 
> >Cc: Darren Hart 
> >Cc: Alex Deucher 
> >Signed-off-by: Lukas Wunner 
> 
> Looks like it makes sense and at least I don't need this split up between
> drivers.
> 
> Patch is Reviewed-by: Christian König .

Applied to drm-misc, thanks.
-Daniel

> 
> Regards,
> Christian.
> 
> >---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +-
> >  drivers/gpu/drm/nouveau/nouveau_acpi.c   | 2 +-
> >  drivers/gpu/drm/radeon/radeon_atpx_handler.c | 2 +-
> >  drivers/gpu/vga/vga_switcheroo.c | 4 ++--
> >  drivers/platform/x86/apple-gmux.c| 2 +-
> >  include/linux/vga_switcheroo.h   | 4 ++--
> >  6 files changed, 8 insertions(+), 8 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c 
> >b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> >index 3f7aaa4..dc565a4 100644
> >--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> >+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
> >@@ -501,7 +501,7 @@ static int amdgpu_atpx_get_client_id(struct pci_dev 
> >*pdev)
> > return VGA_SWITCHEROO_DIS;
> >  }
> >-static struct vga_switcheroo_handler amdgpu_atpx_handler = {
> >+static const struct vga_switcheroo_handler amdgpu_atpx_handler = {
> > .switchto = amdgpu_atpx_switchto,
> > .power_state = amdgpu_atpx_power_state,
> > .init = amdgpu_atpx_init,
> >diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c 
> >b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> >index df2d981..8b8332e 100644
> >--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
> >+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> >@@ -206,7 +206,7 @@ static int nouveau_dsm_get_client_id(struct pci_dev 
> >*pdev)
> > return VGA_SWITCHEROO_DIS;
> >  }
> >-static struct vga_switcheroo_handler nouveau_dsm_handler = {
> >+static const struct vga_switcheroo_handler nouveau_dsm_handler = {
> > .switchto = nouveau_dsm_switchto,
> > .power_state = nouveau_dsm_power_state,
> > .get_client_id = nouveau_dsm_get_client_id,
> >diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c 
> >b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> >index 8bc7d0b..714508a 100644
> >--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> >+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
> >@@ -499,7 +499,7 @@ static int radeon_atpx_get_client_id(struct pci_dev 
> >*pdev)
> > return VGA_SWITCHEROO_DIS;
> >  }
> >-static struct vga_switcheroo_handler radeon_atpx_handler = {
> >+static const struct vga_switcheroo_handler radeon_atpx_handler = {
> > .switchto = radeon_atpx_switchto,
> > .power_state = radeon_atpx_power_state,
> > .init = radeon_atpx_init,
> >diff --git a/drivers/gpu/vga/vga_switcheroo.c 
> >b/drivers/gpu/vga/vga_switcheroo.c
> >index af0d372..56bbbd6 100644
> >--- a/drivers/gpu/vga/vga_switcheroo.c
> >+++ b/drivers/gpu/vga/vga_switcheroo.c
> >@@ -140,7 +140,7 @@ struct vgasr_priv {
> > int registered_clients;
> > struct list_head clients;
> >-struct vga_switcheroo_handler *handler;
> >+const struct vga_switcheroo_handler *handler;
> >  };
> >  #define ID_BIT_AUDIO   0x100
> >@@ -195,7 +195,7 @@ static void vga_switcheroo_enable(void)
> >   *
> >   * Return: 0 on success, -EINVAL if a handler was already registered.
> >   */
> >-int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler)
> >+int vga_switcheroo_register_handler(const struct vga_switcheroo_handler 
> >*handler)
> >  {
> > mutex_lock(_mutex);
> > if (vgasr_priv.handler) {
> >diff --git a/drivers/platform/x86/apple-gmux.c 
> >b/drivers/platform/x86/apple-gmux.c
> >index 0dec3f5..976efeb 100644
> >--- a/drivers/platform/x86/apple-gmux.c
> >+++ b/drivers/platform/x86/apple-gmux.c
> >@@ -346,7 +346,7 @@ gmux_active_client(struct apple_gmux_data *gmux_data)
> > return VGA_SWITCHEROO_DIS;
> >  }
> >-static struct vga_switcheroo_handler gmux_handler = {
> >+static const struct vga_switcheroo_handler 

[Nouveau] [Bug 92504] [NVA5] Corruption in Plasma 5 on resume -- set_domain failures

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92504

Ilia Mirkin  changed:

   What|Removed |Added

Summary|[NVA5] Corruption in Plasma |[NVA5] Corruption in Plasma
   |5 on resume after changing  |5 on resume -- set_domain
   |screen configuration|failures

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91954] "link training failed": nouveau does not recover from monitor suspend

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91954

--- Comment #3 from Fredy Neeser  ---
For a similar issue with a Lenovo W530 and any Fedora kernel above 4.1.3-201,
see

  https://bugzilla.redhat.com/show_bug.cgi?id=1260053
  External monitor remains black with kernel 4.1.6-200.fc22.x86_64 - nouveau
reports "link training failed"

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


[Nouveau] [Bug 92556] System hangs at visiting WebGL site

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92556

--- Comment #1 from uxv  ---
Created attachment 119009
  --> https://bugs.freedesktop.org/attachment.cgi?id=119009=edit
'kmsg' file alone

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 92556] System hangs at visiting WebGL site

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92556

Pierre Moreau  changed:

   What|Removed |Added

 Attachment #119007|0   |1
is obsolete||
 Attachment #119007|text/plain  |application/octet-stream
  mime type||

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 90871] NV30: Xfwm4 use_compositing - garbled display

2015-10-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90871

--- Comment #48 from Ilia Mirkin  ---
(In reply to Olivier Fourdan from comment #47)
> (In reply to Ilia Mirkin from comment #46)
> > Pretty sure it's what I said -- the test program doesn't do a glXMakeCurrent
> > before calling gl functions, which means their output is invalid. Not an
> > epoxy issue. Rearranging the test program's code to fix this is annoying
> > though.
> 
> No it's not, if the test program is invalid, it ought to be fixed.
> 
> > I wonder if this is a real issue in xfwm code as well.
> 
> Yes, most likely. This code is still early beta in xfwm4. I'll try to fix it
> and Poma will be able to test I guess.

The main reason why it's annoying to fix in the test program is that you use
that knowledge for selecting fbconfigs... which you need to do before making a
context current. Now you could either (a) do a 2-step process whereby you first
see if the ext is there, and then go and select another config or (b) make the
assumption that rect support is an all-or-nothing thing -- either no configs
have it or they all do, so no need to check it when evaluating fbconfig
validity.

I'm moderately sure that'd be a valid assumption.

-- 
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
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] nvc0: do upload-time fixups for interpolation parameters

2015-10-20 Thread Ilia Mirkin
WIP: only support SM35, need to add SM20 and SM50 support

Unfortunately flatshading is an all-or-nothing proposition on nvc0,
while GL 3.0 calls for the ability to selectively specify explicit
interpolation parameters on gl_Color/gl_SecondaryColor which would
override the flatshading setting. This allows us to fix up the
interpolation settings after shader generation based on rasterizer
settings.

While we're at it, we can add support for dynamically forcing all
(non-flat) shader inputs to be interpolated per-sample, which allows
st/mesa to not generate variants for these.

Fixes the remaining failing glsl-1.30/execution/interpolation piglits.

Signed-off-by: Ilia Mirkin 
---

Incomplete as per above. Wanted to get it out there in case there was
any feedback. This will only work on GK110/GK208 as-is.

 .../drivers/nouveau/codegen/nv50_ir_driver.h   |  5 +++
 .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 31 +++--
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  | 14 +---
 .../drivers/nouveau/codegen/nv50_ir_target.cpp | 39 +-
 .../drivers/nouveau/codegen/nv50_ir_target.h   | 21 
 src/gallium/drivers/nouveau/nvc0/nvc0_program.c| 23 -
 src/gallium/drivers/nouveau/nvc0/nvc0_program.h|  6 ++--
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |  2 +-
 .../drivers/nouveau/nvc0/nvc0_shader_state.c   | 16 -
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c  |  3 --
 .../drivers/nouveau/nvc0/nvc0_state_validate.c |  2 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_stateobj.h   |  2 +-
 12 files changed, 147 insertions(+), 17 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
index 14acb60..2f5654f 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
@@ -99,6 +99,7 @@ struct nv50_ir_prog_info
   uint8_t sourceRep;  /* NV50_PROGRAM_IR */
   const void *source;
   void *relocData;
+  void *interpData;
   struct nv50_ir_prog_symbol *syms;
   uint16_t numSyms;
} bin;
@@ -198,6 +199,10 @@ extern void nv50_ir_relocate_code(void *relocData, 
uint32_t *code,
   uint32_t libPos,
   uint32_t dataPos);
 
+extern void
+nv50_ir_change_interp(void *interpData, uint32_t *code,
+  bool force_per_sample, bool flatshade);
+
 /* obtain code that will be shared among programs */
 extern void nv50_ir_get_target_library(uint32_t chipset,
const uint32_t **code, uint32_t *size);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
index 8f15429..d712c9c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -1437,6 +1437,30 @@ CodeEmitterGK110::emitInterpMode(const Instruction *i)
code[1] |= (i->ipa & 0xc) << (19 - 2);
 }
 
+static void
+interpApply(const InterpEntry *entry, uint32_t *code,
+  bool force_persample_interp, bool flatshade)
+{
+   int ipa = entry->ipa;
+   int reg = entry->reg;
+   int loc = entry->loc;
+
+   if (flatshade &&
+   (ipa & NV50_IR_INTERP_MODE_MASK) == NV50_IR_INTERP_SC) {
+  ipa = NV50_IR_INTERP_FLAT;
+  reg = 0xff;
+   } else if (force_persample_interp &&
+  (ipa & NV50_IR_INTERP_SAMPLE_MASK) == NV50_IR_INTERP_DEFAULT &&
+  (ipa & NV50_IR_INTERP_MODE_MASK) != NV50_IR_INTERP_FLAT) {
+  ipa |= NV50_IR_INTERP_CENTROID;
+   }
+   code[loc + 1] &= ~(0xf << 19);
+   code[loc + 1] |= (ipa & 0x3) << 21;
+   code[loc + 1] |= (ipa & 0xc) << (19 - 2);
+   code[loc + 0] &= ~(0xff << 23);
+   code[loc + 0] |= reg << 23;
+}
+
 void
 CodeEmitterGK110::emitINTERP(const Instruction *i)
 {
@@ -1448,10 +1472,13 @@ CodeEmitterGK110::emitINTERP(const Instruction *i)
if (i->saturate)
   code[1] |= 1 << 18;
 
-   if (i->op == OP_PINTERP)
+   if (i->op == OP_PINTERP) {
   srcId(i->src(1), 23);
-   else
+  addInterp(i->ipa, SDATA(i->src(1)).id, interpApply);
+   } else {
   code[0] |= 0xff << 23;
+  addInterp(i->ipa, 0xff, interpApply);
+   }
 
srcId(i->src(0).getIndirect(0), 10);
emitInterpMode(i);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 21099d5..0489ef8 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1057,7 +1057,7 @@ bool Source::scanDeclaration(const struct 
tgsi_full_declaration *decl)
default:
   break;
}
-   if (decl->Interp.Location || info->io.sampleInterp)
+   if (decl->Interp.Location)