- 22 Dec, 2009 3 commits
-
-
Jerome Glisse authored
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>
-
Rafał Miłecki authored
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>
-
Rafał Miłecki authored
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>
-
- 09 Dec, 2009 2 commits
-
-
Dave Airlie authored
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>
-
Jerome Glisse authored
radeon_atombios_fini might be call while there is not valid atombios structure allocated, thus test for a not null ptr before trying to access this structure. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@linux.ie>
-
- 07 Dec, 2009 2 commits
-
-
Alex Deucher authored
This enabled interrupt driven hpd support for all radeon chips. Assuming the hpd pin is wired up correctly, the driver will generate uevents on digital monitor connect and disconnect and retrain DP monitors automatically. Signed-off-by:
Alex Deucher <alexdeucher@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
FB read/write really doesn't need to access the actual VRAM, we can just use a scratch area. This is required for using atom displayport calls later. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 01 Dec, 2009 4 commits
-
-
Jerome Glisse authored
The locking & protection of radeon object was somewhat messy. This patch completely rework it to now use ttm reserve as a protection for the radeon object structure member. It also shrink down the various radeon object structure by removing field which were redondant with the ttm information. Last it converts few simple functions to inline which should with performances. airlied: rebase on top of r600 and other changes. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Alex Deucher authored
This enables the use of interrupts on r6xx/r7xx hardware. Interrupts are implemented via a ring buffer. The GPU adds interrupts vectors to the ring and the host reads them off in the interrupt handler. The interrupt controller requires firmware like the CP. This firmware must be installed and accessble to the firmware loader for interrupts to function. MSIs don't seem to work on my RS780. They work fine on all my discrete cards. I'm not sure about other RS780s or RS880s. I've disabled MSIs on RS780 and RS880, but it would probably be worth checking on some other systems. v2 - fix some checkpatch.pl problems; re-read the disp int status reg if we restart the ih; v3 - remove the irq handler if r600_irq_init() fails; remove spinlock in r600_ih_ring_fini(); move ih rb overflow check to r600_get_ih_wptr(); move irq ack to separate function; Signed-off-by:
Alex Deucher <alexdeucher@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
If we find a GPU but we can't find its BIOS and it isn't posted, then ignore it. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
On IGP if you pass option agpmode=-1 you would overwrite the set_page function callback with improper function which endup in non functioning hw. This patch will disable agp when giving agpmode=-1 parameter only if we are dealing with an AGP GPU. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 23 Nov, 2009 1 commit
-
-
Dave Airlie authored
AGP resume was broken since we moved to the new init path, because we never re-enabled AGP on these systems at resume time. This patch just calls the AGP resume call which just does the reinit at resume time like the old path did. Since AGP is pretty much gpu independant I did it outside the gpu specific code. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 27 Oct, 2009 2 commits
-
-
Mathias Fröhlich authored
Make the struct card_info, which is a per struct radeon_device dataset, a struct member of the radeon device instead of a static per kernel module value. This should avoid potential problems with two radeon cards installed in one system. Signed-off-by:
Alex Deucher <alexdeucher@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
Since we register all radeon devices, and the arbiter only cares about VGA class ones, we will fail to startup on display controller class devices. We don't gain anything by using the return value here. this helps kms on sparc64 get started. Reported-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 07 Oct, 2009 2 commits
-
-
Jerome Glisse authored
For AGP to work unmapped access must cover VRAM & AGP as AGP is treated like VRAM by the GPU (ie physical address). This patch properly setup the virtual memory system aperture to cover AGP if AGP is enabled. It seems that there is memory corruption after resume when using AGP (RV770 seems unaffected thought). Version 2 just fix merge issue with updated AGP fallback patch. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
When GPU acceleration is not working with AGP try to fallback to non AGP GART (either PCI or PCIE GART). This should make KMS failure on AGP less painfull. We still need to find out what is wrong when AGP fails but at least user have a lot of more chances to get a working configuration with acceleration. This patch also cleanup R600/RV770 fallback path so they use same code as others asics. Version 2 factorize agp disabling logic to avoid code duplication and bugs. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 01 Oct, 2009 1 commit
-
-
Jerome Glisse authored
This remove old init path and allow code cleanup, now all hw use the new init path, see top of radeon.h for description of this. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 25 Sep, 2009 1 commit
-
-
Alex Deucher authored
All we need to do on r6xx/r7xx is clear the RADEON_IS_AGP flag; the rest is handled in r600.c fixes fdo bug 23990: http://bugs.freedesktop.org/show_bug.cgi?id=23990 Signed-off-by:
Alex Deucher <alexdeucher@gmail.com> Signed-off-by:
Dave Airlie <airlied@linux.ie>
-
- 20 Sep, 2009 1 commit
-
-
Dave Airlie authored
VGA arb requires DRM support for non-kms drivers, to turn on/off irqs when disabling the mem/io regions. VGA arb requires KMS support for GPUs where we can turn off VGA decoding. Currently we know how to do this for intel and radeon kms drivers, which allows them to be removed from the arbiter. This patch comes from Fedora rawhide kernel. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 18 Sep, 2009 2 commits
-
-
Michel Dänzer authored
Someone on IRC reported problems after commit 95a8f1bf ('drm/radeon/kms: Move radeon_clocks_init() call back after getting VRAM info.'). And indeed, at least some ASIC vram_info hooks use the clock info obtained by radeon_get_clock_info(). So, move that call out of radeon_clocks_init(), ahead of the radeon_vram_info() call. [airlied - fixup missing r600/rv770 calls] Signed-off-by:
Michel Dänzer <daenzer@vmware.com> Signed-off-by:
Dave Airlie <airlied@redhat.com> drm/radeon/kms: fix get clock info calls for r600/rv770 init path. These were missed when it got split out. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
Userspace can query if acceleration is working or not true get info ioctl and could fallback to software if for some reason kernel failed to initialize KMS. This should allow to give a working KMS setup in all case (even with non functionning accel). Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 15 Sep, 2009 2 commits
-
-
Yang Zhao authored
[airlied:- adapted slightly in naming] Signed-off-by:
Yang Zhao <yang@yangman.ca> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Michel Dänzer authored
It may indirectly call radeon_set_clock_gating() which relies on the VRAM info. Signed-off-by:
Michel Dänzer <daenzer@vmware.com> Signed-off-by:
Dave Airlie <airlied@linux.ie>
-
- 14 Sep, 2009 3 commits
-
-
Jerome Glisse authored
GART static one time initialization was mixed up with GART enabling/disabling which could happen several time for instance during suspend/resume cycles. This patch splits all GART handling into 4 differents function. gart_init is for one time initialization, gart_deinit is called upon module unload to free resources allocated by gart_init, gart_enable enable the GART and is intented to be call after first initialization and at each resume cycle or reset cycle. Finaly gart_disable stop the GART and is intended to be call at suspend time or when unloading the module. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
Move mtrr range and memory information printing to radeon_object_init, this are memory information and initialization common to all GPU and they better fit in this function. Will also prevent code duplication with upcoming init path changes. airlied: fixed warning introduced Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
This convert r4xx to new init path it also fix few bugs. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 10 Sep, 2009 2 commits
-
-
Jerome Glisse authored
We are splitting GPU & modeset init so that it's easier to abord only remaining GPU init when somethings fails. We want to always provide enough funcionalities to get fbcon and a shadowfb X working. Only acceptable error during initialization are memory allocation failure or io mapping failure. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
R3XX/R4XX AGP asic use the old PCI GART block, not the new PCIE GART. Make sure we pick the right GART when disabling AGP. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Acked-by:
Alex Deucher <alexdeucher@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 09 Sep, 2009 1 commit
-
-
Jerome Glisse authored
Atombios will use the mc register access helper and R4XX hw have a bigger mc range than R3XX so add R4XX specific mc register access helper. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 07 Sep, 2009 1 commit
-
-
Jerome Glisse authored
This adds the r600 KMS + CS support to the Linux kernel. The r600 TTM support is quite basic and still needs more work esp around using interrupts, but the polled fencing should work okay for now. Also currently TTM is using memcpy to do VRAM moves, the code is here to use a 3D blit to do this, but isn't fully debugged yet. Authors: Alex Deucher <alexdeucher@gmail.com> Dave Airlie <airlied@redhat.com> Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 15 Aug, 2009 1 commit
-
-
Dave Airlie authored
We really don't want to be doing all these indirects, updating the GPU gart table is something we do often so the less overhead the better. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 07 Aug, 2009 1 commit
-
-
Dave Airlie authored
we should align the GTT after VRAM no matter what, as we can come back from resume and put in a different place and bad things happen. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 29 Jul, 2009 1 commit
-
-
Michel Dänzer authored
If enabled, during initialization BO GTT->VRAM and VRAM->GTT GPU copies are tested across the whole GTT aperture. This has helped uncover the benchmark copy size bug and verify the maximum aperture size supported by the AGP bridge in my PowerBook. Signed-off-by:
Michel Dänzer <daenzer@vmware.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 28 Jul, 2009 3 commits
-
-
Dave Airlie authored
If an rn50/r100/m6/m7 GPU has < 64MB RAM, i.e. 8/16/32, the aperture used to calculate the MC_FB_LOCATION needs to be worked out from the CONFIG_APER_SIZE register, and not the actual vram size. TTM VRAM size was also being initialised wrong, use actual vram size to initialise it. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jerome Glisse authored
Fix bandwidth computation and crtc priority in memory controller so that crtc memory request are fullfill in time to avoid display artifact. Signed-off-by:
Jerome Glisse <jglisse@redhat.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
This adds new set/get tiling interfaces where the pitch and macro/micro tiling enables can be set. Along with a flag to decide if this object should have a surface when mapped. The only thing we need to allocate with a mapped surface should be the frontbuffer. Note rotate scanout shouldn't require one, and back/depth shouldn't either, though mesa needs some fixes. It fixes the TTM interfaces along Thomas's suggestions, and I've tested the surface stealing code with two X servers and not seen any lockdep issues. I've stopped tiling the fbcon frontbuffer, as I don't see there being any advantage other than testing, I've left the testing commands in there, just flip the fb_tiled to true in radeon_fb.c Open: Can we integrate endian swapping in with this? Future features: texture tiling - need to relocate texture registers TXOFFSET* with tiling info. This also merges Michel's cleanup surfaces regs at init time patch even though it makes sense on its own, this patch really relies on it. Some PowerMac firmwares set up a tiling surface at the beginning of VRAM which messes us up otherwise. that patch is: Signed-off-by:
Michel Dänzer <daenzer@vmware.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 15 Jul, 2009 3 commits
-
-
Dave Airlie authored
Doing this like the DDX seems like the most sure fire way to avoid having to reinvent it slowly and painfully. At the moment we keep getting things wrong with aper vs vram, so we know the DDX does it right. booted on PCI r100, PCIE rv370, IGP rs400. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
This add support for using dma32 memory on gpus that really need it. Currently IGPs are left without DMA32 but we might need to change that unless we can fix rs690. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
Fix this to be correct like the DDX code, looks like a typo on transfer to the kernel. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
- 24 Jun, 2009 1 commit
-
-
Michel Dänzer authored
Some PowerMac firmwares set up a tiling surface at the beginning of VRAM which messes us up otherwise. Signed-off-by:
Michel Dänzer <daenzer@vmware.com> Signed-off-by:
Dave Airlie <airlied@linux.ie>
-