aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAge
* drm/radeon/kms: fix typo in atom connector type handlingAlex Deucher2010-01-07
| | | | | | | | Also remove the problematic enums that were unused remnants from the ddx. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rs600: use correct mask for SW interruptLuca Tettamanti2010-01-06
| | | | | | | | The mask happens to be the same, but the IH is reading the status, not the not the control register. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL testDarren Jenkins2010-01-06
| | | | | | | | | | If a NULL value is possible, the dereference should only occur after the NULL test. Coverity CID: 13338 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/radeon_device.c: move a dereference below a NULL testDarren Jenkins2010-01-06
| | | | | | | | | | If a NULL value is possible, the dereference should only occur after the NULL test. Coverity CID: 13335 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/radeon_fence.c: move a dereference below the NULL testDarren Jenkins2010-01-06
| | | | | | | | | | If a NULL value is possible, the dereference should only occur after the NULL test. Coverity CID: 13334 Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/radeon_connectors.c: add a NULL test before dereferenceDarren Jenkins2010-01-06
| | | | | | | | | | | | The encoder variable can be NULL in this function so I believe it should be checked before dereference. Coverity CID: 13253 [airlied: extremely unlikely to happen] Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix memory leakJiri Slaby2010-01-06
| | | | | | | | Stanse found a memory leak in radeon_master_create. master_priv is not freed/assigned on all paths. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add missing breaks in i2c and ss lookupsAlex Deucher2010-01-05
| | | | | | | Should fix fdo bug 25741 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add primary dac adj values tableAlex Deucher2010-01-05
| | | | | | | | | | | | | Look up primary dac adj values from the table if there is no bios or bios dac table to reference. The lookup table may need to be adjusted for certain families. Should fix kernel bug 14945. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fallback to default connector tableAlex Deucher2010-01-05
| | | | | | | | | | | | | if necessary for combios Some early combios radeon cards don't have a connector table or dac table in the bios, if they do not, fallback to the default tables. Should fix kernel bug 14963. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add definitions for v4 power tablesAlex Deucher2009-12-22
| | | | | | | [airlied: just adding this for completeness to avoid drift between public atombios.h files] Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: never combine LVDS with another encoderAlex Deucher2009-12-22
| | | | | | | | | When linking multiple encoders to a connector, make sure to not link LVDS with another connector. Some bioses have the same i2c line for LVDS and VGA. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Check module arguments to be valid V2Jerome Glisse2009-12-22
| | | | | | | | | | | | This patch add a function which check module argument to be valid. On invalid argument it prints a warning and setback the default value. V2: Allow 0 for vram limit & agp mode which are the default value Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structureJerome Glisse2009-12-22
| | | | | | | | | Add boolean to record if some part of the driver are initialized or not this allow to avoid a crash when trying to cleanup uninitialized structure members. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4)Alex Deucher2009-12-22
| | | | | | | | | | | | | | | This fixes LVDS on some mac laptops without a panel edid. v2 - Set proper mode type flags v3 - Note that this is not neceesarily the exact panel mode, but an approximation based on the cvt formula. For these systems we should ideally read the mode info out of the registers or add a mode table, but this works and is much simpler. v4 - Update comments and debug message. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add 3DC compression supportMarek Olšák2009-12-22
| | | | | | | | There are 2 formats: ATI1N: 64 bits per 4x4 block, one-channel format ATI2N: 128 bits per 4x4 block, two-channel format Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: allow rendering while no colorbuffer is set on r300Marek Olšák2009-12-22
| | | | | | | | | | Because hardware cannot disable all colorbuffers directly to do depth-only rendering, a user should: - disable reading from a colorbuffer in blending - disable fastfill - set the color channel mask to 0 to prevent writing to a colorbuffer Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: enable memory clock reading on legacy (V2)Rafał Miłecki2009-12-22
| | | | | | | | V2: detect IGP cards (which don't have own memory) Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: prevent parallel AtomBIOS callsRafał Miłecki2009-12-22
| | | | | | | | 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-22
| | | | | | | | | 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-22
| | | | | | | | | 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-22
| | | | | 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-22
| | | | | | | | 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-22
| | | | | | | | | | 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-22
| | | | | | | | | | | 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-22
| | | | | | | | 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-22
| | | | | | | | | 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-22
| | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
|\
| * drm/radeon/kms: fix r100->r500 CS checker for compressed textures. (v2)Dave Airlie2009-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | 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-16
| |\ | | | | | | | | | | | | * korg/drm-radeon-next: drm/radeon/kms: init pm on all chipsets
| | * drm/radeon/kms: init pm on all chipsetsRafał Miłecki2009-12-16
| | | | | | | | | | | | | | | 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-16
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * nouveau: Fix endianness with new context program loaderBenjamin Herrenschmidt2009-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: fix ch7006 buildRandy Dunlap2009-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | 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-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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
|\ \ \ | |/ / |/| |
| * | drm/vmwgfx: Add DRM driver for VMware Virtual GPUJakob Bornecrantz2009-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>