summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next-3.15-wip' of ↵Dave Airlie2014-04-198-211/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~deathsimple/linux into drm-next Some i2c fixes over DisplayPort. * 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux: drm/radeon: Improve vramlimit module param documentation drm/radeon: fix audio pin counts for DCE6+ (v2) drm/radeon/dp: switch to the common i2c over aux code drm/dp/i2c: Update comments about common i2c over dp assumptions (v3) drm/dp/i2c: send bare addresses to properly reset i2c connections (v4) drm/radeon/dp: handle zero sized i2c over aux transactions (v2) drm/i915: support address only i2c-over-aux transactions drm/tegra: dp: Support address-only I2C-over-AUX transactions
| * drm/radeon: Improve vramlimit module param documentationLauri Kasanen2014-04-081-1/+1
| | | | | | | | | | | | Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix audio pin counts for DCE6+ (v2)Alex Deucher2014-04-082-5/+14
| | | | | | | | | | | | | | | | | | | | | | There is actually quite a bit of variance based on the asic. v2: fix typo noticed by Jerome. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/dp: switch to the common i2c over aux codeAlex Deucher2014-04-085-200/+44
| | | | | | | | | | | | | | Provides a nice cleanup in radeon. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
| * drm/radeon/dp: handle zero sized i2c over aux transactions (v2)Alex Deucher2014-04-081-5/+18
| | | | | | | | | | | | | | | | | | | | | | Needed for proper i2c over aux handling for certain monitors and configurations (e.g., dp bridges or adapters). v2: add comments clarifying tx_size setting. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
* | drm/radeon/ci: make sure mc ucode is loaded before checking the sizeAlex Deucher2014-04-171-1/+3
| | | | | | | | | | | | | | | | Avoid a possible segfault. Noticed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon/si: make sure mc ucode is loaded before checking the sizeAlex Deucher2014-04-171-1/+3
| | | | | | | | | | | | | | | | Avoid a possible segfault. Noticed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: improve PLL params if we don't match exactly v2Christian König2014-04-171-6/+7
| | | | | | | | | | | | | | | | Otherwise we might be quite off on older chipsets. v2: keep ref_div minimum Signed-off-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: memory leak on bo reservation failure. v2Quentin Casasnovas2014-04-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | On bo reservation failure, we end up leaking fpriv. v2 (chk): rebased and added missing free on vm failure as well Fixes: 5e386b574cf7e1 ("drm/radeon: fix missing bo reservation") Cc: stable@vger.kernel.org Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: fix VCE fence commandChristoph Jaeger2014-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | Due to a type mismatch that causes an implicit type conversion, the upper 32 bits of the GPU address have been zeroed out when adding to the command buffer. Picked up by Coverity - CID 1198624. Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
* | drm/radeon: re-enable mclk dpm on R7 260X asicsAlex Deucher2014-04-171-2/+6
| | | | | | | | | | | | | | If the new mc ucode is available. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: add support for newer mc ucode on CI (v2)Alex Deucher2014-04-172-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | Fixes mclk stability on certain asics. v2: print out mc firmware version used and size bug: https://bugs.freedesktop.org/show_bug.cgi?id=75992 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: add support for newer mc ucode on SI (v2)Alex Deucher2014-04-172-13/+25
| | | | | | | | | | | | | | | | | | May fix stability issues with some newer cards. v2: print out mc firmware version used and size Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: apply more strict limits for PLL params v2Christian König2014-04-171-0/+3
| | | | | | | | | | | | | | | | Letting post and refernce divider get to big is bad for signal stability. v2: increase the limit to 210 Signed-off-by: Christian König <christian.koenig@amd.com>
* | drm/radeon: update CI DPM powertune settingsAlex Deucher2014-04-171-12/+13
| | | | | | | | | | | | As per internal recommendations. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix runpm handling on APUs (v4)Alex Deucher2014-04-176-34/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't try and runtime suspend the APU in PX systems. We only want to power down the dGPU. v2: fix harder v3: fix stupid typo v4: consolidate runpm enablement to a single flag bugs: https://bugs.freedesktop.org/show_bug.cgi?id=75127 https://bugzilla.kernel.org/show_bug.cgi?id=72701 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: disable mclk dpm on R7 260XAlex Deucher2014-04-171-0/+4
|/ | | | | | | | | | | | Setting higher mclks seems to cause stability issues on some R7 260X boards. Disable it for now for stability until we find a proper fix. bug: https://bugs.freedesktop.org/show_bug.cgi?id=75992 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: Use two-ended allocation by size, v2Lauri Kasanen2014-04-041-1/+12
| | | | | | | | | | | | | | | This decreases eviction by up to 20%, by improving the fragmentation quality. No harm in normal cases that fit VRAM fully (PTS gaming suite). In some cases, even the VRAM-fitting cases improved slightly (openarena, urban terror). 512kb was measured as the most optimal threshold for 3d workloads common to radeon. Other drivers may need different thresholds according to their workloads. v2: Nicer formatting Signed-off-by: Lauri Kasanen <cand@gmx.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix typo in spectre_golden_registersAlex Deucher2014-04-031-1/+1
| | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: fix endian swap on hawaii clear state buffer setupAlex Deucher2014-04-031-2/+2
| | | | | | | | Need to swap on BE. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: call drm_edid_to_eld when we update the edidAlex Deucher2014-04-031-0/+1
| | | | | | | | | | | This needs to be done to update some of the fields in the connector structure used by the audio code. Noticed by several users on irc. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: rework finding display PLL numbers v2Christian König2014-04-031-90/+153
| | | | | | | | | | | | | | This completely reworks how the PLL parameters are generated and should result in better matching dot clock frequencies. Probably needs quite a bit of testing. bugs: https://bugs.freedesktop.org/show_bug.cgi?id=76564 v2: more cleanup and comments. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix resuming mode in pm runtime resume pathDave Airlie2014-04-031-4/+6
| | | | | | | | | For runtime pm we'd never suspend with the modesetting hw turned on, so don't try and resume the modesetting hw, as that path will take locks that the interface that is causing us to wake up might also take. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix runtime suspend breaking secondary GPUsDave Airlie2014-04-031-5/+12
| | | | | | | Same fix as for nouveau, when we fail with EINVAL, subsequent gets fail hard, causing the device not to open. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: clear needs_reset flag if IB test failsChristian König2014-04-031-0/+1
| | | | | | | | | | | If the IB test fails we don't want to reset the card over and over again, just accept that it isn't working. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76501 Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm: Replace crtc fb with primary plane fb (v3)Matt Roper2014-04-016-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* drm/radeon: set PIPE_CONFIG for 1D and linear tiling modes on CIKMarek Olšák2014-03-252-4/+26
| | | | | | | | | | | | | | This fixes fast color clear with 1D-tiled single-sample surfaces and Hyper-Z corruption with 1D-tiled depth surfaces. Even though it seems it is not needed for 1D tiling, CMASK and HTILE are always 2D-tiled, thus the hw needs to know the actual pipe configuration for CMASK and HTILE addressing no matter what the tiling mode of the surface is. Signed-off-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
* drm/radeon: use drm_dp_dpcd_read_link_status()Alex Deucher2014-03-251-25/+5
| | | | | | | Replace the radeon specific version with the generic version. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon: use the new drm helpers for dp auxAlex Deucher2014-03-253-107/+104
| | | | | | | | | | Switch to the new dp helpers. The main difference is that the DP helpers don't allow an adjustable delay in the aux transaction, but I don't know that this is necessary. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon: clarify special handling in i2c over auxAlex Deucher2014-03-251-20/+16
| | | | | | | | We need a special packet for the start and end of the transaction. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon/atom: rework encoder enable/disable sequenceAlex Deucher2014-03-251-48/+34
| | | | | | | | | | This more closely matches what the vbios does and also adds a quirk for travis lvds displays and powers down the sink on DP displays which saves some power and may fix display issues in some cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon/dp: move sink power control to a separate functionAlex Deucher2014-03-252-5/+23
| | | | | | | This will be used elsewhere. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon/dp: use i2c_get_adapdata rather than castingAlex Deucher2014-03-251-1/+1
| | | | | | | Minor code cleanup. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* drm/radeon/kms: merge conflicted badlyDave Airlie2014-03-201-4/+0
| | | | | | | | Not sure why git didn't flag this, but the result of automerge from 3.14-rc7 screwed up the radeon init procedure. Reported-by: Fireburn on #radeon Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into ↵Dave Airlie2014-03-182-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | drm-next This is the 3rd respin of the drm-anon patches. They allow module unloading, use the pin_fs_* helpers recommended by Al and are rebased on top of drm-next. Note that there are minor conflicts with the "drm-minor" branch. * 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux: drm: init TTM dev_mapping in ttm_bo_device_init() drm: use anon-inode instead of relying on cdevs drm: add pseudo filesystem for shared inodes
| * drm: init TTM dev_mapping in ttm_bo_device_init()David Herrmann2014-03-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With dev->anon_inode we have a global address_space ready for operation right from the beginning. Therefore, there is no need to do a delayed setup with TTM. Instead, set dev_mapping during initialization in ttm_bo_device_init() and remove any "if (dev_mapping)" conditions. Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
| * drm: use anon-inode instead of relying on cdevsDavid Herrmann2014-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRM drivers share a common address_space across all character-devices of a single DRM device. This allows simple buffer eviction and mapping-control. However, DRM core currently waits for the first ->open() on any char-dev to mark the underlying inode as backing inode of the device. This delayed initialization causes ugly conditions all over the place: if (dev->dev_mapping) do_sth(); To avoid delayed initialization and to stop reusing the inode of the char-dev, we allocate an anonymous inode for each DRM device and reset filp->f_mapping to it on ->open(). Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
* | Merge tag 'v3.14-rc7' into drm-nextDave Airlie2014-03-1828-71/+113
|\ \ | |/ |/| | | | | | | Linux 3.14-rc7 Backmerge to help out Intel guys.
| * drm/radeon/cik: properly set compute ring status on disableAlex Deucher2014-03-121-1/+4
| | | | | | | | | | | | | | | | | | When we disable the rings, set the status properly. If not other code pathes may try and use the rings which are not functional at this point. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/cik: stop the sdma engines in the enable() functionAlex Deucher2014-03-121-7/+5
| | | | | | | | | | | | | | | | | | | | | | We always stop the rings when disabling the engines so just call the stop functions directly from the sdma enable function. This way the rings' status is set correctly on suspend so there are no problems on resume. Fixes resume failures that result in acceleration getting disabled. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/cik: properly set sdma ring status on disableAlex Deucher2014-03-121-0/+2
| | | | | | | | | | | | | | | | | | When we disable the rings, set the status properly. If not other code pathes may try and use the rings which are not functional at this point. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: fix runpm disabling on non-PX harderAlex Deucher2014-03-121-1/+9
| | | | | | | | | | | | | | | | Make sure runtime pm is disabled on non-PX hardware. Should fix powerdown problems without displays attached. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/atom: select the proper number of lanes in transmitter setupAlex Deucher2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | We need to check for DVI vs. HDMI when setting up duallink since HDMI is single link only. Fixes 4k modes on newer asics. bug: https://bugs.freedesktop.org/show_bug.cgi?id=75223 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/dpm: fix typo in EVERGREEN_SMC_FIRMWARE_HEADER_softRegistersAlex Deucher2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Should be at 0x8 rather than 0. fixes: https://bugzilla.kernel.org/show_bug.cgi?id=60523 Noticed by ArtForz on #radeon Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon/cik: fix typo in documentationAlex Deucher2014-03-061-1/+1
| | | | | | | | | | | | Copy-paste typo. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: silence GCC warning on 32 bitPaul Bolle2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building radeon_ttm.o on 32 bit x86 triggers a warning: In file included from include/asm-generic/bug.h:13:0, from [...]/arch/x86/include/asm/bug.h:38, from include/linux/bug.h:4, from include/drm/drm_mm.h:39, from include/drm/drm_vma_manager.h:26, from include/drm/ttm/ttm_bo_api.h:35, from drivers/gpu/drm/radeon/radeon_ttm.c:32: drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_gtt_read': include/linux/kernel.h:712:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (&_min1 == &_min2); \ ^ drivers/gpu/drm/radeon/radeon_ttm.c:938:22: note: in expansion of macro 'min' ssize_t cur_size = min(size, PAGE_SIZE - off); ^ Silence this warning by using min_t(). Since cur_size will never be negative and its upper bound is PAGE_SIZE, we can change its type to size_t and use min_t(size_t, [...]) here. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * drm/radeon: resume old pm lateAlex Deucher2014-03-0615-23/+16
| | | | | | | | | | | | | | | | Moving the pm resume up in the init order to fix dpm seems to have regressed somes cases with the old pm code. Move it back to late resume. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: TTM must be init with cpu-visible VRAM, v2Lauri Kasanen2014-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, a bo may get created in the cpu-inaccessible vram. Before the CP engines get setup, all copies are done via cpu memcpy. This means that the cpu tries to read from inaccessible memory, fails, and the radeon module proceeds to disable acceleration. Doing this has no downsides, as the real VRAM size gets set as soon as the CP engines get init. This is a candidate for 3.14 fixes. v2: Add comment on why the function is used Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: enable speaker allocation setup on dce3.2Alex Deucher2014-02-271-3/+0
| | | | | | | | | | | | | | | | Now that we disable audio while setting up the audio hw, we should be able to set this up without hangs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * drm/radeon: change audio enable logicAlex Deucher2014-02-275-27/+44
| | | | | | | | | | | | | | | | Disable audio around audio hw setup. This may avoid hangs on certain asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
OpenPOWER on IntegriCloud