aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-01-13drm/radeon/kms/r6xx+: make irq handler less verboseAlex Deucher
Unhandled vectors can be safely ignored, no need to spam the kernel log by default. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-13drm/radeon/kms: fix up LVDS handling on macs (v2)Alex Deucher
Based on radeonfb code and recent ddx fix. v2: minor formatting fix from Michel Dänzer Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Tested-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11drm/radeon/kms: add additional safe regs for r4xx/rs6xx and r5xxAlex Deucher
- r4xx/rs6xx: add support for extended pixel shader instruction/temp regs - r5xx: add SM3 regs Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: Don't try to enable IRQ if we have no handler installedJerome Glisse
If for any reason we haven't installed handler we shouldn't try to enable IRQ/MSI on the hw so we don't get unhandled IRQ/MSI which makes the kernel sad. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm: Avoid calling vblank function is vblank wasn't initializedJerome Glisse
In some case vblank might not be initialized and we shouldn't try to use associated function. This patch make sure this is the case. It also export drm_vblank_cleanup so driver can cleanup vblank if for any reason IRQ/MSI is not working. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon: mkregtable.c: close a file before exitAlexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: Make sure we release AGP device if we acquired itJerome Glisse
In some case we weren't releasing the AGP device at module unloading. This leaded to unfunctional AGP at next module load. This patch make sure we release the AGP bus if we acquire it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: Schedule host path read cache flush through the ring V2Jerome Glisse
R300 family will hard lockup if host path read cache flush is done through MMIO to HOST_PATH_CNTL. But scheduling same flush through ring seems harmless. This patch remove the hdp_flush callback and add a flush after each fence emission which means a flush after each IB schedule. Thus we should have same behavior without the hard lockup. Tested on R100,R200,R300,R400,R500,R600,R700 family. V2: Adjust fence counts in r600_blit_prepare_copy() Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: Workaround RV410/R420 CP errata (V3)Corbin Simpson
Long story short, this fixes sporadic hardlocks with my rv410 during times of intense 2D acceleration (Flash on Fx3). V2: Fix indentation and move errata_fini to suspend function so we don't leak scratch register over suspend/resume cycle. V3: Move scratch_reg to asic specific structure (aim is to slowly move stuff to asic specific structure and avoid poluting radeon_device struct with asic specific variables) Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: detect sideport memory on IGP chipsAlex Deucher
This detects if the sideport memory is enabled and if it is VRAM is evicted on suspend/resume. This should fix s/r issues on some IGPs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon: fix a couple of array index errorsDarren Jenkins
There are a couple of array overruns, and some associated confusion in the code. This is just a wild guess at what the code should actually look like. Coverity CID: 13305 13306 agd5f: fix up the original intent of the timing code Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: add support for eDP (embedded DisplayPort)Alex Deucher
This is displayport used for internal connections such as laptop panels and systems with integrated monitors. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm: Add eDP connector typeAlex Deucher
Add a new connector type for eDP (embedded displayport) eDP is more or less the same as DP but there are some cases when you might want to handle it separately. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: pull in the latest upstream ObjectID.h changesAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: whitespace changes to ObjectID.hAlex Deucher
Makes it easier to keep in sync with ddx and the upstream AMD versions. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: fix typo in atom connector type handlingAlex Deucher
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>
2010-01-07drm/radeon/kms: rs600: use correct mask for SW interruptLuca Tettamanti
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>
2010-01-07gpu/drm/radeon/radeon_irq.c: move a dereference below a NULL testDarren Jenkins
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>
2010-01-07drm/radeon/radeon_device.c: move a dereference below a NULL testDarren Jenkins
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>
2010-01-07drm/radeon/radeon_fence.c: move a dereference below the NULL testDarren Jenkins
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>
2010-01-07drm/radeon/radeon_connectors.c: add a NULL test before dereferenceDarren Jenkins
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>
2010-01-07drm/radeon/kms: fix memory leakJiri Slaby
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>
2010-01-06drm/radeon/kms: add missing breaks in i2c and ss lookupsAlex Deucher
Should fix fdo bug 25741 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-06drm/radeon/kms: add primary dac adj values tableAlex Deucher
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>
2010-01-06drm/radeon/kms: fallback to default connector tableAlex Deucher
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>
2009-12-23drm/radeon/kms: add definitions for v4 power tablesAlex Deucher
[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>
2009-12-23drm/radeon/kms: never combine LVDS with another encoderAlex Deucher
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>
2009-12-23drm/radeon/kms: Check module arguments to be valid V2Jerome Glisse
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>
2009-12-23drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structureJerome Glisse
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>
2009-12-23drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4)Alex Deucher
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>
2009-12-23drm/radeon/kms: add 3DC compression supportMarek Olšák
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>
2009-12-23drm/radeon/kms: allow rendering while no colorbuffer is set on r300Marek Olšák
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>
2009-12-23drm/radeon/kms: enable memory clock reading on legacy (V2)Rafał Miłecki
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>
2009-12-23drm/radeon/kms: prevent parallel AtomBIOS callsRafał Miłecki
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>
2009-12-23drm/radeon/kms: set proper default tv standardAlex Deucher
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>
2009-12-23drm/radeon/kms: fix legacy rmxAlex Deucher
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>
2009-12-23drm/radeon/kms/atom: fill in proper defines for digital setupAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-23drm/kms: silencing a false positive warning.Marin Mitov
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>
2009-12-23drm/mm: fix logic for selection of best fit blockBob Gleitsmann
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>
2009-12-23drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles.Thomas Hellstrom
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>
2009-12-23drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.Thomas Hellstrom
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>
2009-12-23drm/vmwgfx: Fix unlocked ioctl and add proper access controlThomas Hellstrom
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>
2009-12-23drm/radeon: fix build on 64-bit with some compilers.Dave Airlie
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>
2009-12-23drivers/gpu: Use kzalloc for allocating only one thingJulia Lawall
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>
2009-12-23DRM: Rename clamp variableAndi Kleen
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>
2009-12-18drm: convert drm_ioctl to unlocked_ioctlArnd Bergmann
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>
2009-12-18Merge branch 'drm-linus' into drm-core-nextDave Airlie
2009-12-18Merge remote branch 'korg/drm-vmware-staging' into drm-core-nextDave Airlie
2009-12-16drm/radeon/kms: fix r100->r500 CS checker for compressed textures. (v2)Dave Airlie
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>
2009-12-16drm/radeon/kms: allow for texture tilingMaciej Cencora
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>