aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2012-10-03drm/nouveau: move compat ioctl out of nouveau_drv.hBen Skeggs5-5/+9
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/acpi: move definitions out of nouveau_drv.hBen Skeggs7-36/+40
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/mxm: split up into bios code and a subdev moduleBen Skeggs16-755/+952
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: start culling unused codeBen Skeggs8-239/+4
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: port all engines to new engine module formatBen Skeggs146-11099/+14219
This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz <[email protected]> - fix find/replace bug in license header v3: Ben Skeggs <[email protected]> - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz <[email protected]> - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs <[email protected]> - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nvc0-/gr: generate grctx template at init time, not first context ctorBen Skeggs5-604/+460
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nvc0-/gr: share headers between fermi and kepler graphics codeBen Skeggs6-204/+143
v2: Ben Skeggs <[email protected]> - de-inline nv_icmd, triggers some gcc issue causing ctxnv[ce]0.c to take a *very* *very* long time to build on some configs. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/pageflip: kick flip handling out of engsw and into fenceBen Skeggs17-114/+265
This is all very much a policy thing, and hence will not belong in SW after the rework. engsw now only handles receiving the event to say "can flip now" and makes a callback to perform the actual work. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: move some more code around to more appropriate placesBen Skeggs4-342/+336
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nvc0-nve0/graph: rename dev to priv, no code changesBen Skeggs2-5170/+5170
There's a *lot* of code in here, and it's all going to use the PGRAPH priv pointer rather than drm_device after the engine rework. This is handling all the rename-only parts of the change. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/fence: un-port from nouveau_exec_engine interfacesBen Skeggs9-138/+124
Still the same code, but not an "engine" anymore. The fence code is more of a policy decision rather than exposing mechanisms, so it's not appropriate to port it to the new engine subsystem. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: pull nouveau_gem definitions into their own headerBen Skeggs2-33/+44
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: pull nouveau_bo definitions into their own headerBen Skeggs4-90/+97
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv04/disp: kick all private state out to own headerBen Skeggs14-171/+182
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/instmem: completely new implementation, as a subdev moduleBen Skeggs69-2169/+2777
v2 (Ben Skeggs): - some fixes for 64KiB PAGE_SIZE - fix porting issues in (currently unused) nv41/nv44 pciegart code Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: remove last use of nouveau_gpuobj_new_fake()Ben Skeggs2-84/+72
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv50/instmem: remove use of nouveau_gpuobj_new_fake()Ben Skeggs1-17/+2
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/gpuobj: remove flags for vm-mappingsBen Skeggs8-74/+136
Having GPUOBJ and VM intertwined like this makes it *really* hard to continue porting to the new driver architecture, split it out in favour of requiring explit maps be the caller. It's more flexible and obvious this way anyway... Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/gpuobj: create wrapper functions for mapping gpuobj into vm/barBen Skeggs4-10/+44
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nvc0/fifo: handle bar1 control regs much like fifo/nve0Ben Skeggs1-19/+21
The partial mapping thing is stupid and pointless... Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv04-nv40/fifo: remove use of nouveau_gpuobj_new_fake()Ben Skeggs4-73/+50
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv04-nv40/instmem: remove use of nouveau_gpuobj_new_fake()Ben Skeggs7-100/+122
These type of fake objects will not be supported for much longer. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv04-nv40/instmem: duplicate nv04 code as nv40, remove alternate pathsBen Skeggs6-54/+202
A ton of duplication for the moment, will go away when they become subdevs. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/fb: merge fb/vram and port to subdev interfacesBen Skeggs49-1345/+1691
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nv50-/instmem: allocate vram for kernel objects from end of vramBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/core: add support for reverse mm allocationsBen Skeggs5-93/+154
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/timer: port to subdev interfacesBen Skeggs22-162/+464
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/mc: port to subdev interfacesBen Skeggs23-118/+543
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs54-3914/+3796
v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/clock: pull in the implementation from all over the placeBen Skeggs28-1213/+1328
Still missing the main bits we use to change performance levels, I'll get to it after all the hard yakka has been finished. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/clk: implement stub clock subdevBen Skeggs15-0/+437
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/i2c: port to subdev interfacesBen Skeggs29-555/+1347
v2/v3: Ben Skeggs <[email protected]> - fix typo in default bus selection - fix accidental loss of destructor v4: Dmitry Eremin-Solenikov <[email protected]> - fix typo causing incorrect default i2c port settings when no BMP data Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/gpio: port gpio to subdev interfacesBen Skeggs33-503/+933
v2: Ben Skeggs <[email protected]> - rebase on top of v3.6-rc6 with gpio reset patch integrated already Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/oldbios: remove shadowing support, use bios subdev's imageBen Skeggs5-249/+15
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/bios: pull in basic vbios subdev, more to come laterBen Skeggs15-0/+660
v2: Ben Skeggs <[email protected]> - use unaligned macros to access vbios image - endianness fixes Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: have non-core mmio accesses go through device objectBen Skeggs5-109/+99
Adds an extra layer of indirection to each register access, but it's not too bad, and will also go away as pieces are ported. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: implement module init functions in nouveau_drm.cBen Skeggs28-91/+381
These currently just call the existing ones in nouveau_drv.c, but will be extended in upcoming commits. This needed to be separated from the current code as there will be some header clashes until things are ported. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/core: pull in most of the new core infrastructureBen Skeggs42-6/+4052
This commit provides most of the infrastructure to support a major overhaul of Nouveau's internals coming in the following commits. This work aims to take all the things we've learned over the last several years, and turn that into a cleaner architecture that's more maintainable going forward. RAMHT and MM bits of the new core have been left out for the moment, and will be pulled in as I go through the process of porting the code to become either subdev or engine modules. There are several main goals I wanted to achieve through this work: -- Reduce complexity The goal here was to make each component of the driver as independent as possible, which will ease maintainability and readability, and provide a good base for resetting locked up GPU units in the future. -- Better tracking of GPU units that are required at any given time This is for future PM work, we'll be able to tell exactly what parts of the GPU we need powered at any given point (etc). -- Expose all available NVIDIA GPUs to the client In order to support things such as multi-GPU channels, we want to be able to expose all the NVIDIA GPUs to the client over a single file descriptor so it can send a single push buffer to multiple GPUs. -- Untangle the core hardware support code from the DRM implementation This happened initially as an unexpected side-effect of developing the initial core infrastructure in userspace, but it turned into a goal of the whole project. Initial benefits will be the availablility of a number of userspace tools and tests using the same code as the driver itself, but will also be important as I look into some virtualisation ideas. v2: Ben Skeggs <[email protected]> - fix duplicate assignments noticed by clang - implement some forgotten yelling in error path - ensure 64-bit engine mask is used everywhere v3: Marcin Slusarz <[email protected]> - sparse fixes - inline nv_printk into nv_assert to prevent recursive inlining issues v4: Ben Skeggs <[email protected]> - fixed minor memory leak on gpuobj destruction Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/agp: move all agp stuff into its own source fileBen Skeggs7-161/+173
Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs111-168/+208
Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nouveau/gem: use bo.offset rather than mm_node.startBen Skeggs1-6/+3
Won't necessarily be a drm_mm_node in the future, and I can't think of any good reason to not use the offset from the bo struct. There may have been some reason once apon a time, but, separate commit just in case. Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/nvc0/fence: restore pre-suspend fence buffer context on resumeBen Skeggs1-0/+25
Fixes some unfortunate races on resume. The G84 version of the code doesn't need this as "gpuobj"s are automagically suspended/resumed by the core code whereas pinned buffer objects are not. Cc: [email protected] Signed-off-by: Ben Skeggs <[email protected]>
2012-10-03drm/savage: re-add busmaster enable, regression fixFlorian Zumbiehl1-0/+2
466e69b8b03b8c1987367912782bc12988ad8794 dropped busmaster enable from the global drm code and moved it to the individual drivers, but missed the savage driver. So, this re-adds busmaster enable to the savage driver, fixing the regression. Signed-off-by: Florian Zumbiehl <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2012-10-03drm/ast: drop duplicate initializationDan Carpenter1-1/+0
We set ".disable" to "ast_crtc_disable" twice. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-10-03Merge branch 'drm-next-3.7' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie54-1506/+3545
into drm-next Alex writes: "The big changes for 3.7 include: - Asynchronous VM page table updates for Cayman/SI - 2 level VM page table support. Saves memory compared to 1 level page tables. - Reworked PLL handing in the display code allows lots more combinations of monitors to work, including more than two DP displays assuming compatible clocks across shared PLLs. This also allows us to power down extra PLLs when we can share a single one across multiple displays which saves power. - Native backlight control on ATOMBIOS systems. - Improved ACPI support for interacting with the GPU. Fixes backlight control on some laptops. - Document AMD ACPI interfaces - Lots of code cleanup - Bug fixes" * 'drm-next-3.7' of git://people.freedesktop.org/~agd5f/linux: (79 commits) drm/radeon: add vm set_page() callback for SI drm/radeon: rework the vm_flush interface drm/radeon: use WRITE_DATA packets for vm flush on SI drm/radeon/pm: fix multi-head profile handling on BTC+ (v2) drm/radeon: fix radeon power state debug output drm/radeon: force MSIs on RS690 asics drm/radeon: Add MSI quirk for gateway RS690 drm/radeon: allow MIP_ADDRESS=0 for MSAA textures on Evergreen drm/radeon/kms: allow STRMOUT_BASE_UPDATE on RS780 and RS880 drm/radeon: add 2-level VM pagetables support v9 drm/radeon: refactor set_page chipset interface v5 drm/radeon: Fix scratch register leak in IB test. drm/radeon: restore backlight level on resume drm/radeon: add get_backlight_level callback drm/radeon: only adjust default clocks on NI GPUs drm/radeon: validate PPLL in crtc fixup drm/radeon: work around KMS modeset limitations in PLL allocation (v2) drm/radeon: make non-DP PPLL sharing more robust drm/radeon: store the encoder in the radeon_crtc drm/radeon: rework crtc pll setup to better support PPLL sharing ...
2012-10-02drm/radeon: add vm set_page() callback for SIAlex Deucher3-1/+45
Use the new WRITE_DATA packet rather than the legacy ME_WRITE packet. Signed-off-by: Alex Deucher <[email protected]>
2012-10-02drm/radeon: rework the vm_flush interfaceAlex Deucher5-13/+11
Pass the vm and ring index rather than an IB. This allows us to use the vm_flush interface for non-IB cases in the future. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2012-10-02drm/radeon: use WRITE_DATA packets for vm flush on SIAlex Deucher2-7/+36
This is the preferred packet for writing data to memory or registers on SI. Signed-off-by: Alex Deucher <[email protected]>
2012-10-02Merge branch 'for-linus' of ↵Linus Torvalds3-5/+7
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull user namespace changes from Eric Biederman: "This is a mostly modest set of changes to enable basic user namespace support. This allows the code to code to compile with user namespaces enabled and removes the assumption there is only the initial user namespace. Everything is converted except for the most complex of the filesystems: autofs4, 9p, afs, ceph, cifs, coda, fuse, gfs2, ncpfs, nfs, ocfs2 and xfs as those patches need a bit more review. The strategy is to push kuid_t and kgid_t values are far down into subsystems and filesystems as reasonable. Leaving the make_kuid and from_kuid operations to happen at the edge of userspace, as the values come off the disk, and as the values come in from the network. Letting compile type incompatible compile errors (present when user namespaces are enabled) guide me to find the issues. The most tricky areas have been the places where we had an implicit union of uid and gid values and were storing them in an unsigned int. Those places were converted into explicit unions. I made certain to handle those places with simple trivial patches. Out of that work I discovered we have generic interfaces for storing quota by projid. I had never heard of the project identifiers before. Adding full user namespace support for project identifiers accounts for most of the code size growth in my git tree. Ultimately there will be work to relax privlige checks from "capable(FOO)" to "ns_capable(user_ns, FOO)" where it is safe allowing root in a user names to do those things that today we only forbid to non-root users because it will confuse suid root applications. While I was pushing kuid_t and kgid_t changes deep into the audit code I made a few other cleanups. I capitalized on the fact we process netlink messages in the context of the message sender. I removed usage of NETLINK_CRED, and started directly using current->tty. Some of these patches have also made it into maintainer trees, with no problems from identical code from different trees showing up in linux-next. After reading through all of this code I feel like I might be able to win a game of kernel trivial pursuit." Fix up some fairly trivial conflicts in netfilter uid/git logging code. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (107 commits) userns: Convert the ufs filesystem to use kuid/kgid where appropriate userns: Convert the udf filesystem to use kuid/kgid where appropriate userns: Convert ubifs to use kuid/kgid userns: Convert squashfs to use kuid/kgid where appropriate userns: Convert reiserfs to use kuid and kgid where appropriate userns: Convert jfs to use kuid/kgid where appropriate userns: Convert jffs2 to use kuid and kgid where appropriate userns: Convert hpfs to use kuid and kgid where appropriate userns: Convert btrfs to use kuid/kgid where appropriate userns: Convert bfs to use kuid/kgid where appropriate userns: Convert affs to use kuid/kgid wherwe appropriate userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids userns: On ia64 deal with current_uid and current_gid being kuid and kgid userns: On ppc convert current_uid from a kuid before printing. userns: Convert s390 getting uid and gid system calls to use kuid and kgid userns: Convert s390 hypfs to use kuid and kgid where appropriate userns: Convert binder ipc to use kuids userns: Teach security_path_chown to take kuids and kgids userns: Add user namespace support to IMA userns: Convert EVM to deal with kuids and kgids in it's hmac computation ...
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells376-731/+731
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>