summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-05-14Don't try to load xaa module if not compiled with XAA supportAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/22>
2024-05-12netbsd: disable not-useful check for an existing kernel drivernia
nv will refuse to work whenever there's a driver other than vga attached to the device we're trying to probe, yet nv works fine on top of gffb or genfb on NetBSD Signed-off-by: Nia Alarie <nia@NetBSD.org> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/20>
2024-05-12netbsd: Try getting the EDID via wscons if the DDC2 method fails.nia
Helps identifying displays on non-x86 hardware. Patch from Michael Lorenz, autotools'ified by me. Signed-off-by: Nia Alarie <nia@NetBSD.org> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/19>
2024-05-11nv: support GT 320M....hopefullyYusuf Khan
This is gt216 which is a close relative of my gt218 but...it should be closer to the rest of the chipsets enough to work hopefully. Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/16>
2024-05-11g80/output: update known PCI rom sigsYusuf Khan
See src/common/nvswitch/kernel/inc/rom_nvswitch.h in open-gpu-kernel-modules Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/16>
2024-05-11g80/disp: preinit all heads we know in displayYusuf Khan
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/16>
2024-05-11g80/display: Annotate functionsYusuf Khan
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/16>
2024-05-08use XNFcallocarray() instead of xnfcalloc macroEnrico Weigelt, metux IT consult
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/18>
2024-05-08use XNFalloc() instead of xnfallocEnrico Weigelt, metux IT consult
xnfalloc is just an alias for XNFalloc() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/18>
2024-05-02nv: support 0xf0 device id rangeYusuf Khan
inspired by a bugzilla patch: "nv-2.1.12 : patch to add the latest and a lot of Nvidia CPUs (56) (until February 2009)" Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/17>
2024-04-19g80: dont set accelmethod to xaa when xaa is disabledYusuf Khan
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/merge_requests/15>
2024-03-17treewide: #if -> #ifdefYusuf Khan
I think the latest version of gcc got stricter in regards to this for some reason. Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
2024-01-26riva_hw.c: Ensure ABS macro expands correctlyAlan Coopersmith
Handles warning from Oracle Parfait static analyser: Error: Misleading macro Misleading macro [misleading-macro]: misleading evaluation of unary '-' operator in expansion of macro ABS due to missing parentheses at line 104 of src/riva_hw.c. binary '+' operator has lower precedence than unary '-' operator inside macro body at line 298 if (ABS(ainfo->vburst_size) + (ABS(ainfo->wcvlwm + 32) & ~0xf) - tmp> VFIFO_SIZE) low precedence binary '+' operator is hidden by expansion of macro argument a at line 104 #define ABS(a) (a>0?a:-a) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Fix warning: no previous prototype for ‘G80ExaInit’ [-Wmissing-prototypes]Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Fix -Wdiscarded-qualifiers warning in G80PreInitAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Fix warning: ‘NVPatternROP’ defined but not used [-Wunused-const-variable=]Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Fix warning: ‘NVDMAKickoffCallback’ defined but not used [-Wunused-function]Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Fix 4 -Wdiscarded-qualifiers warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-08Add X.Org's standard C warning flags to AM_CFLAGSAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-07Don't call xf86DisableRandR in ABI_VIDEODRV_VERSION 24 & laterAlan Coopersmith
The API was removed by Xserver commit dd00e5466a0e4ea313d1860824da4123692827ed in xorg-server-1.20.0 and later. Found by gcc -Werror=implicit: riva_driver.c: In function ‘RivaScreenInit’: riva_driver.c:1213:12: error: implicit declaration of function ‘xf86DisableRandR’; did you mean ‘xf86DisableIO’? [-Werror=implicit-function-declaration] 1213 | xf86DisableRandR(); | ^~~~~~~~~~~~~~~~ | xf86DisableIO nv_driver.c: In function ‘NVScreenInit’: nv_driver.c:2635:16: error: implicit declaration of function ‘xf86DisableRandR’; did you mean ‘xf86DisableIO’? [-Werror=implicit-function-declaration] 2635 | xf86DisableRandR(); | ^~~~~~~~~~~~~~~~ | xf86DisableIO Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-29fix nv on powerpcYusuf Khan
Written by either Julio Merino <julio at meroh.net> or Nathan Whitehorn <nwhitehorn at freebsd.org> (emails obfuscated similar to freebsd convention, authorship is in doubt)
2022-07-25riva_xaa: don't build RivaSetRopPattern when XAA is not supportedAlan Coopersmith
Fixes gcc warnings: riva_xaa.c: In function ‘RivaSetRopPattern’: riva_xaa.c:94:33: warning: implicit declaration of function ‘XAAGetPatternROP’; did you mean ‘RivaSetPattern’? [-Wimplicit-function-declaration] pRiva->riva.Rop->Rop3 = XAAGetPatternROP(rop); ^~~~~~~~~~~~~~~~ RivaSetPattern At top level: riva_xaa.c:89:1: warning: ‘RivaSetRopPattern’ defined but not used [-Wunused-function] RivaSetRopPattern(RivaPtr pRiva, int rop) ^~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-06-24Replace xf86PciInfo.h with our own pci idsYusuf
Signed-off-by: YusufKhan-improves-things's avatarYusuf Khan <yusisamerican@gmail.com> --- v2: Add header to Makefile v3: commit v2
2022-01-22Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2016-07-19Adapt Block/WakeupHandler signature for ABI 23Adam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-12-21Fix shadow framebuffer implementation.Matthieu Herrb
Makes it possible to run the nv driver without XAA on cards where EXA is not supported. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-08-16init: Initialize VGA IOBase before using itEgbert Eich
The NV driver did never set the VGA IOBase for those registers which have different addresses dependent whether the VGA engine is running in mono or color mode. This has not been detected as the VGA mode and font save/restore functions initialize this value themselves. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2013-03-24Include xf86Modes.h to use functions from hw/xfree86/modes/xf86Modes.c.Jeremy White
Signed-off-by: Jeremy White <jwhite@codeweavers.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2012-09-25Remove mibstore.hAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-07-17nv: add missing fbman includes.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-17xf86-video-nv: bump to version 2.1.19Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-16nv: make XAA optional.Dave Airlie
This allows nv to build without XAA. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-07nv: port to new compat API.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-19Fix for new vgahw ABIAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-12-19Make failure to XAA non-fatalAdam Jackson
Fall back to NoAccel on G80 since there's no shadowfb support there, otherwise fall to shadowfb. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-04-25remove duplicated includesNicolas Kaiser
Remove duplicated includes of guarded headers. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2011-03-01Fix compiler warning.Cyril Brulebois
Get rid of this with CFLAGS="-Wall -Werror": | CC g80_display.lo | cc1: warnings being treated as errors | g80_display.c: In function ‘G80CrtcSetPClk’: | g80_display.c:216: error: unused variable ‘i’ Signed-off-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Tested-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-23Remove RANDR_12_INTERFACE checking, always defined.Gaetan Nadon
RANDR_12_INTERFACE is defined in xserver/randr/randstr.h since version 1.2. This driver only configures against xserver 1.3 or higher. Reported-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-19Add a missing " }," pointed out by Johannes Obermayr.Aaron Plattner
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-19Merge branch 'master' of git://soprano/~aaron/xf86-video-nvAaron Plattner
2010-07-19The /compat code is no longer required.Gaetan Nadon
This was used at one point in time to backport the modes code from server 1.3 to server 1.2. When the tarball was created, whatever modes code was on the developer disk was included. The server 1.2 as shipped in the tarball on the web does not contain the modes code. It was added just after and found in git branch server-1.2-branch. The modes code was initially included in version 2.0.95 and still compiles with server 1.2. As of version 2.1.9 it no longer compiles. Subsequent versions are not backward compatible and probably not meant to be. The XRandR wiki points to articles saying that XRandR 1.2 first appeared in server 1.3 and nv 2.0.95. Given that modes code in current server version does not compile with server 1.2, and that the modes code is included in version 1.3 and up, might as well stop including this modes code in the driver. This patch makes the driver requiring server 1.3 or later. This will solve the issue where "make dist" fails "out of the box" and requires manual fix-up on the build machine which is documented in the compat/README file. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-19Add PCI table entries for the GeForce 315Aaron Plattner
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-14Unlike for lspci and the kernel, X bus IDs are decimal instead of hex.Aaron Plattner
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-07-13Bring NVKnownChipsets up to date.Aaron Plattner
Based on a suggestion from Renzo <rfabriek@nerdshack.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-06-15Fix the kernel driver error reporting to be a little more verbose.Aaron Plattner
Commit 3e9f7704122e0685ce83f7d3d3630e8a07293671 added printouts when the driver detects that a kernel module is attached to the given PCI device. However, it uses ErrorF and doesn't print any identifying information about *which* device has the problem or even which driver is complaining. Fix it to use xf86DrvMsg and print the driver name and PCI device and bus IDs. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-06-15Revert "Refuse to bind to a device which has kernel modesetting active."Aaron Plattner
It was superseded by 3e9f7704122e0685ce83f7d3d3630e8a07293671, which depends on libpciaccess and not libdrm. This is better, because the server already depends on the former, while the latter is optional. This reverts commit 17ab5dbea69e690cbf78c25040db518471e0887f. Conflicts: src/nv_driver.c
2010-06-15nv: refuse to load if there's a kernel driver bound to the device alreadyBen Skeggs
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-05-25Don't use libcwrappers for calloc and freeTiago Vignatti
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-16Refuse to bind to a device which has kernel modesetting active.Marcin Slusarz
Touching directly the hardware while kernel modesetting is active breaks console output. Patch almost entrirely based on VESA patch by Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Tested-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-03-10Update MCP6x supported products.Aaron Plattner
Use the official names for 10DE:053B and 10DE:053E. Add some additional product IDs and update the documentation. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>