From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 80738] New: Possible wrong variable used in nouveau_allocate_surface Date: Tue, 01 Jul 2014 02:27:04 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1645276858==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1645276858== Content-Type: multipart/alternative; boundary="1404181624.e1bD1.13067"; charset="us-ascii" --1404181624.e1bD1.13067 Date: Tue, 1 Jul 2014 02:27:04 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D80738 Priority: medium Bug ID: 80738 Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Summary: Possible wrong variable used in nouveau_allocate_surface QA Contact: xorg-team-go0+a7rfsptAfugRpC6u6w@public.gmane.org Severity: normal Classification: Unclassified OS: All Reporter: pstglia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Hardware: Other Status: NEW Version: unspecified Component: Driver/nouveau Product: xorg 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_m= ode to calculate height. However, instead of using "cfg.nvc0.tile_mode" it is u= sing "cfg.nv50.tile_mode". See bellow: if (pNv->Architecture >=3D NV_FERMI) { if (height > 64) cfg.nvc0.tile_mode =3D 0x040; else if (height > 32) cfg.nvc0.tile_mode =3D 0x030; else if (height > 16) cfg.nvc0.tile_mode =3D 0x020; else if (height > 8) cfg.nvc0.tile_mode =3D 0x010; else cfg.nvc0.tile_mode =3D 0x000; if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA) cfg.nvc0.memtype =3D (bpp =3D=3D 16) ? 0x01= : 0x11; else cfg.nvc0.memtype =3D 0xfe; height =3D 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=C3=A9rgio Travaglia --=20 You are receiving this mail because: You are the assignee for the bug. --1404181624.e1bD1.13067 Date: Tue, 1 Jul 2014 02:27:04 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Priority medium
Bug ID 80738
Assignee nouveau@lists.freedesktop.org
Summary Possible wrong variable used in nouveau_allocate_surface
QA Contact xorg-team@lists.x.org
Severity normal
Classification Unclassified
OS All
Reporter pstglia@gmail.com
Hardware Other
Status NEW
Version unspecified
Component Driver/nouveau
Product xorg

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_m=
ode
to calculate height. However, instead of using "cfg.nvc0.tile_mode&quo=
t; it is using
"cfg.nv50.tile_mode". See bellow:


                if (pNv->Architecture >=3D NV_FERMI) {
                        if      (height > 64) cfg.nvc0.tile_mode =3D 0x0=
40;
                        else if (height > 32) cfg.nvc0.tile_mode =3D 0x0=
30;
                        else if (height > 16) cfg.nvc0.tile_mode =3D 0x0=
20;
                        else if (height >  8) cfg.nvc0.tile_mode =3D 0x0=
10;
                        else                  cfg.nvc0.tile_mode =3D 0x000;

                        if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA)
                                cfg.nvc0.memtype =3D (bpp =3D=3D 16) ? 0x01=
 : 0x11;
                        else
                                cfg.nvc0.memtype =3D 0xfe;

                        height =3D 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=C3=A9rgio Travaglia


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1404181624.e1bD1.13067-- --===============1645276858== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nouveau mailing list Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org http://lists.freedesktop.org/mailman/listinfo/nouveau --===============1645276858==--