aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
AgeCommit message (Collapse)Author
2014-07-25drm/radeon: fix cut and paste issue for hawaii.Jerome Glisse
This is a halfway fix for hawaii acceleration. More fixes to come but hopefully isolated to userspace. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-07-23drm/radeon: fix irq ring buffer overflow handlingChristian König
We must mask out the overflow bit as well, otherwise the wptr will never match the rptr again and the interrupt handler will loop forever. Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-07-22drm/radeon: fix error handling in radeon_vm_bo_set_addrChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-21drm/radeon/TN: only enable bapm on MSI systemsAlex Deucher
There still seem to be stability problems with other systems. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72921 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-21drm/radeon: fix VM IB handlingChristian König
Calling radeon_vm_bo_find on the IB BO during CS is illegal and can lead to an crash. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-21drm/radeon: fix handling of radeon_vm_bo_rmv v3Christian König
v3: completely rewritten. We now just remember which areas of the PT to clear and do so on the next command submission. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=79980 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-21drm/radeon: let's use GB for vm_size (v2)Christian König
VM sizes smaller than 1GB doesn't make much sense anyway. v2: fix typo and grammer Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Make classic pageflip completion path less racy.Mario Kleiner
Need to protect mmio flip programming by event lock as well. Need to also first enable pflip irq, then mmio program, otherwise a flip completion may get unnoticed in the vblank of actual completion if the flip is programmed, but radeon_flip_work_func gets preempted immediately after mmio programming and before vblank. In that case the vblank irq handler wouldn't run radeon_crtc_handle_vblank() with the completion check routine, miss the completed flip, and only notice one vblank after actual completion, causing a false/delayed report of flip completion. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Add missing vblank_put in pageflip ioctl error path.Mario Kleiner
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Remove redundant fence unref in pageflip path.Mario Kleiner
Not needed anymore, as it is already unreffed within radeon_flip_work_func() after its only use. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Complete page flip even if waiting on the BO fence failsMichel Dänzer
Otherwise the DRM core and userspace will be confused about which BO the CRTC is scanning out. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Move pinning the BO back to radeon_crtc_page_flip()Michel Dänzer
As well as enabling the vblank interrupt. These shouldn't take any significant amount of time, but at least pinning the BO has actually been seen to fail in practice before, in which case we need to let userspace know about it. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: Prevent too early kms-pageflips triggered by vblank.Mario Kleiner
Since 3.16-rc1 we have this new failure: When the userspace XOrg ddx schedules vblank events to trigger deferred kms-pageflips, e.g., via the OML_sync_control extension call glXSwapBuffersMscOML(), or if a glXSwapBuffers() is called immediately after completion of a previous swapbuffers call, e.g., in a tight rendering loop with minimal rendering, it happens frequently that the pageflip ioctl() is executed within the same vblank in which a previous kms-pageflip completed, or - for deferred swaps - always one vblank earlier than requested by the client app. This causes premature pageflips and detection of failure by the ddx, e.g., XOrg log warnings like... "(WW) RADEON(1): radeon_dri2_flip_event_handler: Pageflip completion event has impossible msc 201025 < target_msc 201026" ... and error/invalid return values of glXWaitForSbcOML() and Intel_swap_events extension. Reason is the new way in which kms-pageflips are programmed since 3.16. This commit changes the time window in which the hw can execute pending programmed pageflips. Before, a pending flip would get executed anywhere within the vblank interval. Now a pending flip only gets executed at the leading edge of vblank (start of front porch), making sure that a invocation of the pageflip ioctl() within a given vblank interval will only lead to pageflip completion in the following vblank. Tested to death on a DCE-4 card. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-17drm/radeon: set default bl level to something reasonableAlex Deucher
If the value in the scratch register is 0, set it to the max level. This fixes an issue where the console fb blanking code calls back into the backlight driver on unblank and then sets the backlight level to 0 after the driver has already set the mode and enabled the backlight. bugs: https://bugs.freedesktop.org/show_bug.cgi?id=81382 https://bugs.freedesktop.org/show_bug.cgi?id=70207 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: David Heidelberger <david.heidelberger@ixit.cz> Cc: stable@vger.kernel.org
2014-07-17drm/radeon: avoid leaking edid dataAlex Deucher
In some cases we fetch the edid in the detect() callback in order to determine what sort of monitor is connected. If that happens, don't fetch the edid again in the get_modes() callback or we will leak the edid. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-10drm/radeon/dpm: Reenabling SS on CaymanAlexandre Demers
It reverts commit c745fe611ca42295c9d91d8e305d27983e9132ef now that Cayman is stable since VDDCI fix. Spread spectrum was not the culprit. This depends on b0880e87c1fd038b84498944f52e52c3e86ebe59 (drm/radeon/dpm: fix vddci setup typo on cayman). Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-10drm/radeon: fix typo in ci_stop_dpm()Alex Deucher
Need to use the RREG32_SMC() accessor since the register is an smc indirect index. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-10drm/radeon: fix typo in golden register setup on evergreenAlex Deucher
Fixes hangs on driver load on some cards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=76998 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-10drm/radeon: only print meaningful VM faultsChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-10drm/radeon/dp: return -EIO for flags not zero caseAlex Deucher
If there are error flags in the aux transaction return -EIO rather than -EBUSY. -EIO restarts the whole transaction while -EBUSY jus retries. Fixes problematic aux transfers. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80684 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-02drm/radeon: page table BOs are kernel allocationsChristian König
Userspace shouldn't be able to access them. Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-02drm/radeon/cik: fix typo in EOP packetAlex Deucher
Volatile bit was in the wrong location. This bit is not used at the moment. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-01drm/radeon: Track the status of a page flip more explicitlyMichel Dänzer
This prevents a panic: radeon_crtc_handle_page_flip() could run before radeon_flip_work_func(), triggering the BUG_ON() in drm_vblank_put(). Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon/dpm: fix vddci setup typo on caymanAlex Deucher
We were using the vddc mask rather than the vddci mask. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=79071 May also fix: https://bugs.freedesktop.org/show_bug.cgi?id=69723 Noticed by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-01drm/radeon/dpm: fix typo in vddci setup for eg/btcAlex Deucher
We were using the vddc mask rather than the vddci mask. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=79071 Possibly also fixes: https://bugzilla.kernel.org/show_bug.cgi?id=68571 Noticed-by: Jonathan Howard <jonathan@unbiased.name> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-07-01drm/radeon: use RADEON_MAX_CRTCS, RADEON_MAX_AFMT_BLOCKS (v2)Stefan Brüns
v2: agd5f: compile fix Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: Use only one line for whole DPCD debug outputStefan Brüns
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: add a module parameter to control deep color supportAlex Deucher
Some monitors seem to have problems with deep color enabled, even though they claim to support it. I'm not sure if the monitor need a quirk or if the driver is doing something the monitor doesn't like. At this point lets just disable deep color by default like we did for hdmi audio and work through the bugs so we can eventually enable it by default. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80531 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: enable bapm by default on desktop TN/RL boardsAlex Deucher
bapm enabled the GPU and CPU to share TDP headroom. It was disabled by default since some laptops hung when it was enabled in conjunction with dpm. It seems to be stable on desktop boards and fixes hangs on boot with dpm enabled on certain boards, so enable it by default on desktop boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=72921 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: enable bapm by default on KV/KBAlex Deucher
bapm allows the GPU and CPU to share TDP. This allows for additional performance out of the GPU and CPU when the headroom is available. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: only apply bapm changes for AC power on ARUBAAlex Deucher
Newer asics shouldn't need any manual adjustment. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-01drm/radeon: adjust default dispclk on DCE6 (v2)Alex Deucher
Set the default to 600Mhz if it's not set in the bios, and bump the default to 600Mhz if it's lower than that. This fixes display issues with certain 4k DP monitors when using 5.4 Ghz DP clocks. v2: fix typo. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: Fix radeon_irq_kms_pflip_irq_get/put() imbalanceMichel Dänzer
Fixes a regression in 3.16-rc1 compared to 3.15. The unbalanced calls would presumably result in the page flip interrupts never getting disabled once they are enabled. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18Revert "drm/radeon: remove drm_vblank_get|put from pflip handling"Michel Dänzer
This reverts commit 75f36d861957cb05b7889af24c8cd4a789398304. drm_vblank_get() is necessary to ensure the DRM vblank counter value is up to date in drm_send_vblank_event(). Seems to fix weston hangs waiting for page flips to complete. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: improve dvi_mode_validAlex Deucher
Make sure we have an HDMI monitor before validating modes with clocks >165 Mhz on single link connections. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: update mode_valid testing for DPAlex Deucher
When we have a passive adapter validate the clocks against the HMDI/DVI limits. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+Mario Kleiner
Need to use the adjusted clock on dce8 as well. bug: https://bugs.freedesktop.org/show_bug.cgi?id=80029 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-13drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout.Mario Kleiner
The hardware lut's only have 256 slots for indexing by a 8 bpc framebuffer. In 10 bpc scanout modes, framebuffer color values would get truncated to their 8 msb's, thereby losing the extra precision afforded by a 10 bpc framebuffer. To retain full precision, bypass the hw lut in 10 bpc scanout mode. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-13drm/radeon: use pixel formats instead of depth/bppFredrik Höglund
This disambiguates depth 16 formats, such as ARGB1555 and ARGB4444, and depth 32 formats such as ARGB2101010 and ARGB8888. This patch also adds support for depth 30 (XRGB2101010) framebuffers. Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-10Merge branch 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie
into drm-next Some additional patches for radeon for 3.16 now that -fixes has been merged. - Gart fix for all asics r6xx+ - Add some VM tuning parameters - misc fixes * 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Move fb update from radeon_flip_work_func to radeon_crtc_page_flip drm/radeon/dpm: powertune updates for SI Revert "drm/radeon: use variable UVD clocks" drm/radeon: add query for number of active CUs drm/radeon: add debugfs file to trigger GPU reset drm/radeon: make vm_block_size a module parameter drm/radeon: make VM size a module parameter (v2) drm/radeon: rename alt_domain to allowed_domains drm/radeon: use the SDMA on for buffer moves on CIK again drm/radeon: remove range check from *_gart_set_page drm/radeon: stop poisoning the GART TLB drm/radeon: hdmi deep color modes must obey clock limit of sink. drm/edid: Store all supported hdmi deep color modes in drm_display_info drm/radeon: add missing vce init case for hawaii drm/radeon: use lower_32_bits where appropriate
2014-06-09drm/radeon: Move fb update from radeon_flip_work_func to radeon_crtc_page_flipMichel Dänzer
Fixes WARN()s from the DRM core since the page flip rework. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=77521 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon/dpm: powertune updates for SIAlex Deucher
Updated powertune settings for certain SI asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09Revert "drm/radeon: use variable UVD clocks"Alex Deucher
This caused reduced performance for some users with advanced post processing enabled. We need a better method to pick the UVD state based on the amount of post processing required or tune the advanced post processing to fit within the lower power state envelope. This reverts commit 14a9579ddbf15dd1992a9481a4ec80b0b91656d5. Cc: "3.15" <stable@vger.kernel.org>
2014-06-09drm/radeon: add query for number of active CUsAlex Deucher
Query to find out how many compute units on a GPU. Useful for OpenCL usermode drivers. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: add debugfs file to trigger GPU resetChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: make vm_block_size a module parameterChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: make VM size a module parameter (v2)Christian König
v2: agd5f: simplify patch Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: rename alt_domain to allowed_domainsChristian König
And also domain to prefered_domains. That matches better what those values represent. Signed-off-by: Christian König <christian.koenig@amd.com> Cc: Marek Olšák <maraeo@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: use the SDMA on for buffer moves on CIK againChristian König
The underlying reason for the crashes seems to be fixed now. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-09drm/radeon: remove range check from *_gart_set_pageChristian König
We never check the return value anyway and if the index isn't valid would crash way before calling the functions. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>