aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2015-08-14Merge tag 'drm-amdkfd-next-fixes-2015-08-05' of ↵Dave Airlie3-3/+3
git://people.freedesktop.org/~gabbayo/linux into drm-next Two small bug fixes for the code you pulled for 4.3: - Used a SHIFT define instead of a MASK define to check if a bit is turned on when destroying hqd. Luckily, this is in gfx7 interface file with amdgpu, which was used only for bring-up purposes of amdgpu, so no real effect on a running system - Used a logical AND instead of a bitwise AND operator, when initializing sdma virtual memory when using SDMA queues * tag 'drm-amdkfd-next-fixes-2015-08-05' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: fix bug when initializing sdma vm drm/amdgpu: fix bug when amdkfd destroys hqd
2015-08-06drm/amdgpu: Use new drm_fb_helper functionsArchit Taneja1-31/+14
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: - Fixed PTR_ERR issue mentioned by kbuild bot Cc: Fengguang Wu <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Oded Gabbay <[email protected]> Cc: "Christian König" <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2015-07-30drm/amdkfd: fix bug when initializing sdma vmOded Gabbay2-2/+2
A logical AND operation was used during mask and shift, instead of a bitwise AND operation. This patch fixes this bug by changing the operation to bitwise AND. Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-07-30drm/amdgpu: fix bug when amdkfd destroys hqdOded Gabbay1-1/+1
The wrong define was used to check if the hqd is still active v2: Don't use SHIFT as the MASK is already shifted Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-07-20drm/amdkfd: Set correct doorbell packet type for CarrizoBen Goz2-0/+6
Signed-off-by: Ben Goz <[email protected]> Reviewed-by: Yair Shachar <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: Use generic defines in new amd headersOded Gabbay3-22/+21
This patch makes use of the new amd headers (that are part of the new amdgpu driver), instead of private defines. Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: Implement create_map_queues() for CarrizoBen Goz1-4/+87
Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: fix runlist length calculationBen Goz1-1/+7
The MAP_QUEUES packet length for Carrizo is different than for Kaveri. Therefore, we now need to calculate the runlist length with regard to the underlying H/W. Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: Add support for VI in DQMBen Goz1-4/+99
This patch adds support for the VI APU in the DQM module. Most of the functionality of DQM is shared between CI and VI. Therefore, only a handful of functions are required to be in the H/W-specific part of DQM. Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: add support for VI in MQD managerBen Goz2-4/+248
This patch implements all the VI MQD manager functions. This is done in a different file as the MQD format is different between CI and VI Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: add CP HWS packet headers for VIBen Goz1-0/+398
Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: add supported CZ devices PCI IDs to amdkfdBen Goz1-1/+6
This patch adds the PCI IDs of supported CZ devices to the supported_devices structure in amdkfd. That structure is used during the amdkfd probing stage, to check if the currently probed device is eligible to be handled by amdkfd. Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdkfd: Add dependency of DRM_AMDGPU to KconfigOded Gabbay1-1/+1
Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdgpu: Add amdgpu <--> amdkfd gfx8 interfaceBen Goz6-1/+971
This patch adds the gfx8 interface file between amdgpu and amdkfd. This interface file is currently in use when running on a Carrizo-based system. The interface itself is represented by a pointer to struct kfd_dev. The pointer is located inside amdgpu_device structure. All the register accesses that amdkfd need are done using this interface. This allows us to avoid direct register accesses in amdkfd proper, while also allows us to avoid locking between amdkfd and amdgpu. The single exception is the doorbells that are used in both of the drivers. However, because they are located in separate pci bar pages, the danger of sharing registers between the drivers is minimal. Having said that, we are planning to move the doorbells as well to amdgpu. Signed-off-by: Ben Goz <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdgpu: add amdgpu <--> amdkfd gfx7 interfaceOded Gabbay4-1/+680
This patch adds the gfx7 interface file between amdgpu and amdkfd. This interface file mirrors (some) of the functions in radeon_kfd.c (the interface file between radeon and amdkfd). The gfx7 interface is used when it is run on a Kaveri-based system. This interface file was used for bring-up of amdkfd on amdgpu and for debugging purposes. For users who would like to run HSA on Kaveri, please use the radeon graphic driver. Note: CONFIG_DRM_AMDGPU_CIK must be selected for amdgpu to handle Kaveri. v2: removed MTYPE_NONCACHED enum definition as it is defined in another patch Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/amdgpu: Add H/W agnostic amdgpu <--> amdkfd interfaceOded Gabbay8-1/+362
This patch adds an interface file between amdgpu and amdkfd. This interface file is H/W agnostic, thus containing functions that operate the same for any AMD APU/GPU H/W generation. The functions in this interface mirror (some) of the functions in radeon_kfd.c (the radeon<-->amdkfd interface file). The main functions are: - amdgpu_amdkfd_init - initialize the amdkfd module - amdgpu_amdkfd_load_interface - load the H/W interface according to the currently probed device - amdgpu_amdkfd_device_probe - probe the device in amdkfd - amdgpu_amdkfd_device_init - initialize the device in amdkfd - amdgpu_amdkfd_interrupt - call the ISR of amdkfd - amdgpu_amdkfd_suspend - suspend callback from amdgpu - amdgpu_amdkfd_resume - resume callback from amdgpu This patch also modifies the relevant amdgpu files, to use this new interface. Signed-off-by: Oded Gabbay <[email protected]>
2015-07-20drm/radeon: Modify kgd_engine_type enum to match CZOded Gabbay1-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 <[email protected]>
2015-07-16drm/amdgpu/dce8: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer1-0/+4
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 <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-07-16drm/amdgpu/cz: silence some dpm debug outputAlex Deucher1-3/+3
Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu/cz: store the forced dpm levelAlex Deucher1-0/+2
So the selected forced level shows up properly in sysfs. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu/cz: unforce dpm levels before forcing to low/highAlex Deucher1-1/+7
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu: remove bogus check in gfx8 rb setupAlex Deucher1-4/+1
Always respect the harvest configuration as is. Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu: set proper index/data pair for smc regs on CZ (v2)Alex Deucher1-2/+33
v2: squash in later fix Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu: disable the IP module if early_init returns -ENOENT (v2)Alex Deucher1-2/+7
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-16drm/amdgpu: stop context leak in the error pathChristian König1-2/+6
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-07-16drm/amdgpu: validate the context id in the dependenciesChristian König1-1/+10
Just to make sure userspace don't send nonsense to the kernel. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
2015-07-10Merge tag 'drm-amdkfd-fixes-2015-07-09' of ↵Dave Airlie1-2/+7
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
2015-07-09drm/amdgpu: fix timeout calculationChristian König1-1/+1
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-07-09drm/amdkfd: validate pdd where it acquired firstManinder Singh1-2/+7
Currently pdd is validate after dereferencing it, which is not correct, Thus validate pdd before its first use. Signed-off-by: Maninder Singh <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2015-07-08drm/amdgpu: Handle irqs only based on irq ring, not irq status regs.Mario Kleiner3-24/+42
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 <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> CC: Michel Dänzer <[email protected]> CC: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-07-02Merge branch 'drm-next-4.2' of git://people.freedesktop.org/~agd5f/linuxLinus Torvalds20-76/+482
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 ...
2015-06-29drm/amdgpu: add flag to delay VM updatesChristian König1-3/+3
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: add optional dependencies to the CS IOCTL v2Christian König1-1/+58
v2: remove unrelated whitespace change, fix C comment Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: recreate fence from user seqChristian König3-9/+44
And use common fence infrastructure for the wait. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2015-06-29gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not setAlexander Kuleshov1-0/+6
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 <[email protected]> Signed-off-by: Alexander Kuleshov <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: disable enable_nb_ps_policy temporarilySonny Jiang1-1/+1
Fixes a hang on resume. Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOnSonny Jiang1-1/+1
Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: allocate ip_block_enabled memory in common codeAlex Deucher3-9/+3
Remove duplication across asic families and make it symmetric with the freeing of the code in amdgpu_device.c Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: remove unnecessary check before kfreeManinder Singh1-2/+1
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh <[email protected]> Reviewed-by: Vaneet Narang <[email protected]> Reviewed-by: Christian Konig <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: use kzalloc for allocating one thingManinder Singh1-1/+1
Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh <[email protected]> Reviewed-by: Vaneet Narang <[email protected]> Reviewed-by: Christian Konig <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: add chunk id validity checkChristian König1-3/+11
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: fix crash on invalid CS IOCTLChristian König1-2/+3
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: reset wptr at cp compute resume (v2)Sonny Jiang1-0/+6
This patch is to resolve compute hang at resume time. v2: (agd5f) squash in second fix Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-06-29drm/amdgpu: check VCE feedback and bitstream indexChristian König1-8/+16
Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
2015-06-29drm/amdgpu: make VCE handle check more strictChristian König1-16/+48
Port of radeon commit 29c63fe22a17c64e54016040cd882481bd45ee5a. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
2015-06-29drm/amdgpu: check VCE relocation buffer rangeChristian König3-29/+92
port of radeon commit 2fc5703abda201f138faf63bdca743d04dbf4b1a. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
2015-06-29drm/amdgpu: silence invalid error messageChristian König1-1/+1
Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
2015-06-29drm/amdgpu: fix wrong typemonk.liu1-1/+2
Signed-off-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
2015-06-29drm/amdgpu: print the bo_list in the CS trace point as wellChristian König1-2/+4
Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2015-06-29drm/amdgpu: add amdgpu_bo_list_set trace pointChristian König2-0/+18
Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>