All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: amd-gfx@lists.freedesktop.org
Cc: Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 01/14] drm/amd: Use ACPI macros for amdgpu_acpi
Date: Thu, 27 Mar 2025 15:38:45 -0500	[thread overview]
Message-ID: <20250327203858.3796086-2-superm1@kernel.org> (raw)
In-Reply-To: <20250327203858.3796086-1-superm1@kernel.org>

From: Mario Limonciello <mario.limonciello@amd.com>

Messages emitted from amdgpu_acpi are not device specific nor DRM
specific, but rather operate on ACPI handles.  Adjust the messages
to use ACPI macros instead.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index b7f8f2ff143dd..1c5994de5a723 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -256,7 +256,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif)
 
 	size = *(u16 *) info->buffer.pointer;
 	if (size < 12) {
-		DRM_INFO("ATIF buffer is too small: %zu\n", size);
+		acpi_handle_info(atif->handle, "ATIF buffer is too small: %zu\n", size);
 		err = -EINVAL;
 		goto out;
 	}
@@ -265,7 +265,7 @@ static int amdgpu_atif_verify_interface(struct amdgpu_atif *atif)
 	memcpy(&output, info->buffer.pointer, size);
 
 	/* TODO: check version? */
-	DRM_DEBUG_DRIVER("ATIF version %u\n", output.version);
+	acpi_handle_debug(atif->handle, "ATIF version %u\n", output.version);
 
 	amdgpu_atif_parse_notification(&atif->notifications, output.notification_mask);
 	amdgpu_atif_parse_functions(&atif->functions, output.function_bits);
@@ -616,7 +616,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs)
 
 	size = *(u16 *) info->buffer.pointer;
 	if (size < 8) {
-		DRM_INFO("ATCS buffer is too small: %zu\n", size);
+		acpi_handle_info(atcs->handle, "ATCS buffer is too small: %zu\n", size);
 		err = -EINVAL;
 		goto out;
 	}
@@ -625,7 +625,7 @@ static int amdgpu_atcs_verify_interface(struct amdgpu_atcs *atcs)
 	memcpy(&output, info->buffer.pointer, size);
 
 	/* TODO: check version? */
-	DRM_DEBUG_DRIVER("ATCS version %u\n", output.version);
+	acpi_handle_debug(atcs->handle, "ATCS version %u\n", output.version);
 
 	amdgpu_atcs_parse_functions(&atcs->functions, output.function_bits);
 
@@ -741,7 +741,7 @@ int amdgpu_acpi_pcie_performance_request(struct amdgpu_device *adev,
 
 		size = *(u16 *) info->buffer.pointer;
 		if (size < 3) {
-			DRM_INFO("ATCS buffer is too small: %zu\n", size);
+			acpi_handle_info(atcs->handle, "ATCS buffer is too small: %zu\n", size);
 			kfree(info);
 			return -EINVAL;
 		}
@@ -800,7 +800,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
 
 	info = amdgpu_atcs_call(atcs, ATCS_FUNCTION_POWER_SHIFT_CONTROL, &params);
 	if (!info) {
-		DRM_ERROR("ATCS PSC update failed\n");
+		acpi_handle_err(atcs->handle, "ATCS PSC update failed\n");
 		return -EIO;
 	}
 
@@ -1429,8 +1429,9 @@ void amdgpu_acpi_detect(void)
 	if (atif->functions.system_params) {
 		ret = amdgpu_atif_get_notification_params(atif);
 		if (ret) {
-			DRM_DEBUG_DRIVER("Call to GET_SYSTEM_PARAMS failed: %d\n",
-					ret);
+			acpi_handle_debug(atif->handle,
+					  "GET_SYSTEM_PARAMS evaluation failed: %d\n",
+					  ret);
 			/* Disable notification */
 			atif->notification_cfg.enabled = false;
 		}
@@ -1439,8 +1440,9 @@ void amdgpu_acpi_detect(void)
 	if (atif->functions.query_backlight_transfer_characteristics) {
 		ret = amdgpu_atif_query_backlight_caps(atif);
 		if (ret) {
-			DRM_DEBUG_DRIVER("Call to QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS failed: %d\n",
-					ret);
+			acpi_handle_debug(atif->handle,
+					  "QUERY_BACKLIGHT_TRANSFER_CHARACTERISTICS evaluation failed: %d\n",
+					  ret);
 			atif->backlight_caps.caps_valid = false;
 		}
 	} else {
-- 
2.43.0


  reply	other threads:[~2025-03-27 20:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 20:38 [PATCH 00/14] Convert more of amdgpu to drm_*() macros Mario Limonciello
2025-03-27 20:38 ` Mario Limonciello [this message]
2025-03-28 19:01   ` [PATCH 01/14] drm/amd: Use ACPI macros for amdgpu_acpi Alex Deucher
2025-03-27 20:38 ` [PATCH 02/14] drm/amd: Avoid showing an error about memory allocation in amdgpu_acpi_enumerate_xcc() Mario Limonciello
2025-03-28  4:05   ` Lazar, Lijo
2025-03-28 16:18     ` Mario Limonciello
2025-03-27 20:38 ` [PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once() Mario Limonciello
2025-03-28 19:04   ` Alex Deucher
2025-03-31  4:20     ` Mario Limonciello
2025-03-27 20:38 ` [PATCH 04/14] drm/amd: Adjust amdgpu_vpe messages from dev_*() to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 05/14] drm/amd: Adjust atombios parser messages from DRM_*() " Mario Limonciello
2025-03-27 20:38 ` [PATCH 06/14] drm/amd: Drop prototype for amdgpu_ucode_print_imu_hdr() Mario Limonciello
2025-03-27 20:38 ` [PATCH 07/14] drm/amd: Add a 'struct amdgpu_device' argument to all header printers Mario Limonciello
2025-03-27 20:38 ` [PATCH 08/14] drm/amd: Use drm_*() macros for all amdgpu_ucode prints Mario Limonciello
2025-03-27 20:38 ` [PATCH 09/14] drm/amd: Adjust amdgpu connector messages from DRM_*() to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 10/14] drm/amd: Adjust amdgpu_atombios " Mario Limonciello
2025-03-27 20:38 ` [PATCH 11/14] drm/amd: Add struct amdgpu_device into amdgpu_gfx_parse_disable_cu() Mario Limonciello
2025-03-27 20:38 ` [PATCH 12/14] drm/amd: Add struct amdgpu_device argument to amdgpu_reset_create_reset_domain() Mario Limonciello
2025-03-27 20:38 ` [PATCH 13/14] drm/amd: Convert DRM_*() and dev_*() macros to drm_*() Mario Limonciello
2025-03-27 20:38 ` [PATCH 14/14] drm/amd: Drop 'amdgpu' from pr_fmt() Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327203858.3796086-2-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.