[Nouveau] [Bug 30158] nouveau fails to display on external monitor

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30158

--- Comment #2 from Michael Boehm var...@gmx.de 2010-09-14 23:02:14 PDT ---
Created an attachment (id=38711)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=38711)
log files for X throws error, restarts, then everything ok

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30158] nouveau fails to display on external monitor

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30158

--- Comment #4 from Michael Boehm var...@gmx.de 2010-09-14 23:06:08 PDT ---
(In reply to comment #1)
 Can you provide Xorg and kernel logs from the failure?

I am adding attachments to my bug report. I don't know if this is the correct
way? But I can't find an other way to do it. So please see for attachments to
the original bug report to find the files you requested. BTW I am a almost
complete linux newbie (just learned the basics but 20 years ago) so please bear
with me if acting like a noob.

[ logs-X-starting.tar ] are the Kernel and X log files if X comes up (i.e. X
throws an error and restarts after that everything fine). I have included the
corresponding xorg.conf. Please note that X generates 5 log files for this
case, I have included them all.

[ logs-X-blankscreen.tar ] are the Kernel and X log files if X doesn't come up
and I receive that blank screen with a non-blinking cursor in the upper left. I
can open a console, though, and have access to the log files for this case,
too. X generates only 2 log files in this case. I have included the
corresponding xorg.conf for this case, too. Please note: A non-existing
xorg.conf leads to exactly the same result.

Best regards  thanks for taking care of this issue, Michael

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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] [RFC] Initial power management vbios parsing, voltage clock setting to nouveau.

2010-09-15 Thread Martin Peres

 Hi folks,

I've been messing with PM management for a few days and I've accumulated 
an interesting volume of code.


I am now interested in comments on the overall architecture. For 
example, in this patch, I implement a proposition on how to split 
nouveau_bios.c I would really like you to comment. I have also 
introduced nouveau_pm.[hc] along with vbios/vbios_pm.[ch].


Another thing I would be interested in is the vbios parsing testing.
At the moment, it should work from nv40 to at least nv96 but it has 
really been tested only on an nv86 and an nv96. I'm expecting a lot of 
bug report.


Power mode setting is _not recommended for anything other than dev 
testing_.

There is still work to be done:
- Clock  voltage: It needs testing.
- Memory timings: It is being REed by RSpliet (please help him, he 
should be able to provide directions).

- Fan control: I have no information on this.

Despite these lacks, you should be able to safely try to downclock your 
card though. That's good news for laptop users, isn't it?


Please acknowledge that this work is almost entirely based on others's 
RE work and documentation work. Xexaxo's work has been impressive. 
RSpliet is also to be thanked as he is working on getting memory timing 
support. Darktama has also done some nice RE, we'll see how to merge his 
work. My work here has just been to implement the docs.


On a side note, I would like to say I will be out for 5 days to the XDS 
2010.
So, if you have questions I should discuss with some devs there, feel 
free to ask.


Best regards,

Martin Peres (aka mupuf), an happy new nouveau dev

 How to help for the vbios parsing ?
Thanks for wanting to help :)

First, grab the patch I've joined to this mail. It should cleanly apply 
on nouveau's master branch.

Compile, Install  Reboot.

$ cat /sys/class/drm/card0/device/pm_status
and compare the values to
# nvclock -i

If it differs, please follow the instructions here:
http://nouveau.freedesktop.org/wiki/PowerManagementDumps
If it works, then, you may want to try changing the clocks.

 How to test clock/voltage setting ?
Do not attempt anything if the vbios parsing is wrong, really.
If it did work as intended, you can continue.

** Warning ** Do not try to upclock your card, nothing good will happen.
  While playing with clocks, always check the 
current temperature


First, kill X (for safety reasons).
Then look for the wanted mode by doing:
$ cat /sys/class/drm/card0/device/pm_mode

It should give you a result like:
--- PM Modes ---
 0: core 169 MHz/shader 338 MHz/memory 100 MHz/1150 mV
*1: core 275 MHz/shader 550 MHz/memory 301 MHz/1150 mV
 2: core 400 MHz/shader 800 MHz/memory 600 MHz/1200 mV

The * means it is the currently used mode (it may also not be detected).

In this example, you should only stay between mode 0 and 1.
To set the wanted PM mode, please do so:
# echo 0  /sys/class/drm/card0/device/pm_mode
The command above will change the mode to the first mode.

There is another file for voltage control at 
/sys/class/drm/card0/device/pm_voltage that works the exact same way as 
pm_mode.


The other sysfs entries (temperature related) should be useless to you 
as they are just here for future work).


You're done, have fun.

From 38aba214268ecd0263b2a49af0698d84f6a364e6 Mon Sep 17 00:00:00 2001
From: Martin Peres martin.pe...@ensi-bourges.fr
Date: Wed, 15 Sep 2010 12:59:00 +0200
Subject: [PATCH] Add initial power management vbios parsing, voltage  clock setting to nouveau.
 It is not intented to be used by end-users (if it should be used at all),
 this commit is meant for devs to check the actual work and comment on it.

So, you may wondering what I'm asking you. I simply ask you to check the code
and see if you could improve this design.
Also, you can try:
$ cat /sys/class/drm/card0/device/pm_status
and comparing it to # nvclock -i.
If it doesn't match, please provide us with power management dumps  kernel logs:
http://nouveau.freedesktop.org/wiki/PowerManagementDumps
If it does match, report your success story also :)

Known issues: As no memory timing parsing/get/set is implemented yet (RSPliet
has been working on it but it is not complete yet), your card will likely hang
if you upclock the memory. Lowering the clocks should work fine though:
echo 0  /sys/class/drm/card0/device/pm_mode

WARNING: Use at your own risks. Please stop your machine after having fun with
this and reboot it after a minute in order to flush everything in the card.
Keep in mind how experimental it is ;)

Ack: Most of this work is based on xexaxo's documentation work and useful
advices.
---
 drivers/gpu/drm/nouveau/Makefile |2 +-
 drivers/gpu/drm/nouveau/nouveau_bios.c   |   67 +++-
 drivers/gpu/drm/nouveau/nouveau_bios.h   |   41 ++
 drivers/gpu/drm/nouveau/nouveau_biosP.h  |   44 ++
 drivers/gpu/drm/nouveau/nouveau_drv.h|2 +
 drivers/gpu/drm/nouveau/nouveau_pm.c |  677 ++
 

Re: [Nouveau] [RFC] Initial power management vbios parsing, voltage clock setting to nouveau.

2010-09-15 Thread C. Bergström

Martin Peres wrote:

 Hi folks,

I've been messing with PM management for a few days and I've 
accumulated an interesting volume of code.

If you're an end users also feel free to pull the branch directly..

http://github.com/pathscale/pscnv/tree/pm-wip

We're in #pathscale if you need more help or hit bugs..

thanks

./C

ps (Have a great trip Martin and good luck at the conference!)
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [RFC] Initial power management vbios parsing, voltage clock setting to nouveau.

2010-09-15 Thread Robert Kaiser

Martin Peres schrieb:

I've been messing with PM management for a few days and I've accumulated
an interesting volume of code.


On an only slightly related note, what's the recommended way to read out 
the temperature of the GPU when using nouveau? (I have a NV4B card, but 
I think I read this is mostly the same for all NVidias, right?)


Robert Kaiser

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


[Nouveau] [Bug 30213] New: ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

   Summary: ION2 (NV50) locks up with infinite loop
   Product: xorg
   Version: 7.5
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Driver/nouveau
AssignedTo: nouveau@lists.freedesktop.org
ReportedBy: je...@suse.com
 QAContact: xorg-t...@lists.x.org


Created an attachment (id=38722)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=38722)
Xorg.0.log

Under normal operation, the display locks up. The keyboard becomes
nonresponsive, but the mouse (and cursor movement) still works. The display
stays coherent but is just frozen in time.

Attached are both the kernel log and Xorg.0.log, as well as the hwinfo
(openSUSE tool) that describes the hardware in detail. The kernel log changes
and I've seen this hang appear without any entry in the kernel log.

On my system, this issue is reproduced trivially by playing video with totem.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

--- Comment #1 from Jeff Mahoney je...@suse.com 2010-09-15 07:40:43 PDT ---
Created an attachment (id=38723)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=38723)
dmesg output

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

--- Comment #2 from Jeff Mahoney je...@suse.com 2010-09-15 07:41:17 PDT ---
Created an attachment (id=38724)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=38724)
hwinfo output

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30158] nouveau fails to display on external monitor

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30158

--- Comment #5 from Marcin Slusarz marcin.slus...@gmail.com 2010-09-15 
08:33:42 PDT ---
try to blacklist vga16fb first - see
https://wiki.ubuntu.com/X/Troubleshooting/Nouveau#Disable%20vga16fb

(the log says it is not registering due to another framebuffer present, but
it's not completely true)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

Marcin Slusarz marcin.slus...@gmail.com changed:

   What|Removed |Added

  Attachment #38722|text/x-log  |text/plain
  mime type||

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

Stefan Dirsch sndir...@suse.de changed:

   What|Removed |Added

   See Also||https://bugzilla.novell.com
   ||/show_bug.cgi?id=639548

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

--- Comment #3 from Marcin Slusarz marcin.slus...@gmail.com 2010-09-15 
08:48:10 PDT ---
this is probably a duplicate of bug 26980

(your card is NVA8)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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 30213] ION2 (NV50) locks up with infinite loop

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30213

--- Comment #4 from Robert Kaiser ka...@kairo.at 2010-09-15 09:01:41 PDT ---
In very recent versions of openSUSE Factory, I'm seeing a similar problem with
my NV4B card, and I haven't seen this before. When I activate KDE Compositiong
(which finally works somewhat), it happens very fast, else it happens rarely,
but sometimes. If it happens, logging into the machine remotely, only a kill -9
works to end Xorg, which is busy at 100% CPU, then the screen goes black and
can't be brought back to displaying naything unless with a reboot.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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] Small demagic patch for nv04 plus two tables for discussion

2010-09-15 Thread randrianasulu
Hello all!

Unfortunately, this patch creates too-long lines, but i really prefer symbolic 
names, when they defined everywhere else.

Studying  texture combiners, i  created two tables, they probably has some 
errors, but I want to be pointed at errors before i even start to code, so 
please comment on them:



sources:
[1] http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml
[2] http://www.gamecareerguide.com/features/19981009/multitexturing_01.htm
[3] IRC talk 
[4] 
http://people.freedesktop.org/~idr/2007Q4-VGP351/20071106%20-%20Texture%20mapping,
%20part%203.pdf

From f8726c6e190466d91b588c1ad7409da506663218 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu randrianas...@gmail.com
Date: Wed, 15 Sep 2010 19:40:16 +0400
Subject: [PATCH] nv0x: demagic nv04_state_raster.c and nv04_state_tex.c
 Unfortunately, lines go over 80 char limit

---
 src/mesa/drivers/dri/nouveau/nv04_state_raster.c |   30 +++---
 src/mesa/drivers/dri/nouveau/nv04_state_tex.c|   22 
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index c191571..51aacba 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -176,13 +176,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Depth.Mask)
 			ctrl0 |= NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE;
 
-		ctrl0 |= get_comparison_op(ctx-Depth.Func)  16;
+		ctrl0 |= get_comparison_op(ctx-Depth.Func)  NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT;
 
 		/* Alpha test. */
 		if (ctx-Color.AlphaEnabled)
 			ctrl0 |= NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE;
 
-		ctrl0 |= get_comparison_op(ctx-Color.AlphaFunc)  8 |
+		ctrl0 |= get_comparison_op(ctx-Color.AlphaFunc)  NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT |
 			FLOAT_TO_UBYTE(ctx-Color.AlphaRef);
 
 		/* Stencil test. */
@@ -192,13 +192,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Stencil.Enabled)
 			ctrl1 |= NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE;
 
-		ctrl1 |= get_comparison_op(ctx-Stencil.Function[0])  4 |
-			ctx-Stencil.Ref[0]  8 |
-			ctx-Stencil.ValueMask[0]  16 |
-			ctx-Stencil.WriteMask[0]  24;
+		ctrl1 |= get_comparison_op(ctx-Stencil.Function[0])  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT |
+			ctx-Stencil.Ref[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT |
+			ctx-Stencil.ValueMask[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_SHIFT |
+			ctx-Stencil.WriteMask[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_SHIFT;
 
-		ctrl2 |= get_stencil_op(ctx-Stencil.ZPassFunc[0])  8 |
-			get_stencil_op(ctx-Stencil.ZFailFunc[0])  4 |
+		ctrl2 |= get_stencil_op(ctx-Stencil.ZPassFunc[0])  NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_SHIFT |
+			get_stencil_op(ctx-Stencil.ZFailFunc[0])  NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_SHIFT |
 			get_stencil_op(ctx-Stencil.FailFunc[0]);
 
 		BEGIN_RING(chan, fahrenheit, NV04_MULTITEX_TRIANGLE_CONTROL0, 3);
@@ -209,7 +209,7 @@ nv04_emit_control(GLcontext *ctx, int emit)
 	} else {
 		int cull_mode = ctx-Polygon.CullFaceMode;
 		int front_face = ctx-Polygon.FrontFace;
-		uint32_t ctrl = 1  30 |
+		uint32_t ctrl = 1  30 /* Probably Z buffer format */ |
 			NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN;
 
 		/* Dithering. */
@@ -232,13 +232,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Depth.Mask)
 			ctrl |= NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE;
 
-		ctrl |= get_comparison_op(ctx-Depth.Func)  16;
+		ctrl |= get_comparison_op(ctx-Depth.Func)  NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT;
 
 		/* Alpha test. */
 		if (ctx-Color.AlphaEnabled)
 			ctrl |= NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE;
 
-		ctrl |= get_comparison_op(ctx-Color.AlphaFunc)  8 |
+		ctrl |= get_comparison_op(ctx-Color.AlphaFunc)  NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT |
 			FLOAT_TO_UBYTE(ctx-Color.AlphaRef);
 
 		BEGIN_RING(chan, fahrenheit, NV04_TEXTURED_TRIANGLE_CONTROL, 1);
@@ -263,8 +263,8 @@ nv04_emit_blend(GLcontext *ctx, int emit)
 			NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
 
 		/* Alpha blending. */
-		blend |= get_blend_func(ctx-Color.BlendDstRGB)  28 |
-			get_blend_func(ctx-Color.BlendSrcRGB)  24;
+		blend |= get_blend_func(ctx-Color.BlendDstRGB)  NV04_MULTITEX_TRIANGLE_BLEND_DST_SHIFT |
+			get_blend_func(ctx-Color.BlendSrcRGB)  NV04_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT;
 
 		if (ctx-Color.BlendEnabled)
 			blend |= NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE;
@@ -295,8 +295,8 @@ nv04_emit_blend(GLcontext *ctx, int emit)
 			NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
 
 		/* Alpha blending. */
-		blend |= get_blend_func(ctx-Color.BlendDstRGB)  28 |
-			get_blend_func(ctx-Color.BlendSrcRGB)  24;
+		blend |= get_blend_func(ctx-Color.BlendDstRGB)  NV04_TEXTURED_TRIANGLE_BLEND_DST_SHIFT |
+			get_blend_func(ctx-Color.BlendSrcRGB)  NV04_TEXTURED_TRIANGLE_BLEND_SRC_SHIFT;
 
 		if 

[Nouveau] Fwd: Small demagic patch for nv04 plus two tables for discussion

2010-09-15 Thread randrianasulu
Sorry, demagic patch had typo, and it broke compilation here! Rebased and 
fixed one attached


--  Пересланное сообщение  --

Тема: Small demagic patch for nv04 plus two tables for discussion
Дата: Среда 15 сентября 2010
Отправитель: randrianas...@gmail.com
Получатель:  nouveau@lists.freedesktop.org

Hello all!

Unfortunately, this patch creates too-long lines, but i really prefer symbolic 
names, when they defined everywhere else.

Studying  texture combiners, i  created two tables, they probably has some 
errors, but I want to be pointed at errors before i even start to code, so 
please comment on them:



sources:
[1] http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml
[2] http://www.gamecareerguide.com/features/19981009/multitexturing_01.htm
[3] IRC talk 
[4] 
http://people.freedesktop.org/~idr/2007Q4-VGP351/20071106%20-%20Texture%20mapping,
%20part%203.pdf


---
From d253d21ac4097ddf9787ad7b4e099c1f40968758 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu randrianas...@gmail.com
Date: Wed, 15 Sep 2010 19:40:16 +0400
Subject: [PATCH] nv0x: demagic nv04_state_raster.c and nv04_state_tex.c
 Unfortunately, lines go over 80 char limit

---
 src/mesa/drivers/dri/nouveau/nv04_state_raster.c |   30 +++---
 src/mesa/drivers/dri/nouveau/nv04_state_tex.c|   22 
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index c191571..d478ace 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -176,13 +176,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Depth.Mask)
 			ctrl0 |= NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE;
 
-		ctrl0 |= get_comparison_op(ctx-Depth.Func)  16;
+		ctrl0 |= get_comparison_op(ctx-Depth.Func)  NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT;
 
 		/* Alpha test. */
 		if (ctx-Color.AlphaEnabled)
 			ctrl0 |= NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE;
 
-		ctrl0 |= get_comparison_op(ctx-Color.AlphaFunc)  8 |
+		ctrl0 |= get_comparison_op(ctx-Color.AlphaFunc)  NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT |
 			FLOAT_TO_UBYTE(ctx-Color.AlphaRef);
 
 		/* Stencil test. */
@@ -192,13 +192,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Stencil.Enabled)
 			ctrl1 |= NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE;
 
-		ctrl1 |= get_comparison_op(ctx-Stencil.Function[0])  4 |
-			ctx-Stencil.Ref[0]  8 |
-			ctx-Stencil.ValueMask[0]  16 |
-			ctx-Stencil.WriteMask[0]  24;
+		ctrl1 |= get_comparison_op(ctx-Stencil.Function[0])  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT |
+			ctx-Stencil.Ref[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT |
+			ctx-Stencil.ValueMask[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_SHIFT |
+			ctx-Stencil.WriteMask[0]  NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_SHIFT;
 
-		ctrl2 |= get_stencil_op(ctx-Stencil.ZPassFunc[0])  8 |
-			get_stencil_op(ctx-Stencil.ZFailFunc[0])  4 |
+		ctrl2 |= get_stencil_op(ctx-Stencil.ZPassFunc[0])  NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_SHIFT |
+			get_stencil_op(ctx-Stencil.ZFailFunc[0])  NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_SHIFT |
 			get_stencil_op(ctx-Stencil.FailFunc[0]);
 
 		BEGIN_RING(chan, fahrenheit, NV04_MULTITEX_TRIANGLE_CONTROL0, 3);
@@ -209,7 +209,7 @@ nv04_emit_control(GLcontext *ctx, int emit)
 	} else {
 		int cull_mode = ctx-Polygon.CullFaceMode;
 		int front_face = ctx-Polygon.FrontFace;
-		uint32_t ctrl = 1  30 |
+		uint32_t ctrl = 1  30 /* Probably Z buffer format */ |
 			NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN;
 
 		/* Dithering. */
@@ -232,13 +232,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
 		if (ctx-Depth.Mask)
 			ctrl |= NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE;
 
-		ctrl |= get_comparison_op(ctx-Depth.Func)  16;
+		ctrl |= get_comparison_op(ctx-Depth.Func)  NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT;
 
 		/* Alpha test. */
 		if (ctx-Color.AlphaEnabled)
 			ctrl |= NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE;
 
-		ctrl |= get_comparison_op(ctx-Color.AlphaFunc)  8 |
+		ctrl |= get_comparison_op(ctx-Color.AlphaFunc)  NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT |
 			FLOAT_TO_UBYTE(ctx-Color.AlphaRef);
 
 		BEGIN_RING(chan, fahrenheit, NV04_TEXTURED_TRIANGLE_CONTROL, 1);
@@ -263,8 +263,8 @@ nv04_emit_blend(GLcontext *ctx, int emit)
 			NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
 
 		/* Alpha blending. */
-		blend |= get_blend_func(ctx-Color.BlendDstRGB)  28 |
-			get_blend_func(ctx-Color.BlendSrcRGB)  24;
+		blend |= get_blend_func(ctx-Color.BlendDstRGB)  NV04_MULTITEX_TRIANGLE_BLEND_DST_SHIFT |
+			get_blend_func(ctx-Color.BlendSrcRGB)  NV04_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT;
 
 		if (ctx-Color.BlendEnabled)
 			blend |= NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE;
@@ -295,8 +295,8 @@ nv04_emit_blend(GLcontext *ctx, int emit)
 			

[Nouveau] [Bug 30158] nouveau fails to display on external monitor

2010-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30158

--- Comment #6 from Michael Boehm var...@gmx.de 2010-09-15 16:32:35 PDT ---
(In reply to comment #5)
 try to blacklist vga16fb first - see
 https://wiki.ubuntu.com/X/Troubleshooting/Nouveau#Disable%20vga16fb
 
 (the log says it is not registering due to another framebuffer present, but
 it's not completely true)

I have blacklisted vga16fb via adding [ blacklist vga16fb ] to
/etc/modprobe.d/blacklist-framebuffer.conf and verified with [ lsmod |grep -i
vga16fb ] and [ hwinfo --gfx |grep -i vga16fb ] that it is not present (I hope
that was sufficient?).

Now, if starting with a xorg.conf without error I receive the same result as
before - blank screen with a non blinking cursor in the upper left, but
terminals accessible.

So as far as I can see, blacklisting vga16fb does not make any difference. I
still need an intentional error in xorg.conf to make X working. Do you need new
log files for the case with vga16fb disabled?

Best regards, Michael

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- 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