summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/radeon/kms: r420 idle after programming GA_ENHANCEDave Airlie2009-09-211-0/+5
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=24041 The idle allows rs690 to startup properly. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: more fixes to rv770 suspend/resume path.Dave Airlie2009-09-212-10/+12
| | | | | | | | | | | This resumes my RV730PRO (4650) RV770 (4850) fine. Still researching the RV4550 (RV710), resumes without X fine. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: more alignment for rv770.c with r600.cDave Airlie2009-09-181-0/+5
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rv770 blit init called too late.Dave Airlie2009-09-181-5/+14
| | | | | | re-align with r600 code, to init blit earlier. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: move around new init path code to avoid posting at initDave Airlie2009-09-183-27/+101
| | | | | | | | | We really don't want to post the card at init, it takes a relatively long time and isn't required, so split the resume path into a startup path called by both init/resume and separate resume entry point to do posting. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/r600: fix some issues with suspend/resume.Dave Airlie2009-09-182-16/+21
| | | | | | | | | a) don't zero gart table on gart enable b) move pinning shader object into resume path c) unpin shader object on suspend d) set cp ready to false after cp shutdown on suspend. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: disable VGA rendering engine before taking over VRAMDave Airlie2009-09-184-0/+20
| | | | | | | | | Before we use any of VRAM, we need to disable the VGA rendering engine, this render text mode into a graphical framebuffer for scanout, however it does this on vblank, and can end up overwriting the GART table and r600 shader objects. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init().Michel Dänzer2009-09-183-2/+4
| | | | | | | | | | | | | | | | | | | | Someone on IRC reported problems after commit 95a8f1bf4f48b434c9f839ab5a0773f66b39d7c6 ('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>
* drm/radeon/kms: add initial connector propertiesDave Airlie2009-09-187-62/+376
| | | | | | | | | | | | | | | | This adds: coherent mode: TMDS coherent mode for atom cards. scaling mode: LVDS scaler mode load detect: DAC load detection, DVI-I, VGA, TV tmds pll: legacy TMDS pll selection tv standard: TV standard selection. for later: other TV ones? dvi subconnector selection using std prop [contains fixes pointed out on dri-devel for atom bios mixups by Michel] Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Use surfaces for scanout / cursor byte swapping on big endian.Michel Dänzer2009-09-183-103/+25Star
| | | | | Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: don't fail if we fail to init GPU accelerationJerome Glisse2009-09-186-56/+60
| | | | | | | | | | 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>
* drm/r600/kms: fixup number of loops per blit calculation.Dave Airlie2009-09-181-7/+14
| | | | | | | | | | | Some people were seeing *ERROR* radeon: writting more dword to ring than expected after certain blits, the loops calculation didn't take into account that we do a separate blit for the remainder after doing the aligned blits. Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: reprogram format in set base.Dave Airlie2009-09-182-0/+46
| | | | | | | | | | This should in theory fix the problem with a mode set being required for adjusting the color depth. This also adds in the necessary bits to the format tables for 8-bit, though it doesn't work yet. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: avivo chips have no separate int bit for displayDave Airlie2009-09-181-2/+0Star
| | | | | | | | | | display interrupts are not enabled via this register, the DISPLAY_INT bit is a status only to show that other regs need to be read. Noticed by Alex Deucher Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/r600: don't do interruptsAlex Deucher2009-09-182-1/+22
| | | | | | | | Interrupts are not supported yet. This prevents things like mesa from trying to use them. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Get LVDS native mode details from EDID if necessary.Michel Dänzer2009-09-162-5/+41
| | | | | | | Fixes RMX problems on older Apple laptops which don't have an x86 BIOS ROM. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon: Save and restore bios scratch regs during S/RYang Zhao2009-09-164-0/+35
| | | | | | | [airlied:- adapted slightly in naming] Signed-off-by: Yang Zhao <yang@yangman.ca> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: IB locking dumps out a lockdep ordering issueDave Airlie2009-09-163-8/+22
| | | | | | | | | | We sometimes lock IB then the ring and sometimes the ring then the IB. This is mostly due to the IB locking not being well defined about what data in the structs it actually locks. Define what I believe is the correct behaviour and gets rid of the lock dep ordering warning. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: we should return 0 when we have no modes not -1.Dave Airlie2009-09-161-1/+1
| | | | | | This fixes my monitor with broken EDID so it at least get 800x600. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Free CS parser state tracking memory.Michel Dänzer2009-09-161-0/+1
| | | | | | | | Fixes leak hidden in commit 9f022ddfb23793b475ff7e57ac08a766dd5d31bd ('drm/radeon/kms: convert r4xx to new init path'). Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: Don't kzalloc memory which is immediately overwritten.Michel Dänzer2009-09-161-1/+1
| | | | | Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: Move radeon_clocks_init() call back after getting VRAM info.Michel Dänzer2009-09-161-2/+2
| | | | | | | 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>
* drm/radeon/kms: Only add common modes which fit in both panel dimensions.Michel Dänzer2009-09-161-2/+4
| | | | | Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: add 32/64 ioctl support.Dave Airlie2009-09-153-1/+18
| | | | | | | | Although the new radeon driver ioctls don't need this, some of the drm initialisation ioctls require it, so add this to make them work. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: clear confusion in GART init/deinit pathJerome Glisse2009-09-1514-190/+306
| | | | | | | | | | | | | | | | 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>
* drm/radeon/kms: cleanup - remove radeon_share.hJerome Glisse2009-09-149-132/+84Star
| | | | | | | | | | radeon_share.h was begining to give problem with include order in respect of radeon.h. It's easier and also i think cleaner to move what was in radeon_share.h into radeon.h. At the same time use the extern keyword for function shared accross the module. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: move mtrr range add and memory informationJerome Glisse2009-09-142-8/+8
| | | | | | | | | | | | 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>
* drm/radeon/kms: convert r4xx to new init pathJerome Glisse2009-09-1410-124/+1121
| | | | | | | 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>
* drm/radeon/kms: fix typo in quirksAlex Deucher2009-09-121-2/+2
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms/r600: fix blit dword count for non r6xxAlex Deucher2009-09-121-2/+7
| | | | | | | rv6xx emits two extra dwords in the render target setup. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: add common lvds modes in the ddc caseAlex Deucher2009-09-121-3/+6
| | | | | | | previous patch only handled the non-ddc case. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: set fbdev_info for suspend/resumeDave Airlie2009-09-111-0/+1
| | | | | | this hopefully will bring back suspend/resume under kms. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: move modeset init outside of GPU initJerome Glisse2009-09-113-21/+25
| | | | | | | | | | | | 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>
* drm/radeon/kms: add common scaled modes for TV and LVDSAlex Deucher2009-09-111-9/+64
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: pull in latest quirks and fixes from ddxAlex Deucher2009-09-112-16/+33
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/r600: use blit for BO movesAlex Deucher2009-09-111-2/+2
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: R3XX/R4XX AGP asic use PCI GART not PCIE GARTJerome Glisse2009-09-114-3/+18
| | | | | | | | | 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>
* drm/radeon/kms/r600: fix blit supportAlex Deucher2009-09-101-8/+31
| | | | | | | | | | | | | select the correct max number of bytes per blit based on whether the size is multiple of 4 bytes. This determines whether we can use 8 or 32 bit pixels for the blit. airlied: also merged the IB padding patch + correcting the VS offset for context Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Don't try to process irq when we are unloadingJerome Glisse2009-09-101-0/+3
| | | | | | | | | If module is being unloaded we should not try to handle irq especialy we should not call into drm helper or we could hard hang the computer free_irq will call the irq handler to make sure we behave properly. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add R4XX mc register access helper.Jerome Glisse2009-09-104-0/+68
| | | | | | | | | 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>
* drm/radeon/kms: call r100_cp_disable rather than duplicating code.Jerome Glisse2009-09-102-2/+4
| | | | | | | | r100_cp_fini was duplicating code of r100_cp_disable, call r100_cp_disable instead. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: wait for cp idle before stopping it.Jerome Glisse2009-09-102-0/+78
| | | | | | | | | | | If we stop CP and that it's still processing thing GPU hang might happen, this patch wait for CP idle (the wait can timeout) so we can avoid shutting down CP at bad time. This is especialy usefull when reseting the GPU as it seems GPU reset fails to properly reset CP when the CP wasn't stop after being idle. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/r600: fix legacy blit codeAlex Deucher2009-09-091-17/+12Star
| | | | | | | | | ARRAY_SIZE is number of elements not bytes. Fix ring counts accordingly, also make a few functions static. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/r600: use fence->timeout directlyAlex Deucher2009-09-091-10/+1Star
| | | | | | | Fixes fence timeouts on r6xx/r7xx. Noticed by taiu on IRC. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
* drm/radeon/kms: re-apply 2007d633d639c896396e4c4b53b38068f3831307Alex Deucher2009-09-081-2/+8
| | | | | | | Got accidently reverted by c93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/radeon/kms: don't allow ERESTART to hit userspace.Dave Airlie2009-09-081-3/+7
| | | | | | | the pre-r600 fence code returns ebusy if we get hit by a signal so we should continue to do that. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: lower debugging on dpms events.Dave Airlie2009-09-081-7/+6Star
| | | | | | Lower the debugging on encoders when getting DPMS events. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms/radeon: make kms default a runtime optionDave Airlie2009-09-083-16/+10Star
| | | | | | | This makes the kms/enable disable a runtime not a build time option. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: fix kms helper license + KconfigDave Airlie2009-09-081-1/+1
| | | | | | | Allow the KMS module to work properly, and also rename it to KMS_HELPER so its clearer what its for. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add r600 KMS supportJerome Glisse2009-09-0833-606/+8289
| | | | | | | | | | | | | | | | | | | | 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>