summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/kms: prevent parallel AtomBIOS callsRafał Miłecki2009-12-233-2/+12
| | | | | | | | This just adds a mutex around the atombios table execution so we don't call it from two contexts at once. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: set proper default tv standardAlex Deucher2009-12-235-8/+69
| | | | | | | | | we were just using 1 before. reported on irc by soreau Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix legacy rmxAlex Deucher2009-12-233-3/+6
| | | | | | | | | This makes 640x480 on my R100 work again, both in aspect and centered mode. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/atom: fill in proper defines for digital setupAlex Deucher2009-12-231-8/+8
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: silencing a false positive warning.Marin Mitov2009-12-231-1/+1
| | | | | | | | warning: 'width' may be used uninitialized in this function drivers/gpu/drm/drm_edid.c Signed-off-by: Marin Mitov <mitov@issp.bas.bg> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/mm: fix logic for selection of best fit blockBob Gleitsmann2009-12-231-2/+2
| | | | | | | | | | This is from bug 25728. [airlied: I'm just forwarding the patch for review, Thomas, ickle?] Acked-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles.Thomas Hellstrom2009-12-234-111/+209
| | | | | | | | | | | Improve the command verifier to catch all occurences of surface handles, and translate to SIDs. This way DMA buffers and 3D surfaces share a common handle space, which makes it possible for the kms code to differentiate. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.Thomas Hellstrom2009-12-233-10/+6
| | | | | | | | Fixes for TTM API change. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: Fix unlocked ioctl and add proper access controlThomas Hellstrom2009-12-231-28/+19
| | | | | | | | | This fixes up vmwgfx for the unlocked ioctl code to avoid doing it in the driver. Also adds ioctl flags. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix build on 64-bit with some compilers.Dave Airlie2009-12-231-2/+2
| | | | | | | | drivers/gpu/drm/radeon/radeon_test.c:45: undefined reference to `__udivdi3' Reported-by: Mr. James W. Laferriere <babydr@baby-dragons.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drivers/gpu: Use kzalloc for allocating only one thingJulia Lawall2009-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | Use kzalloc rather than kcalloc(1,...) The use of the allocated memory that looks like an array is &p->relocs[0], but this should be the same as p->relocs. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ - kcalloc(1, + kzalloc( ...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* DRM: Rename clamp variableAndi Kleen2009-12-231-3/+3
| | | | | | | | | | linux/kernel.h has a "clamp" macro, but r300_cmdbuf also uses a variable with the same name. Right now it doesn't seem to include the header, but sooner or later someone will. So better rename the variable now. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: convert drm_ioctl to unlocked_ioctlArnd Bergmann2009-12-1821-140/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_ioctl is called with the Big Kernel Lock held, which shows up very high in statistics on vfs_ioctl. Moving the lock into the drm_ioctl function itself makes sure we blame the right subsystem and it gets us one step closer to eliminating the locked version of fops->ioctl. Since drm_ioctl does not require the lock itself, we only need to hold it while calling the specific handler. The 32 bit conversion handlers do not interact with any other code, so they don't need the BKL here either and can just call drm_ioctl. As a bonus, this cleans up all the other users of drm_ioctl which now no longer have to find the inode or call lock_kernel. [airlied: squashed the non-driver bits of the second patch in here, this provides the flag for drivers to use to select unlocked ioctls - but doesn't modify any drivers]. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.sourceforge.net Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-linus' into drm-core-nextDave Airlie2009-12-1826-66/+1065
|\
| * drm/radeon/kms: fix r100->r500 CS checker for compressed textures. (v2)Dave Airlie2009-12-164-9/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for compressed textures to the r100->r500 CS checker, it lets me run openarena and the demos in mesa fine. Thanks to Maciej Cencora for initial comments. Changes since v1: fix calculations with Maciej formulas Reviewed-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: allow for texture tilingMaciej Cencora2009-12-161-1/+9
| | | | | | | | | | | | | | This adds the relocations for texture tiling for KMS. Signed-off-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge remote branch 'korg/drm-radeon-next' into drm-linusDave Airlie2009-12-164-2/+11
| |\ | | | | | | | | | | | | * korg/drm-radeon-next: drm/radeon/kms: init pm on all chipsets
| | * drm/radeon/kms: init pm on all chipsetsRafał Miłecki2009-12-164-2/+11
| | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | Merge remote branch 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next into ↵Dave Airlie2009-12-166-18/+22
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | drm-linus * 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next: drm/nouveau: remove use of -ERESTART nouveau: Fix endianness with new context program loader drm/nouveau: fix build with CONFIG_AGP=n drm/nouveau: fix ch7006 build
| | * drm/nouveau: remove use of -ERESTARTBen Skeggs2009-12-152-8/+1
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * nouveau: Fix endianness with new context program loaderBenjamin Herrenschmidt2009-12-151-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | When switching to request_firmware() to load the context programs, some endian fixes need to be applied. This makes it work again on my quad g5 nvidia 6600. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: fix build with CONFIG_AGP=nBen Skeggs2009-12-152-0/+6
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: fix ch7006 buildRandy Dunlap2009-12-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ch7006 driver could be built even when nouveau was not enabled, but the build fails in that case, so make it depend on DRM_NOUVEUA. Also make the I2c encoder/helper chips menu depend on I2C (no build error, just visual inspection). ERROR: "drm_helper_probe_single_connector_modes" [drivers/gpu/drm/i2c/ch7006.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/radeon/kms: HDMI support for R600 KMSChristian Koenig2009-12-169-6/+895
| | | | | | | | | | | | | | | | | | | | | | | | Adding basic HDMI support for R600 KMS, ported from radeonhd ddx. [airlied:- checkpatch cleanups] Signed-off-by: Christian Koenig <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: make sure mc is initialized before mapping blit boAlex Deucher2009-12-162-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | We need to make sure the the MC is intialized before we map the blit shader object on r6xx+. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: Return to userspace on ERESTARTSYSJerome Glisse2009-12-161-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | radeon_object.h wasn't converted to ERESTARTSYS change. No each time we got an ERESTARTSYS we return to userspace (ie we were interrupted by a signal and we let the userspace reschedule the ioctl). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/gem: don't leak a gem object if reserve fails on get tiling (v2)Dave Airlie2009-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Not sure it ever happens in practice, spotted during code review. spare brace snuck in Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: don't report allocate failure on ERESTARTSYSDave Airlie2009-12-161-2/+3
| | | | | | | | | | | | | | | | | | | | | if we fail with ERESTARTSYS during alloc, we'll get a retry from userspace so don't report it in dmesg. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: Check if bo we got from ttm are radeon object or notJerome Glisse2009-12-163-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If they are not radeon object don't do anythings special for them, this avoid rare oops than can happen in a complex use case. [airlied: additional fixups] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon/kms: If no placement is supplied fallback to systemJerome Glisse2009-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do as we did before rework, if no placement is supplied at bo creation time, fallback to allocating bo from system ram. This will fix most of the creation failed issue report we got since the rework get merged. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | Merge remote branch 'korg/drm-vmware-staging' into drm-core-nextDave Airlie2009-12-1828-1/+11394
|\ \ \ | |/ / |/| |
| * | drm/vmwgfx: Add DRM driver for VMware Virtual GPUJakob Bornecrantz2009-12-1522-0/+7915
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the vmwgfx driver for the VWware Virtual GPU aka SVGA. The driver is under staging the same as Nouveau and Radeon KMS. Hopefully the 2D ioctls are bug free and don't need changing, so that part of the API should be stable. But there there is a pretty big chance that the 3D API will change in the future. Signed-off-by: Thomas Hellström <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/vmwgfx: Add svga headers for vmwgfx driverJakob Bornecrantz2009-12-155-0/+3474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These headers are shared between multiple place where different coding standards apply. They will be fixed up at a later time. Signed-off-by: Thomas Hellström <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/ttm: Add more driver type enumsJakob Bornecrantz2009-12-151-1/+5
| | | | | | | | | | | | | | | Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: Fix memory type manager debug information printingJerome Glisse2009-12-161-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | System memory type doesn't have a drm_mm manager associated to it. This patch avoid trying to call drm_mm_debug on unitialized drm_mm when printing debug info on the system memory manager. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: Fix printk format & compute bo->mem.size at bo initializationJerome Glisse2009-12-161-2/+3
| | | | | | | | | | | | | | | Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: Fix potential ttm_mem_evict_first races.Thomas Hellstrom2009-12-161-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) The function was previously called with a potentially empty LRU list which would have lead to an OOPS or servere corruption. 2) In rare cases, after reservation has succeeded, another process may already have evicted it or even pinned it. We must revalidate the buffer status after releasing the lru lock. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: Delayed delete fixes.Thomas Hellstrom2009-12-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Remove from lru before reserving so we avoid competing with evicting processes. 2) Avoid calling kref_put() on bo::list_kref while spinlocked. 3) Additional refcounting bug-checking. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: fix two bugs in new placement routines.Dave Airlie2009-12-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | a) the loops were going to <= not <, leading to illegal memory access b) the busy placement checks were using the placement arrays not the busy placement ones. Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/ttm: fix incorrect logic in ttm_bo_io pathDave Airlie2009-12-161-1/+1
| |/ |/| | | | | | | | | | | | | This path isn't used by radeon yet, but future drivers will want it, so fix it right. Reported-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau: Add DRM driver for NVIDIA GPUsBen Skeggs2009-12-1185-0/+36161
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a drm/kms staging non-API stable driver for GPUs from NVIDIA. This driver is a KMS-based driver and requires a compatible nouveau userspace libdrm and nouveau X.org driver. This driver requires firmware files not available in this kernel tree, interested parties can find them via the nouveau project git archive. This driver is reverse engineered, and is in no way supported by nVidia. Support for nearly the complete range of nvidia hw from nv04->g80 (nv50) is available, and the kms driver should support driving nearly all output types (displayport is under development still) along with supporting suspend/resume. This work is all from the upstream nouveau project found at nouveau.freedesktop.org. The original authors list from nouveau git tree is: Anssi Hannula <anssi.hannula@iki.fi> Ben Skeggs <bskeggs@redhat.com> Francisco Jerez <currojerez@riseup.net> Maarten Maathuis <madman2003@gmail.com> Marcin Kościelnicki <koriakin@0x04.net> Matthew Garrett <mjg@redhat.com> Matt Parnell <mparnell@gmail.com> Patrice Mandin <patmandin@gmail.com> Pekka Paalanen <pq@iki.fi> Xavier Chantry <shiningxc@gmail.com> along with project founder Stephane Marchesin <marchesin@icps.u-strasbg.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ttm: export some functions useful to drivers using ttmBen Skeggs2009-12-111-0/+4
| | | | | | | These are functions required by nouveau which will be merged later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/avivo: fix typo in new_pll module descriptionAlex Deucher2009-12-111-1/+1
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Convert radeon to new ttm_bo_initJerome Glisse2009-12-111-30/+9
| | | | | | | Now bo init use placement structure like bo validation does. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ttm: Convert ttm_buffer_object_init to use ttm_placementJerome Glisse2009-12-112-106/+87
| | | | | | | | | | | | | | Convert ttm_buffer_object_init to use struct ttm_placement and rename to ttm_bo_init for consistency with function naming. This allow to give more complex placement at buffer creation. For instance you ask to allocate bo into vram first but if there is not enough vram you can give system as a second possible placement. It also allow to create buffer in a specific range. Also rename ttm_buffer_object_validate to ttm_bo_validate. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix warning about cur_placement being uninitialised.Dave Airlie2009-12-101-1/+1
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote branch 'korg/drm-radeon-next' of into drm-linusDave Airlie2009-12-1032-512/+849
|\ | | | | | | | | | | | | | | This merges some TTM overhauls to allow us to do better object placement for certain radeon GPUs that need scanout+cursor within range of each other, along with an API change to not return ERESTART to userspace, but to use ERESTARTSYS properly internally and have it convert to EINTR and catch that correctly. Also lots of radeon fixes across the board.
| * drm/ttm: Print debug information on memory manager when eviction failsJerome Glisse2009-12-101-13/+57
| | | | | | | | | | | | | | | | | | This add helper function to print information on eviction placements and memory manager status when eviction fails to allocate memory space. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add memory manager debug functionJerome Glisse2009-12-102-0/+21
| | | | | | | | | | | | | | | | | | drm_mm_debug_table will print the memory manager state in table allowing to give a snapshot of the manager at given point in time. Usefull for debugging. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: restore surface registers on resume.Dave Airlie2009-12-1011-7/+23
| | | | | | | | | | | | | | | | | | | | | | On resume on my rv530 laptop surface cntl was left disabled, so wierd stuff would happen with rendering to a tiled front buffer. This checks if the surface regs are assigned to bos and reprograms the surface registers on resume using the same path that clears them all on init. Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud