bugzilla-daemon at freedesktop.org
2014-Jul-01 02:27 UTC
[Nouveau] [Bug 80738] New: Possible wrong variable used in nouveau_allocate_surface
https://bugs.freedesktop.org/show_bug.cgi?id=80738 Priority: medium Bug ID: 80738 Assignee: nouveau at lists.freedesktop.org Summary: Possible wrong variable used in nouveau_allocate_surface QA Contact: xorg-team at lists.x.org Severity: normal Classification: Unclassified OS: All Reporter: pstglia at 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_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 -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140701/3ab5bcc7/attachment.html>
bugzilla-daemon at freedesktop.org
2014-Jul-01 02:58 UTC
[Nouveau] [Bug 80738] Possible wrong variable used in nouveau_allocate_surface
https://bugs.freedesktop.org/show_bug.cgi?id=80738 Ben Skeggs <skeggsb at gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Ben Skeggs <skeggsb at gmail.com> --- It's a typo. Fortunately, it shouldn't cause any issue as the fields should be at the same offsets due to the union. I've pushed a fix for the typo. Thanks for pointing it out! -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140701/8f490b47/attachment.html>
Apparently Analagous Threads
- [PATCH] dri2: fix allocation of Z16 depth attachments
- [PATCH ddx] Add support for VRAM-less devices to the ddx
- [PATCH 1/2] exa: Pre-G80 tiling support.
- [PATCH 1/2] accel_common: do not initialise the flags twice
- [PATCH xf86-video-nouveau] Add Pascal family support, identical to Maxwell