diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4545-drm-amdgpu-rename-amdgpu_device_is_px-to-amdgpu_devi.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4545-drm-amdgpu-rename-amdgpu_device_is_px-to-amdgpu_devi.patch | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4545-drm-amdgpu-rename-amdgpu_device_is_px-to-amdgpu_devi.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4545-drm-amdgpu-rename-amdgpu_device_is_px-to-amdgpu_devi.patch new file mode 100644 index 00000000..999a8d96 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4545-drm-amdgpu-rename-amdgpu_device_is_px-to-amdgpu_devi.patch @@ -0,0 +1,154 @@ +From 217481e7563fcefd8e806cb0bd39710623d6739e Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Fri, 4 Oct 2019 10:42:22 -0500 +Subject: [PATCH 4545/4736] drm/amdgpu: rename amdgpu_device_is_px to + amdgpu_device_supports_boco (v2) + +BACO - Bus Active, Chip Off +BOCO - Bus Off, Chip Off + +To better match what we are checking for and to align with +amdgpu_device_supports_baco. + +BOCO is used on PowerXpress/Hybrid Graphics systems and BACO +is used on desktop dGPU boards. + +v2: fix typo in documentation + +Change-Id: Iba62fb630a8a1600c72e0da59524a3d99efc052a +Reviewed-by: Evan Quan <evan.quan@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Rahul Kumar <rahul.kumar1@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++---- + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++---- + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- + 4 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +index c73ef0017ca5..e0423a9efe14 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +@@ -1188,7 +1188,7 @@ void amdgpu_device_program_register_sequence(struct amdgpu_device *adev, + const u32 *registers, + const u32 array_size); + +-bool amdgpu_device_is_px(struct drm_device *dev); ++bool amdgpu_device_supports_boco(struct drm_device *dev); + bool amdgpu_device_supports_baco(struct drm_device *dev); + bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev, + struct amdgpu_device *peer_adev); +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index ee045f328bf2..ac0dd28ca0a1 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -137,14 +137,14 @@ static DEVICE_ATTR(pcie_replay_count, S_IRUGO, + static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev); + + /** +- * amdgpu_device_is_px - Is the device is a dGPU with HG/PX power control ++ * amdgpu_device_supports_boco - Is the device a dGPU with HG/PX power control + * + * @dev: drm_device pointer + * + * Returns true if the device is a dGPU with HG/PX power control, + * otherwise return false. + */ +-bool amdgpu_device_is_px(struct drm_device *dev) ++bool amdgpu_device_supports_boco(struct drm_device *dev) + { + struct amdgpu_device *adev = dev->dev_private; + +@@ -1091,7 +1091,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero + { + struct drm_device *dev = pci_get_drvdata(pdev); + +- if (amdgpu_device_is_px(dev) && state == VGA_SWITCHEROO_OFF) ++ if (amdgpu_device_supports_boco(dev) && state == VGA_SWITCHEROO_OFF) + return; + + if (state == VGA_SWITCHEROO_ON) { +@@ -2919,7 +2919,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, + * ignore it */ + vga_client_register(adev->pdev, adev, NULL, amdgpu_device_vga_set_decode); + +- if (amdgpu_device_is_px(ddev)) ++ if (amdgpu_device_supports_boco(ddev)) + runtime = true; + if (!pci_is_thunderbolt_attached(adev->pdev)) + vga_switcheroo_register_client(adev->pdev, +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +index 298f78947048..3acdad16f0c2 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +@@ -1200,7 +1200,7 @@ static int amdgpu_pmops_resume(struct device *dev) + struct drm_device *drm_dev = dev_get_drvdata(dev); + + /* GPU comes up enabled by the bios on resume */ +- if (amdgpu_device_is_px(drm_dev)) { ++ if (amdgpu_device_supports_boco(drm_dev)) { + pm_runtime_disable(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); +@@ -1248,7 +1248,7 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev) + struct drm_device *drm_dev = pci_get_drvdata(pdev); + int ret; + +- if (!amdgpu_device_is_px(drm_dev)) { ++ if (!amdgpu_device_supports_boco(drm_dev)) { + pm_runtime_forbid(dev); + return -EBUSY; + } +@@ -1275,7 +1275,7 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) + struct drm_device *drm_dev = pci_get_drvdata(pdev); + int ret; + +- if (!amdgpu_device_is_px(drm_dev)) ++ if (!amdgpu_device_supports_boco(drm_dev)) + return -EINVAL; + + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; +@@ -1300,7 +1300,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) + struct drm_device *drm_dev = dev_get_drvdata(dev); + struct drm_crtc *crtc; + +- if (!amdgpu_device_is_px(drm_dev)) { ++ if (!amdgpu_device_supports_boco(drm_dev)) { + pm_runtime_forbid(dev); + return -EBUSY; + } +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +index 74ff077e89d0..591558fc6a9f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +@@ -88,7 +88,7 @@ void amdgpu_driver_unload_kms(struct drm_device *dev) + if (amdgpu_sriov_vf(adev)) + amdgpu_virt_request_full_gpu(adev, false); + +- if (amdgpu_device_is_px(dev)) { ++ if (amdgpu_device_supports_boco(dev)) { + pm_runtime_get_sync(dev->dev); + pm_runtime_forbid(dev->dev); + } +@@ -177,7 +177,7 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) + "Error during ACPI methods call\n"); + } + +- if (amdgpu_device_is_px(dev)) { ++ if (amdgpu_device_supports_boco(dev)) { + dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP); + pm_runtime_use_autosuspend(dev->dev); + pm_runtime_set_autosuspend_delay(dev->dev, 5000); +@@ -190,7 +190,7 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) + out: + if (r) { + /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */ +- if (adev->rmmio && amdgpu_device_is_px(dev)) ++ if (adev->rmmio && amdgpu_device_supports_boco(dev)) + pm_runtime_put_noidle(dev->dev); + amdgpu_driver_unload_kms(dev); + } +-- +2.17.1 + |