Merge tag 'drm-for-v4.8' of git://people.freedesktop.org/~airlied/linux
[cascardo/linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_cgs.c
index f88e82a..bc0440f 100644 (file)
@@ -810,7 +810,7 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 }
 
 static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
-                               struct cgs_system_info *sys_info)
+                                       struct cgs_system_info *sys_info)
 {
        CGS_FUNC_ADEV;
 
@@ -830,6 +830,12 @@ static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
        case CGS_SYSTEM_INFO_PCIE_MLW:
                sys_info->value = adev->pm.pcie_mlw_mask;
                break;
+       case CGS_SYSTEM_INFO_PCIE_DEV:
+               sys_info->value = adev->pdev->device;
+               break;
+       case CGS_SYSTEM_INFO_PCIE_REV:
+               sys_info->value = adev->pdev->revision;
+               break;
        case CGS_SYSTEM_INFO_CG_FLAGS:
                sys_info->value = adev->cg_flags;
                break;
@@ -920,7 +926,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
        struct cgs_acpi_method_argument *argument;
        uint32_t i, count;
        acpi_status status;
-       int result = 0;
+       int result;
 
        handle = ACPI_HANDLE(&adev->pdev->dev);
        if (!handle)
@@ -1061,6 +1067,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
                params++;
        }
 
+       result = 0;
 free_obj:
        kfree(obj);
 free_input:
@@ -1075,7 +1082,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
 }
 #endif
 
-int amdgpu_cgs_call_acpi_method(struct cgs_device *cgs_device,
+static int amdgpu_cgs_call_acpi_method(struct cgs_device *cgs_device,
                                        uint32_t acpi_method,
                                        uint32_t acpi_function,
                                        void *pinput, void *poutput,