aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
Commit message (Collapse)AuthorAge
* drm/amdgpu: set fw_version and feature_version for smu fw loadingJammy Zhou2015-08-05
| | | | | | | | The fw_version and feature_verion should be set correctly when the firmwares are loaded by SMU on Tonga/Carrzio/Iceland Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: add feature version for SDMA ucodeJammy Zhou2015-08-05
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: add feature version for RLC and MEC v2Jammy Zhou2015-08-05
| | | | | | | | | Expose feature version to user space for RLC/MEC/MEC2 ucode as well v2: fix coding style Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: increment queue when iterating on this variable.Nicolas Iooss2015-08-05
| | | | | | | | | | | | | | | | | gfx_v7_0_print_status contains a for loop on variable queue which does not update this variable between each iteration. This is bug is reported by clang while building allmodconfig LLVMLinux on x86_64: drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5126:19: error: variable 'queue' used in loop condition not modified in loop body [-Werror,-Wloop-analysis] for (queue = 0; queue < 8; i++) { ^~~~~ Fix this by incrementing variable queue instead of i in this loop. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix rb setting for CZAlex Deucher2015-08-05
| | | | | | | | | Always set num_rbs to 2 for CZ. The 1 RB parts are often harvest configs. The will get sorted out in mesa when we program PA_SC_RASTER_CONFIG[_1]. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: add new parameter to seperate map and unmapmonk.liu2015-07-29
| | | | | Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: hdp_flush is not needed for inside IBmonk.liu2015-07-29
| | | | | | | | hdp flush is not needed for IBs that dispatched from kernel inside because there is no video memory host access Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: different emit_ib for gfx and computemonk.liu2015-07-29
| | | | | | | | compute ring didn't use const engine byfar, so ignore CE things in compute routine Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: information leak in amdgpu_info_ioctl()Dan Carpenter2015-07-29
| | | | | | | | | | We recently changed the drm_amdgpu_info_device struct so now there is a 4 byte hole at the end. We need to initialize it so we don't disclose secret information from the stack. Fixes: fa92754e9c47 ('drm/amdgpu: add VCE harvesting instance query') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: clean up init sequence for failuresAlex Deucher2015-07-29
| | | | | | | | | | If we fail during device init, record what state each block is in so that we can tear down clearly. Fixes various problems on device init failure. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/cz/dpm: properly report UVD and VCE clock levelsAlex Deucher2015-07-23
| | | | | | | VCE, UVD DPM work similarly to SCLK DPM. Report the current clock levels for UVD and VCE via debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/cz: implement voltage validation properlyAlex Deucher2015-07-23
| | | | | | | | CZ uses a different set of registers compared to previous asics and supports separate NB and GFX planes. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: add VCE harvesting instance queryLeo Liu2015-07-23
| | | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm/amdgpu: implement VCE 3.0 harvesting support (v4)Alex Deucher2015-07-23
| | | | | | | | | | | | For boards with bad VCE blocks, only configure the working block. v2: use the harvest info for pipe setup v3: fix mask check as noted by Leo v4: add dGPU support Reviewed-by: Christian König <christian.koenig@amd.com> (v2) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/dce10: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer2015-07-23
| | | | | | | | This doesn't seem strictly necessary with Tonga right now, but that might change with future power management enhancements. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
* drm/amdgpu/dce11: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer2015-07-23
| | | | | | | | | | Something (ATOM BIOS?) seems to be clobbering the LB_INTERRUPT_MASK register while the CRTC is off, which caused e.g. glxgears or gnome-shell to hang after a modeset. Reviewed-and-Tested-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
* drm/amdgpu/dce8: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer2015-07-16
| | | | | | | | | Something (ATOM BIOS?) seems to be clobbering the LB_INTERRUPT_MASK register while the CRTC is off, which caused e.g. glxgears or gnome-shell to hang after a modeset. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amdgpu/cz: silence some dpm debug outputAlex Deucher2015-07-16
| | | | | Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/cz: store the forced dpm levelAlex Deucher2015-07-16
| | | | | | | So the selected forced level shows up properly in sysfs. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/cz: unforce dpm levels before forcing to low/highAlex Deucher2015-07-16
| | | | | | | | | This is necessary to properly reset the min/max limits before clamping them otherwise we may get improper clamping depending on what what was the last forced level. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: remove bogus check in gfx8 rb setupAlex Deucher2015-07-16
| | | | | | | Always respect the harvest configuration as is. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: set proper index/data pair for smc regs on CZ (v2)Alex Deucher2015-07-16
| | | | | | | v2: squash in later fix Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: disable the IP module if early_init returns -ENOENT (v2)Alex Deucher2015-07-16
| | | | | | | | | | If we run into a part with a harvest configuration where the entire IP block is unusable, just disable the IP block. v2: fix logic as noted by Christian Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: stop context leak in the error pathChristian König2015-07-16
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amdgpu: validate the context id in the dependenciesChristian König2015-07-16
| | | | | | | | Just to make sure userspace don't send nonsense to the kernel. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* Merge tag 'drm-amdkfd-fixes-2015-07-09' of ↵Dave Airlie2015-07-10
|\ | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~gabbayo/linux into drm-fixes A single fix so far for 4.2: - checking a pointer is not null before using it * tag 'drm-amdkfd-fixes-2015-07-09' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: validate pdd where it acquired first
| * drm/amdkfd: validate pdd where it acquired firstManinder Singh2015-07-09
| | | | | | | | | | | | | | | | Currently pdd is validate after dereferencing it, which is not correct, Thus validate pdd before its first use. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
* | drm/amdgpu: fix timeout calculationChristian König2015-07-09
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/amdgpu: Handle irqs only based on irq ring, not irq status regs.Mario Kleiner2015-07-08
|/ | | | | | | | | | | | | | | This is a translation of the patch ... "drm/radeon: Handle irqs only based on irq ring, not irq status regs." ... for the vblank irq handling, to fix the same problem described in that patch on the new driver. Only compile tested due to lack of suitable 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> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Merge branch 'drm-next-4.2' of git://people.freedesktop.org/~agd5f/linuxLinus Torvalds2015-07-02
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/amdgpu: add flag to delay VM updatesChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: add optional dependencies to the CS IOCTL v2Christian König2015-06-29
| | | | | | | | | | | | | | v2: remove unrelated whitespace change, fix C comment Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: recreate fence from user seqChristian König2015-06-29
| | | | | | | | | | | | | | | | And use common fence infrastructure for the wait. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
| * gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not setAlexander Kuleshov2015-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the CONFIG_DEBUG_FS is not selected, compilation of the drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but never defined. And as result: ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ^ Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: disable enable_nb_ps_policy temporarilySonny Jiang2015-06-29
| | | | | | | | | | | | | | Fixes a hang on resume. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOnSonny Jiang2015-06-29
| | | | | | | | | | Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: allocate ip_block_enabled memory in common codeAlex Deucher2015-06-29
| | | | | | | | | | | | | | | | Remove duplication across asic families and make it symmetric with the freeing of the code in amdgpu_device.c Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: remove unnecessary check before kfreeManinder Singh2015-06-29
| | | | | | | | | | | | | | | | | | kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: use kzalloc for allocating one thingManinder Singh2015-06-29
| | | | | | | | | | | | | | | | | | | | Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: add chunk id validity checkChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: fix crash on invalid CS IOCTLChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: reset wptr at cp compute resume (v2)Sonny Jiang2015-06-29
| | | | | | | | | | | | | | | | | | This patch is to resolve compute hang at resume time. v2: (agd5f) squash in second fix Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * drm/amdgpu: check VCE feedback and bitstream indexChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
| * drm/amdgpu: make VCE handle check more strictChristian König2015-06-29
| | | | | | | | | | | | | | Port of radeon commit 29c63fe22a17c64e54016040cd882481bd45ee5a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
| * drm/amdgpu: check VCE relocation buffer rangeChristian König2015-06-29
| | | | | | | | | | | | | | port of radeon commit 2fc5703abda201f138faf63bdca743d04dbf4b1a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
| * drm/amdgpu: silence invalid error messageChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
| * drm/amdgpu: fix wrong typemonk.liu2015-06-29
| | | | | | | | | | Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * drm/amdgpu: print the bo_list in the CS trace point as wellChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
| * drm/amdgpu: add amdgpu_bo_list_set trace pointChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
| * drm/amdgpu: add BO map/unmap trace pointChristian König2015-06-29
| | | | | | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>