summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: Use new drm_fb_helper functionsArchit Taneja2015-08-061-30/+12
| | | | | | | | | | | | | | | | | | Use the newly created wrapper drm_fb_helper functions instead of calling core fbdev functions directly. They also simplify the fb_info creation. v3: - Don't touch remove_conflicting_framebuffers v2: - Fix build break because of missing include of drm_fb_helper in radeon_drv.c Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Make the connector dpms callback return a value, v2.Maarten Lankhorst2015-07-271-1/+2
| | | | | | | | | | | | | | | | | This is required to properly handle failing dpms calls. When making a wait in i915 interruptible, I've noticed that the dpms sequence could fail with -ERESTARTSYS because it was waiting interruptibly for flips. So from now on allow drivers to fail in their connector dpms callback. Encoder and crtc dpms callbacks are unaffected. Changes since v1: - Update kerneldoc for the drm helper functions. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [danvet: Resolve conflicts due to different merge order.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Merge tag 'topic/connector-locking-2015-07-23' of ↵Dave Airlie2015-07-241-7/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-next connector hotplug locking cleanup and fixes to make it save against atomic. Note that because of depencies this is based on top of the drm-intel-next pull, so that one needs to go in before this one. I've also thrown in the mode_group removal on top since it's defunct, never worked really, no one seems to care and the code can be resurrected easily. * tag 'topic/connector-locking-2015-07-23' of git://anongit.freedesktop.org/drm-intel: drm: gc now dead mode_group code drm: Stop filtering according to mode_group in getresources drm: Roll out drm_for_each_{plane,crtc,encoder} drm/cma-helper: Fix locking in drm_fb_cma_debugfs_show drm: Roll out drm_for_each_connector more drm: Amend connector list locking rules drm/radeon: Take all modeset locks for DP MST hotplug drm/i915: Take all modeset locks for DP MST hotplug drm: Check locking in drm_for_each_fb drm/i915: Use drm_for_each_fb in i915_debugfs.c drm: Check locking in drm_for_each_connector drm/fbdev-helper: Grab mode_config.mutex in drm_fb_helper_single_add_all_connectors drm/probe-helper: Grab mode_config.mutex in poll_init/enable drm: Add modeset object iterators drm: Simplify drm_for_each_legacy_plane arguments
| * drm: gc now dead mode_group codeDaniel Vetter2015-07-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Two nice things here: - drm_dev_register will truly register everything in the right order if the driver doesn't have a ->load callback. Before this we had to init the primary mode_group after the device nodes where already registered. - Less things to keep track of when reworking the connector locking, yay! Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
| * drm/radeon: Take all modeset locks for DP MST hotplugDaniel Vetter2015-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | Similar with the i915 take all modeset locks for mst hotplug. This is needed to make sure radeon holds both mode_config.mutex and mode_config.connection_mutex when updating the connector_list, which is the new (interim) locking regime we want for that. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* | drm/radeon: Modify kgd_engine_type enum to match CZOded Gabbay2015-07-201-1/+2
| | | | | | | | | | | | | | This patch splits the KGD_ENGINE_SDMA to KGD_ENGINE_SDMA1 and KGD_ENGINE_SDMA2 to match CZ definitions. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
* | drm/radeon/ci: silence a harmless PCC warningAlex Deucher2015-07-161-1/+1
| | | | | | | | | | | | | | This has been a source of confusion. Make it debug only. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: fix user ptr race conditionChristian König2015-07-162-1/+1
| | | | | | | | | | | | | | | | Port of amdgpu patch 9298e52f8b51d1e4acd68f502832f3a97f8cf892. Signed-off-by: Christian König <christian.koenig@amd.com> CC: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULLMichel Dänzer2015-07-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be the case when the GPU is powered off, e.g. via vgaswitcheroo or runpm. When the GPU is powered up again, radeon_gart_table_vram_pin flushes the TLB after setting rdev->gart.ptr to non-NULL. Fixes panic on powering off R7xx GPUs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61529 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> Cc: stable@vger.kernel.org
* | drm/radeon: add a dpm quirk for Sapphire Radeon R9 270X 2GB GDDR5Alex Deucher2015-07-161-0/+1
|/ | | | | | | | bug: https://bugs.freedesktop.org/show_bug.cgi?id=76490 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* drm/radeon: disable vce init on cayman (v2)Alex Deucher2015-07-091-11/+14
| | | | | | | | | | Cayman does not have vce. There were a few places in the shared cayman/TV code where we were trying to do vce stuff. v2: remove -ENOENT check Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: check if BO_VA is set before adding it to the invalidation listChristian König2015-07-091-5/+5
| | | | | | | | | | | Otherwise we try to clear BO_VAs without an address. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91141 Signed-off-by: Christian König <christian.koenig@amd.com> Test-by: hadack@gmx.de Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: allways add the VM clear duplicateChristian König2015-07-091-18/+16
| | | | | | | | | | We need to allways add the VM clear duplicate of the BO_VA, no matter what the old status was. Signed-off-by: Christian König <christian.koenig@amd.com> Test-by: hadack@gmx.de Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Revert "Revert "drm/radeon: dont switch vt on suspend""Alex Deucher2015-07-091-0/+1
| | | | | | | This reverts commit ac9134906b3f5c2b45dc80dab0fee792bd516d52. We've fixed the underlying problem with cursors, so re-enable this.
* drm/radeon: Fold radeon_set_cursor() into radeon_show_cursor()Michel Dänzer2015-07-091-30/+19
| | | | | | | Reviewed-by: Grigori Goronzy <greg@chown.ath.cx> 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>
* drm/radeon: unpin cursor BOs on suspend and pin them again on resume (v2)Grigori Goronzy2015-07-091-1/+33
| | | | | | | | | | | | | | | | | | Everything is evicted from VRAM before suspend, so we need to make sure all BOs are unpinned and re-pinned after resume. Fixes broken mouse cursor after resume introduced by commit b9729b17. [Michel Dänzer: Add pinning BOs on resume] v2: [Alex Deucher: merge cursor unpin into fb unpin loop] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=100541 Cc: stable@vger.kernel.org Reviewed-by: Christian König <christian.koenig@amd.com> (v1) Signed-off-by: Grigori Goronzy <greg@chown.ath.cx> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: Clean up reference counting and pinning of the cursor BOsMichel Dänzer2015-07-092-48/+37
| | | | | | | | | | | | | | | Take a GEM reference for and pin the new cursor BO, unpin and drop the GEM reference for the old cursor BO in radeon_crtc_cursor_set2, and use radeon_crtc->cursor_addr in radeon_set_cursor. This fixes radeon_cursor_reset accidentally incrementing the cursor BO pin count, and cleans up the code a little. Cc: stable@vger.kernel.org Reviewed-by: Grigori Goronzy <greg@chown.ath.cx> 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>
* drm/radeon: fix underflow in r600_cp_dispatch_texture()Dan Carpenter2015-07-081-1/+1
| | | | | | | | | The "if (pass_size > buf->total)" can underflow so I have changed the type of size and pass_size to unsigned to avoid this problem. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: default to 2048 MB GART size on SI+Grigori Goronzy2015-07-081-13/+19
| | | | | | | | | | | | | | Newer ASICs have more VRAM on average and allocating more GART as well can have advantages. Also see commit edcd26e8. Ideally, we should scale GART size based on actual VRAM size, but that requires significant restructuring of initialization. v2: extract small helper, apply to error paths Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Grigori Goronzy <greg@chown.ath.cx> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: fix HDP flushingGrigori Goronzy2015-07-081-0/+1
| | | | | | | | | | | | | This was regressed by commit 39e7f6f8, although I don't know of any actual issues caused by it. The storage domain is read without TTM locking now, but the lock never helped to prevent any races. Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Grigori Goronzy <greg@chown.ath.cx> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: use RCU query for GEM_BUSY syscallGrigori Goronzy2015-07-081-3/+8
| | | | | | | | | | We don't need to call the (expensive) radeon_bo_wait, checking the fences via RCU is much faster. The reservation done by radeon_bo_wait does not save us from any race conditions. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Grigori Goronzy <greg@chown.ath.cx> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/radeon: Handle irqs only based on irq ring, not irq status regs.Mario Kleiner2015-07-084-531/+688
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to resolve issues with missed vblanks and impossible values inside delivered kms pageflip completion events showed that radeon's irq handling sometimes doesn't handle valid irqs, but silently skips them. This was observed for vblank interrupts. Although those irqs have corresponding events queued in the gpu's irq ring at time of interrupt, and therefore the corresponding handling code gets triggered by these events, the handling code sometimes silently skipped processing the irq. The reason for those skips is that the handling code double-checks for each irq event if the corresponding irq status bits in the irq status registers are set. Sometimes those bits are not set at time of check for valid irqs, maybe due to some hardware race on some setups? The problem only seems to happen on some machine + card combos sometimes, e.g., never happened during my testing of different PC cards of the DCE-2/3/4 generation a year ago, but happens consistently now on two different Apple Mac cards (RV730, DCE-3, Apple iMac and Evergreen JUNIPER, DCE-4 in a Apple MacPro). It also doesn't happen at each interrupt but only occassionally every couple of hundred or thousand vblank interrupts. This results in XOrg warning messages like "[ 7084.472] (WW) RADEON(0): radeon_dri2_flip_event_handler: Pageflip completion event has impossible msc 420120 < target_msc 420121" as well as skipped frames and problems for applications that use kms pageflip events or vblank events, e.g., users of DRI2 and DRI3/Present, Waylands Weston compositor, etc. See also https://bugs.freedesktop.org/show_bug.cgi?id=85203 After some talking to Alex and Michel, we decided to fix this by turning the double-check for asserted irq status bits into a warning. Whenever a irq event is queued in the IH ring, always execute the corresponding interrupt handler. Still check the irq status bits, but only to log a DRM_DEBUG message on a mismatch. This fixed the problems reliably on both previously failing cards, RV-730 dual-head tested on both crtcs (pipes D1 and D2) and a triple-output Juniper HD-5770 card tested on all three available crtcs (D1/D2/D3). The r600 and evergreen irq handling is therefore tested, but the cik an si handling is only compile tested due to lack of hw. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> CC: Michel Dänzer <michel.daenzer@amd.com> CC: Alex Deucher <alexander.deucher@amd.com> CC: <stable@vger.kernel.org> # v3.16+ Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Merge branch 'drm-next-4.2' of git://people.freedesktop.org/~agd5f/linuxLinus Torvalds2015-07-026-13/+57
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull radeon and amdgpu fixes from Alex Deucher: "First round of fixes for 4.2 for radeon and amdgpu. Stuff all over the place: - hibernation, suspend fixes for radeon and amdgpu - radeon audio fix - amdgpu ioctl optimzations and fixes - amdgpu VCE cs checker improvements - misc bug fixes" [ Dave on vacation, pulling directly ] * 'drm-next-4.2' of git://people.freedesktop.org/~agd5f/linux: (30 commits) drm/radeon: only check the sink type on DP connectors drm/amdgpu: add flag to delay VM updates drm/amdgpu: add optional dependencies to the CS IOCTL v2 drm/amdgpu: recreate fence from user seq gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set Revert "drm/radeon: dont switch vt on suspend" drm/amdgpu: disable enable_nb_ps_policy temporarily drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOn drm/amdgpu: allocate ip_block_enabled memory in common code drm/amdgpu: remove unnecessary check before kfree drm/amdgpu: use kzalloc for allocating one thing drm/radeon: fix adding all VAs to the freed list on remove v2 drm/amdgpu: add chunk id validity check drm/amdgpu: fix crash on invalid CS IOCTL drm/amdgpu: reset wptr at cp compute resume (v2) drm/amdgpu: check VCE feedback and bitstream index drm/amdgpu: make VCE handle check more strict drm/amdgpu: check VCE relocation buffer range drm/amdgpu: silence invalid error message drm/amdgpu: fix wrong type ...
| * drm/radeon: only check the sink type on DP connectorsAlex Deucher2015-06-301-9/+9
| | | | | | | | | | | | | | Avoids a crash on pre-DP asics that support HDMI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * Revert "drm/radeon: dont switch vt on suspend"Alex Deucher2015-06-291-1/+0
| | | | | | | | | | | | | | | | This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe. This seems to break the cursor on resume for lots of systems. Cc: stable@vger.kernel.org
| * drm/radeon: fix adding all VAs to the freed list on remove v2Christian König2015-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We only should do so when the BO_VA was actually mapped. Otherwise we get a nice error message on the next CS. v2: It actually doesn't matter if it was invalidated or not, if it was mapped we need to clear the area where it was mapped. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: SDMA fix hibernation (CI GPU family).Jérôme Glisse2015-06-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on sea island GPU family (CI) Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: compute ring fix hibernation (CI GPU family) v2.Jérôme Glisse2015-06-291-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for hibernation to reliably work we need to cleanup more thoroughly the compute ring. Hibernation is different from suspend resume as when we resume from hibernation the hardware is first fully initialize by regular kernel then freeze callback happens (which correspond to a suspend inside the radeon kernel driver) and turn off each of the block. It turns out we were not cleanly shutting down the compute ring. This patch fix that. Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Changed since v1: - Factor the ring stop logic into a function taking ring as arg. Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use kzalloc for allocating one thingManinder Singh2015-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kzalloc for allocating one thing rather than kcalloc(1... The semantic patch that makes this change is as follows: // <smpl> @@ @@ - kcalloc(1, + kzalloc( ...) // </smpl> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2015-06-2629-263/+1274
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm updates from Dave Airlie: "This is the main drm pull request for v4.2. I've one other new driver from freescale on my radar, it's been posted and reviewed, I'd just like to get someone to give it a last look, so maybe I'll send it or maybe I'll leave it. There is no major nouveau changes in here, Ben was working on something big, and we agreed it was a bit late, there wasn't anything else he considered urgent to merge. There might be another msm pull for some bits that are waiting on arm-soc, I'll see how we time it. This touches some "of" stuff, acks are in place except for the fixes to the build in various configs,t hat I just applied. Summary: New drivers: - virtio-gpu: KMS only pieces of driver for virtio-gpu in qemu. This is just the first part of this driver, enough to run unaccelerated userspace on. As qemu merges more we'll start adding the 3D features for the virgl 3d work. - amdgpu: a new driver from AMD to driver their newer GPUs. (VI+) It contains a new cleaner userspace API, and is a clean break from radeon moving forward, that AMD are going to concentrate on. It also contains a set of register headers auto generated from AMD internal database. core: - atomic modesetting API completed, enabled by default now. - Add support for mode_id blob to atomic ioctl to complete interface. - bunch of Displayport MST fixes - lots of misc fixes. panel: - new simple panels - fix some long-standing build issues with bridge drivers radeon: - VCE1 support - add a GPU reset counter for userspace - lots of fixes. amdkfd: - H/W debugger support module - static user-mode queues - support killing all the waves when a process terminates - use standard DECLARE_BITMAP i915: - Add Broxton support - S3, rotation support for Skylake - RPS booting tuning - CPT modeset sequence fixes - ns2501 dither support - enable cmd parser on haswell - cdclk handling fixes - gen8 dynamic pte allocation - lots of atomic conversion work exynos: - Add atomic modesetting support - Add iommu support - Consolidate drm driver initialization - and MIC, DECON and MIPI-DSI support for exynos5433 omapdrm: - atomic modesetting support (fixes lots of things in rewrite) tegra: - DP aux transaction fixes - iommu support fix msm: - adreno a306 support - various dsi bits - various 64-bit fixes - NV12MT support rcar-du: - atomic and misc fixes sti: - fix HDMI timing complaince tilcdc: - use drm component API to access tda998x driver - fix module unloading qxl: - stability fixes" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (872 commits) drm/nouveau: Pause between setting gpu to D3hot and cutting the power drm/dp/mst: close deadlock in connector destruction. drm: Always enable atomic API drm/vgem: Set unique to "vgem" of: fix a build error to of_graph_get_endpoint_by_regs function drm/dp/mst: take lock around looking up the branch device on hpd irq drm/dp/mst: make sure mst_primary mstb is valid in work function of: add EXPORT_SYMBOL for of_graph_get_endpoint_by_regs ARM: dts: rename the clock of MIPI DSI 'pll_clk' to 'sclk_mipi' drm/atomic: Don't set crtc_state->enable manually drm/exynos: dsi: do not set TE GPIO direction by input drm/exynos: dsi: add support for MIC driver as a bridge drm/exynos: dsi: add support for Exynos5433 drm/exynos: dsi: make use of array for clock access drm/exynos: dsi: make use of driver data for static values drm/exynos: dsi: add macros for register access drm/exynos: dsi: rename pll_clk to sclk_clk drm/exynos: mic: add MIC driver of: add helper for getting endpoint node of specific identifiers drm/exynos: add Exynos5433 decon driver ...
| * drm/radeon: remove obsolete kfd_bo from radeon_deviceOded Gabbay2015-06-161-1/+0
| | | | | | | | Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
| * Merge tag 'v4.1-rc6' into drm-nextDave Airlie2015-06-0412-41/+37
| |\ | | | | | | | | | | | | | | | | | | Linux 4.1-rc6 backmerge 4.1-rc6 as some of the later pull reqs are based on newer bases and I'd prefer to do the fixup myself.
| * | drm/radeon: Add ATC VMID<-->PASID functions to kfd->kgdAlexey Skidanov2015-06-032-5/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds three new interfaces to kfd2kgd interface file of radeon. The interfaces are: - Check if a specific VMID has a valid PASID mapping - Retrieve the PASID which is mapped to a specific VMID - Issue a VMID invalidation request to the ATC Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
| * | drm/radeon: Add H/W debugger kfd->kgd functionsYair Shachar2015-06-032-1/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds new interface functions to the kfd2kgd interface file. The new functions allow to perform H/W debugger operations by writing to GPU registers. Signed-off-by: Yair Shachar <yair.shachar@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
| * | radeon: Deinline indirect register accessor functionsDenys Vlasenko2015-05-287-197/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch deinlines indirect register accessor functions. These functions perform two mmio accesses, framed by spin lock/unlock. Spin lock/unlock by itself takes more than 50 cycles in ideal case (if lock is exclusively cached on current CPU). With this .config: http://busybox.net/~vda/kernel_config, after uninlining these functions have sizes and callsite counts as follows: r600_uvd_ctx_rreg: 111 bytes, 4 callsites r600_uvd_ctx_wreg: 113 bytes, 5 callsites eg_pif_phy0_rreg: 106 bytes, 13 callsites eg_pif_phy0_wreg: 108 bytes, 13 callsites eg_pif_phy1_rreg: 107 bytes, 13 callsites eg_pif_phy1_wreg: 108 bytes, 13 callsites rv370_pcie_rreg: 111 bytes, 21 callsites rv370_pcie_wreg: 113 bytes, 24 callsites r600_rcu_rreg: 111 bytes, 16 callsites r600_rcu_wreg: 113 bytes, 25 callsites cik_didt_rreg: 106 bytes, 10 callsites cik_didt_wreg: 107 bytes, 10 callsites tn_smc_rreg: 106 bytes, 126 callsites tn_smc_wreg: 107 bytes, 116 callsites eg_cg_rreg: 107 bytes, 20 callsites eg_cg_wreg: 108 bytes, 52 callsites Functions r100_mm_rreg() and r100_mm_rreg() have a fast path and a locked (slow) path. This patch deinlines only slow path. r100_mm_rreg_slow: 78 bytes, 2083 callsites r100_mm_wreg_slow: 81 bytes, 3570 callsites Reduction in code size is more than 65,000 bytes: text data bss dec hex filename 85740176 22294680 20627456 128662312 7ab3b28 vmlinux.before 85674192 22294776 20627456 128598664 7aa4288 vmlinux Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: Fix max_vblank_count value for current display enginesMichel Dänzer2015-05-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value was much too low, which could cause the userspace visible vblank counter to move backwards when the hardware counter wrapped around. 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>
| * | drm/radeon: stop using addr to check for BO moveChristian König2015-05-282-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is theoretically possible that a swapped out BO gets the same GTT address, but different backing pages while being swapped in. Instead just use another VA state to note updated areas. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: clean up radeon_audio_enableAlex Deucher2015-05-282-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | - make it static - fix mask/bool handling for last param Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * | drm/radeon: take the mode_config mutex when dealing with hpds (v2)Alex Deucher2015-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we are messing with state in the worker. v2: drop the changes in the mst worker Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * | drm/radeon: make dpcd parameters constAlex Deucher2015-05-262-5/+5
| | | | | | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: Use DECLARE_BITMAPJoe Perches2015-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | Use the generic mechanism to declare a bitmap instead of unsigned long. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon/tn/si: enable/disable vce cg when encoding v2Alex Deucher2015-05-262-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the vce clocks are automatic, others need to be manually enabled. For ease, just disable cg when vce is active. v2: rebased, call vce_v1_0_enable_mgcg directly Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: add support for vce 1.0 clock gatingAlex Deucher2015-05-263-0/+60
| | | | | | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: add VCE 1.0 support v4Christian König2015-05-268-3/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial support for VCE 1.0 using newest firmware. v2: rebased v3: fix for TN v4: fix FW size calculation Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon/dpm: add vce support for SIAlex Deucher2015-05-261-4/+98
| | | | | | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon/dpm: add vce dpm support for TNAlex Deucher2015-05-261-0/+76
| | | | | | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: implement tn_set_vce_clocksAlex Deucher2015-05-264-0/+40
| | | | | | | | | | | | | | | | | | | | | This implements the function to set the vce clocks on TN hardware. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: implement si_set_vce_clocks v2Christian König2015-05-265-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | For setting clocks with VCE v1.0 v2: (chk) rebased on current tree Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: allow some more VCE firmware versionsChristian König2015-05-261-1/+3
| | | | | | | | | | | | | | | | | | | | | They seem to work fine with the kernel interface. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: rework VCE FW size calculationChristian König2015-05-264-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | Previously we were completely over allocating, fix this by actually implementing the size calculation. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud