aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/amdgpu: fetch cu_info once at initAlex Deucher2016-05-111-3/+1
| | | | | | | | Fetch this info once at init and just store the results for future requests. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix memory leak in CGS (FW info)Mykola Lysenko2016-05-051-34/+36
| | | | | | | | | Previously requested FW pointer should not be overwritten on a subsequent call. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Mykola Lysenko <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: change ELM/BAF to Polaris10/Polaris11Flora Cui2016-05-051-8/+8
| | | | | | | | Adjust to preferred code names. Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: add query GFX cu info in CGS query system infoEric Huang2016-05-051-0/+5
| | | | | | | | | Needed for per CU powergating. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: Add smc_sk firmware in baffin & ellesmere.yanyang12016-05-051-3/+9
| | | | | | | | add CGS_UCODE_ID_SMU_SK. Signed-off-by: yanyang1 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/powerplay: add smu support for ellesmere/baffinrezhu2016-05-051-2/+9
| | | | | | Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd: make a type-safe cgs_device struct. (v2)Dave Airlie2016-05-051-46/+46
| | | | | | | | | | This is just a type-safety things to avoid everyone taking void *, it doesn't change anything. v2: agd5f: split out the dal changes into a separate patch. Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add an cgs interface to notify amdgpu the dpm state.Rex Zhu2016-04-011-0/+11
| | | | | | Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/powerplay: fix segment fault issue in multi-display case.Rex Zhu2016-04-011-5/+8
| | | | | | | Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
* drm/amdgpu: add a cgs interface to fetch cg and pg flagsAlex Deucher2016-02-081-0/+6
| | | | | | | Needed to pass the cg and pg info to powerplay. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/cgs: add an interface to access PCI resourcesAlex Deucher2016-01-111-0/+36
| | | | | | | | | | | | | | This provides an interface to get access to the base address of PCI resources (MMIO, DOORBELL, etc.). Only MMIO and DOORBELL are implemented right now. This is necessary to properly utilize shared drivers on platform devices. IP modules can use this interface to get the base address of the resource and add any additional offset and set the size when setting up the platform driver(s). Acked-by: Dave Airlie <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/cgs: cleanup some indentingDan Carpenter2016-01-041-9/+9
| | | | | | | | This code is indented too far. Also we normally use spaces to align if statement conditions. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/cgs: add sys info query for pcie gen and link widthAlex Deucher2015-12-211-0/+6
| | | | | | | Needed by powerplay to properly handle pcie dpm switching. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: enable powerplay and smc firmware loading for Fiji.Eric Huang2015-12-211-0/+3
| | | | | | | Switch over to handling in the powerplay module. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Eric Huang <[email protected]>
* drm/amdgpu: add new cgs interface to get display info (v2)Rex Zhu2015-12-211-0/+40
| | | | | | | | | | | | Add new CGS interfaces to query display info across modules. This is nedded by the powerplay module for synchronizing with the display module. v2: (agd): fold in refresh rate fix, rebase Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: implement cgs interface to query system infoRex Zhu2015-12-211-0/+23
| | | | | | | | Add a query to get the bus number and function of the device. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]>
* drm/amdgpu: implement new cgs interface for acpi functionRex Zhu2015-12-211-2/+218
| | | | | | | | | | Add a new driver internal interface for accessing ACPI methods. These will be used by various new components including powerplay. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu/cgs: remove import_gpu_memAlex Deucher2015-09-301-39/+0
| | | | | | | | | It was added for completeness, but we don't have any users for it yet. Daniel noted that it may be racy. Remove it. Change-Id: I5f5546f8911a4f294008a62dc86a73f3face38d1 Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: export reservation_object from dmabuf to ttm (v2)Christian König2015-09-231-2/+3
| | | | | | | | | | | | Adds an extra argument to amdgpu_bo_create, which is only used in amdgpu_prime.c. Port of radeon commit 831b6966a60fe72d85ae3576056b4e4e0775b112. v2: fix up kfd. Signed-off-by: Christian König <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: add cgs_interface for pg and cgrezhu2015-08-171-1/+46
| | | | | | | v3: check whether ip_blocks is enable v2: add break in the for loop. Signed-off-by: Rex zhu <[email protected]>
* drm/amdgpu: add cgs_get_firmware_info interface v2Jammy Zhou2015-08-171-1/+121
| | | | | | | | | | | | This new interface can be used by IP components to retrieve the firmware information from the core driver. v2: fix one typo Signed-off-by: Jammy Zhou <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Young Yang <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* drm/amdgpu: implement cgs gpu memory callbacksChunming Zhou2015-08-171-12/+226
| | | | | | | | | This implements the cgs interface for allocating GPU memory. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add atom interfaces for CGSChunming Zhou2015-08-171-6/+22
| | | | | | | | | This implements the interface for atombios command and data table access. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Implement irq interfaces for CGSAlex Deucher2015-08-171-6/+75
| | | | | | | | This implements the irq src registrar. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Implement the pciconfig callbacks for CGSChunming Zhou2015-08-171-12/+28
| | | | | | | | This implements the pciconfig register accessors. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Implement mmio callbacks for CGSChunming Zhou2015-08-171-7/+38
| | | | | | | | This implements the MMIO register accessors. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd: Add CGS interfacesChunming Zhou2015-08-171-0/+327
CGS (Common Graphics Services) is an AMD cross component abstraction layer to designed to better encapsulate specific IP block drivers so different teams can effectively work on differnet IP block drivers independently. It provides a common interface for things like accessing registers, allocating GPU memory, and registering interrupt sources. The plan is to eventually move more and more IP drivers to this interface. The first user is the ACP IP driver. Reviewed-by: Jammy Zhou <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>