summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: fix typo in function header commentDmitrii Cherkasov2012-08-131-1/+1
| | | | | Signed-off-by: Dmitrii Cherkasov <DCherkasov@luxsoft.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: implement timestamp userspace query (v2)Marek Olšák2012-08-139-7/+80
| | | | | | | | | | | | | Returns a snapshot of the GPU clock counter. Needed for certain OpenGL extensions. v2: agd5f - address Jerome's comments - add function documentation Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: add MSAA texture support for r600-evergreenMarek Olšák2012-08-133-2/+15
| | | | | | | | | | | | Most of the checking seems to be in place already. As you can see, log2(number of samples) resides in LAST_LEVEL. This is required for MSAA support (namely for depth-stencil resolve and blitting between MSAA resources). Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: reorder code in r600_check_texture_resourceMarek Olšák2012-08-131-26/+26
| | | | | | Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fence virtual address and free it once idle v4Jerome Glisse2012-08-135-21/+55
| | | | | | | | | | | | | | | | Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking. v2: For to update pagetable when unbinding bo (don't bailout if bo_va->valid is true). v3: Add kernel 3.5/3.4 comment. v4: Fix compilation warnings. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix some missing parens in asic macrosAlex Deucher2012-08-131-5/+5
| | | | | | | Better safe than sorry. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
* drm/radeon: fix ordering in pll picking on dce4+Alex Deucher2012-08-131-4/+4
| | | | | | | | | No functional change, but re-order the cases so they evaluate properly due to the way the DCE macros work. Noticed by kallisti5 on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: do not reenable crtc after moving vram start addressJerome Glisse2012-08-133-76/+2
| | | | | | | | | | | | | | | | | | | | | | It seems we can not update the crtc scanout address. After disabling crtc, update to base address do not take effect after crtc being reenable leading to at least frame being scanout from the old crtc base address. Disabling crtc display request lead to same behavior. So after changing the vram address if we don't keep crtc disabled we will have the GPU trying to read some random system memory address with some iommu this will broke the crtc engine and will lead to broken display and iommu error message. So to avoid this, disable crtc. For flicker less boot we will need to avoid moving the vram start address. This patch should also fix : https://bugs.freedesktop.org/show_bug.cgi?id=42373 Cc: <stable@vger.kernel.org> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
* drm/radeon: fix bank tiling parameters on caymanAlex Deucher2012-08-131-3/+11
| | | | | | | Handle the 16 bank case. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix bank tiling parameters on evergreenAlex Deucher2012-08-131-3/+11
| | | | | | | Handle the 16 bank case. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix bank tiling parameters on SIChristian König2012-08-131-4/+12
| | | | | | | | | The sixteen bank case wasn't handled here, leading to GPU crashes because of userspace miscalculation. Signed-off-by: Christian König <deathsimple@vodafone.de> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: properly handle crtc powergatingAlex Deucher2012-08-133-2/+17
| | | | | | | | | | | | Need to make sure the crtc is gated on before modesetting. Explicitly gate the crtc on in prepare() and set a flag so that the dpms functions don't gate it off during mode set. Noticed by sylware on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: properly handle SS overrides on TN (v2)Alex Deucher2012-08-131-12/+37
| | | | | | | | | The IntegratedSystemInfo table changed versions on TN. Update the SS override lookup to handle it. v2: fix copy-paste typo. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/dce4+: set a more reasonable cursor watermarkAlex Deucher2012-08-131-2/+4
| | | | | | | | Set a more reasonable default cursor watermark. The recommended default value is 4. This should reduce urgency requests to the MC form the display hw. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix handling for ddc type 5 on combiosAlex Deucher2012-08-131-21/+36
| | | | | | | When ddc type is 5, need to look up the i2c channel in the i2c table. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon/kms: allow "invalid" DB formats as a means to disable DBMarek Olšák2012-08-094-5/+12
| | | | | | | Signed-off-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix dpms on/off on trinity/aruba v2Jerome Glisse2012-07-251-2/+10
| | | | | | | | | | | | | The external encoder need to be setup again before enabling the transmiter. This seems to be only needed on some trinity/aruba to fix dpms on. v2: Add comment, only setup again on dce6 ie aruba or newer. Cc: <stable@kernel.org> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: on hotplug force link training to happen (v2)Jerome Glisse2012-07-251-2/+8
| | | | | | | | | | | | | | | | To have DP behave like VGA/DVI we need to retrain the link on hotplug. For this to happen we need to force link training to happen by setting connector dpms to off before asking it turning it on again. v2: agd5f - drop the dp_get_link_status() change in atombios_dp.c for now. We still need the dpms OFF change. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2)Jerome Glisse2012-07-251-8/+21
| | | | | | | | | | | | | | | | | No need to retrain the link for passive adapters. v2: agd5f - no passive DP to VGA adapters, update comments - assign radeon_connector_atom_dig after we are sure we have a digital connector as analog connectors have different private data. - get new sink type before checking for retrain. No need to check if it's no longer a DP connection. Cc: <stable@vger.kernel.org> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix non revealent error messageJerome Glisse2012-07-251-3/+7
| | | | | | | | | | | | | | | We want to print link status query failed only if it's an unexepected fail. If we query to see if we need link training it might be because there is nothing connected and thus link status query have the right to fail in that case. To avoid printing failure when it's expected, move the failure message to proper place. Cc: stable@vger.kernel.org Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: check for allocation failure in radeon_ring_backup()Dan Carpenter2012-07-251-1/+5
| | | | | | | | | Static checkers complain if this we don't check for allocation failure. Also we can use the new kmalloc_array() function here as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix bo creation retry pathJerome Glisse2012-07-251-1/+2
| | | | | | | | | | | Retry label was at wrong place in function leading to memory leak. Cc: <stable@vger.kernel.org> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: track dev_mapping in more robust and flexible wayIlija Hadzic2012-07-252-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting dev_mapping (pointer to the address_space structure used for memory mappings) to the address_space of the first opener's inode and then failing if other openers come in through a different inode has a few restrictions that are eliminated by this patch. If we already have valid dev_mapping and we spot an opener with different i_node, we force its i_mapping pointer to the already established address_space structure (first opener's inode). This will make all mappings from drm device hang off the same address_space object. Some benefits (things that now work and didn't work before) of this patch are: * user space can mknod and use any number of device nodes and they will all work fine as long as the major device number is that of the drm module. * user space can even remove the first opener's device nodes and mknod the new one and the applications and windowing system will still work. * GPU drivers can safely assume that dev->dev_mapping is correct address_space and just blindly copy it into their (private) bdev.dev_mapping For reference, some discussion that lead to this patch can be found here: http://lists.freedesktop.org/archives/dri-devel/2012-April/022283.html Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge tag 'v3.5-rc7' into drm-nextDave Airlie2012-07-203-8/+19
|\ | | | | | | | | | | | | | | | | | | | | | | Merge Linus tree into drm to fixup conflicts in radeon code for further testing before upstream merge. Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/radeon/radeon_gart.c
| * drm/radeon: fix rare segfaultJerome Glisse2012-07-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | In gem idle/busy ioctl the radeon object was derefenced after drm_gem_object_unreference_unlocked which in case the object have been destroyed lead to use of a possibly free pointer with possibly wrong data. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon: fix VM page table setup on SIAlex Deucher2012-06-292-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cayman and trinity allow for variable sized VM page tables, but SI requires that all page tables be the same size. The current code assumes variablely sized VM page tables so SI may end up with part of each page table overlapping with other memory which could end up being interpreted by the VM hw as garbage. Change the code to better accomodate SI. Allocate enough space for at least 2 full page tables and always set last_pfn to max_pfn on SI so each VM is backed by a full page table. This limits us to only 2 VMs active at any given time on SI. This will be rectified and the code can be reunified once we move to two level page tables. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: kill reclaim_buffers callbackDaniel Vetter2012-07-191-2/+0
| | | | | | | | | | | | | | | | | | | | All leftover users either haven't set DRIVER_HAVE_DMA, in which case this will never be called, or use the drm_core implementation. Call that directly in the only callsite. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: auto detect pcie link speed from root portDave Airlie2012-07-194-3/+35
| | | | | | | | | | | | | | | | | | This check the root ports supported link speeds and enables GEN2 mode if the 5.0 GT link speed is available. The first 3.0 cards are SI so they will probably need more investigation. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon: improve GPU lockup debugging info on r6xx/r7xx/r8xx/r9xxJerome Glisse2012-07-196-0/+59
| | | | | | | | | | | | | | | | | | Print various CP register that have valuable informations regarding GPU lockup. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.Michel Dänzer2012-07-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This could previously fail if either of the enabled displays was using a horizontal resolution that is a multiple of 128, and only the leftmost column of the cursor was (supposed to be) visible at the right edge of that display. The solution is to move the cursor one pixel to the left in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33183 Cc: stable@vger.kernel.org Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart2012-07-197-10/+10
| | | | | | | | | | | | | | | | The passed mode must not be modified by the operation, make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon: fix SS setup for DCPLLAlex Deucher2012-07-181-12/+4
| | | | | | | | | | | | | | Need to actually set the SS parameters rather than just 0. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: fix up pll selection on DCE5/6Alex Deucher2012-07-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | Selecting ATOM_PPLL_INVALID should be equivalent as the DCPLL or PPLL0 are already programmed for the DISPCLK, but the preferred method is to always specify the PLL selected. SetPixelClock will check the parameters and skip the programming if the PLL is already set up. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: start to document evergreen.cAlex Deucher2012-07-181-0/+120
| | | | | | | | | | | | | | Still a lot to do. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: start to document the functions r100.cAlex Deucher2012-07-181-3/+124
| | | | | | | | | | | | | | Still a lot more to do. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document VM functions in radeon_gart.c (v3)Alex Deucher2012-07-181-0/+142
| | | | | | | | | | | | | | | | | | | | Document the VM functions in radeon_gart.c v2: adjust per Christian's suggestions v3: adjust to Christians's latest changes Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document non-VM functions in radeon_gart.c (v2)Alex Deucher2012-07-181-3/+122
| | | | | | | | | | | | | | | | | | Document the non-VM functions in radeon_gart.c v2: adjust per Christian's suggestions Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_ring.c (v4)Alex Deucher2012-07-181-3/+205
| | | | | | | | | | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_ring.c v2: adjust per Christian's suggestions v3: adjust per Christian's latest patches v4: adjust per my latest changes Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_fence.c (v2)Alex Deucher2012-07-181-2/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_fence.c v2: address Christian's comments: - split common concept description into it's own comment - fix description of intr parameter - Improve description of -EDEADLK error Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_asic.cAlex Deucher2012-07-181-0/+46
| | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_asic.c Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_irq_kms.cAlex Deucher2012-07-181-0/+150
| | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_irq_kms.c Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_kms.cAlex Deucher2012-07-181-0/+126
| | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_kms.c Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: document radeon_device.c (v2)Alex Deucher2012-07-181-3/+310
| | | | | | | | | | | | | | | | | | | | | | Adds documentation to most of the functions in radeon_device.c v2: split out general descriptions as per Christian's comments. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: add rptr save support for r1xx-r5xxAlex Deucher2012-07-181-0/+15
| | | | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: update rptr saving logic for memory buffersAlex Deucher2012-07-185-9/+67
| | | | | | | | | | | | | | | | | | Add support for using memory buffers rather than scratch registers. Some rings may not be able to write to scratch registers. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: remove radeon_ring_index()Alex Deucher2012-07-185-45/+27
| | | | | | | | | | | | | | | | Just store the index in the ring structure. Idea taken from one of Jerome's wip rptr patches. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: update ib_execute for SI (v2)Alex Deucher2012-07-182-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When submitting a CONST_IB, emit a SWITCH_BUFFER packet before the CONST_IB. This isn't strictly necessary (the driver will work fine without it), but is good practice and allows for more flexible DE/CE sychronization options in the future. Current userspace drivers do not take advantage of the CE yet. v2: - clean up code flow a bit - no need to flush caches for CONST IB Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: fix const IB handling v2Christian König2012-07-185-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Const IBs are executed on the CE not the CP, so we can't fence them in the normal way. So submit them directly before the IB instead, just as the documentation says. v2: keep the extra documentation Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: let sa manager block for fences to wait for v2Christian König2012-07-182-23/+61
| | | | | | | | | | | | | | | | | | Otherwise we can encounter out of memory situations under extreme load. v2: add documentation for the new function Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: return an error if there is nothing to wait forChristian König2012-07-181-1/+1
| | | | | | | | | | | | | | | | Otherwise the sa managers out of memory handling doesn't work. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud