<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Possible wrong variable used in nouveau_allocate_surface"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80738">80738</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>nouveau@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Possible wrong variable used in nouveau_allocate_surface
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>xorg-team@lists.x.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pstglia@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver/nouveau
</td>
</tr>
<tr>
<th>Product</th>
<td>xorg
</td>
</tr></table>
<p>
<div>
<pre>Hi,
I was analyzing xf86 video nouveau code and found a possible bug on
nouveau_allocate_surface (nv_accel_common.c src file)
When setting tile_mode for NV_FERMI/NVC0 or higher families, it uses tile_mode
to calculate height. However, instead of using "cfg.nvc0.tile_mode" it is using
"cfg.nv50.tile_mode". See bellow:
if (pNv->Architecture >= NV_FERMI) {
if (height > 64) cfg.nvc0.tile_mode = 0x040;
else if (height > 32) cfg.nvc0.tile_mode = 0x030;
else if (height > 16) cfg.nvc0.tile_mode = 0x020;
else if (height > 8) cfg.nvc0.tile_mode = 0x010;
else cfg.nvc0.tile_mode = 0x000;
if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA)
cfg.nvc0.memtype = (bpp == 16) ? 0x01 : 0x11;
else
cfg.nvc0.memtype = 0xfe;
height = NOUVEAU_ALIGN(height,
NVC0_TILE_HEIGHT(cfg.nv50.tile_mode));
If this is intentional, please mark this bug as Invalid and sorry for
disturbing.
Regards,
Paulo Sérgio Travaglia</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>