public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Hans de Goede <hdegoede@redhat•com>, Mark Gross <markgross@kernel•org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux•intel.com>,
	"Kurt Borja" <kuurtb@gmail•com>,
	"Linux Kernel Mailing List" <linux-kernel@vger•kernel.org>,
	"Linux Next Mailing List" <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the drivers-x86 tree with the drivers-x86-fixes tree
Date: Tue, 22 Apr 2025 17:56:08 +1000	[thread overview]
Message-ID: <20250422175608.1ebc8a4c@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 5757 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/dell/alienware-wmi-wmax.c

between commit:

  4a8e04e2bdcb ("platform/x86: alienware-wmi-wmax: Fix uninitialized variable due to bad error handling")

from the drivers-x86-fixes tree and commit:

  32b6372ddd43 ("platform/x86: alienware-wmi-wmax: Improve platform profile probe")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/dell/alienware-wmi-wmax.c
index 3f9e1e986ecf,faeddfe3b79e..000000000000
--- a/drivers/platform/x86/dell/alienware-wmi-wmax.c
+++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c
@@@ -189,48 -174,61 +214,69 @@@ static const struct dmi_system_id awcc_
  		},
  		.driver_data = &g_series_quirks,
  	},
 +	{
 +		.ident = "Dell Inc. G5 5505",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
 +			DMI_MATCH(DMI_PRODUCT_NAME, "G5 5505"),
 +		},
 +		.driver_data = &g_series_quirks,
 +	},
  };
  
- enum WMAX_THERMAL_INFORMATION_OPERATIONS {
- 	WMAX_OPERATION_SYS_DESCRIPTION		= 0x02,
- 	WMAX_OPERATION_LIST_IDS			= 0x03,
- 	WMAX_OPERATION_CURRENT_PROFILE		= 0x0B,
+ enum AWCC_GET_FAN_SENSORS_OPERATIONS {
+ 	AWCC_OP_GET_TOTAL_FAN_TEMPS		= 0x01,
+ 	AWCC_OP_GET_FAN_TEMP_ID			= 0x02,
  };
  
- enum WMAX_THERMAL_CONTROL_OPERATIONS {
- 	WMAX_OPERATION_ACTIVATE_PROFILE		= 0x01,
+ enum AWCC_THERMAL_INFORMATION_OPERATIONS {
+ 	AWCC_OP_GET_SYSTEM_DESCRIPTION		= 0x02,
+ 	AWCC_OP_GET_RESOURCE_ID			= 0x03,
+ 	AWCC_OP_GET_TEMPERATURE			= 0x04,
+ 	AWCC_OP_GET_FAN_RPM			= 0x05,
+ 	AWCC_OP_GET_FAN_MIN_RPM			= 0x08,
+ 	AWCC_OP_GET_FAN_MAX_RPM			= 0x09,
+ 	AWCC_OP_GET_CURRENT_PROFILE		= 0x0B,
+ 	AWCC_OP_GET_FAN_BOOST			= 0x0C,
  };
  
- enum WMAX_GAME_SHIFT_STATUS_OPERATIONS {
- 	WMAX_OPERATION_TOGGLE_GAME_SHIFT	= 0x01,
- 	WMAX_OPERATION_GET_GAME_SHIFT_STATUS	= 0x02,
+ enum AWCC_THERMAL_CONTROL_OPERATIONS {
+ 	AWCC_OP_ACTIVATE_PROFILE		= 0x01,
+ 	AWCC_OP_SET_FAN_BOOST			= 0x02,
  };
  
- enum WMAX_THERMAL_TABLES {
- 	WMAX_THERMAL_TABLE_BASIC		= 0x90,
- 	WMAX_THERMAL_TABLE_USTT			= 0xA0,
+ enum AWCC_GAME_SHIFT_STATUS_OPERATIONS {
+ 	AWCC_OP_TOGGLE_GAME_SHIFT		= 0x01,
+ 	AWCC_OP_GET_GAME_SHIFT_STATUS		= 0x02,
  };
  
- enum wmax_thermal_mode {
- 	THERMAL_MODE_USTT_BALANCED,
- 	THERMAL_MODE_USTT_BALANCED_PERFORMANCE,
- 	THERMAL_MODE_USTT_COOL,
- 	THERMAL_MODE_USTT_QUIET,
- 	THERMAL_MODE_USTT_PERFORMANCE,
- 	THERMAL_MODE_USTT_LOW_POWER,
- 	THERMAL_MODE_BASIC_QUIET,
- 	THERMAL_MODE_BASIC_BALANCED,
- 	THERMAL_MODE_BASIC_BALANCED_PERFORMANCE,
- 	THERMAL_MODE_BASIC_PERFORMANCE,
- 	THERMAL_MODE_LAST,
+ enum AWCC_THERMAL_TABLES {
+ 	AWCC_THERMAL_TABLE_LEGACY		= 0x9,
+ 	AWCC_THERMAL_TABLE_USTT			= 0xA,
+ };
+ 
+ enum AWCC_SPECIAL_THERMAL_CODES {
+ 	AWCC_SPECIAL_PROFILE_CUSTOM		= 0x00,
+ 	AWCC_SPECIAL_PROFILE_GMODE		= 0xAB,
+ };
+ 
+ enum AWCC_TEMP_SENSOR_TYPES {
+ 	AWCC_TEMP_SENSOR_CPU			= 0x01,
+ 	AWCC_TEMP_SENSOR_GPU			= 0x06,
+ };
+ 
+ enum awcc_thermal_profile {
+ 	AWCC_PROFILE_USTT_BALANCED,
+ 	AWCC_PROFILE_USTT_BALANCED_PERFORMANCE,
+ 	AWCC_PROFILE_USTT_COOL,
+ 	AWCC_PROFILE_USTT_QUIET,
+ 	AWCC_PROFILE_USTT_PERFORMANCE,
+ 	AWCC_PROFILE_USTT_LOW_POWER,
+ 	AWCC_PROFILE_LEGACY_QUIET,
+ 	AWCC_PROFILE_LEGACY_BALANCED,
+ 	AWCC_PROFILE_LEGACY_BALANCED_PERFORMANCE,
+ 	AWCC_PROFILE_LEGACY_PERFORMANCE,
+ 	AWCC_PROFILE_LAST,
  };
  
  struct wmax_led_args {
@@@ -639,35 -1192,38 +1240,38 @@@ static int awcc_platform_profile_probe(
  {
  	enum platform_profile_option profile;
  	struct awcc_priv *priv = drvdata;
- 	enum wmax_thermal_mode mode;
- 	u8 sys_desc[4];
- 	u32 first_mode;
- 	u32 out_data;
+ 	enum awcc_thermal_profile mode;
+ 	u8 id, offset = 0;
  	int ret;
  
- 	ret = wmax_thermal_information(priv->wdev, WMAX_OPERATION_SYS_DESCRIPTION,
- 				       0, (u32 *) &sys_desc);
- 	if (ret < 0)
- 		return ret;
+ 	/*
+ 	 * Thermal profile IDs are listed last at offset
+ 	 *	fan_count + temp_count + unknown_count
+ 	 */
+ 	for (unsigned int i = 0; i < ARRAY_SIZE(priv->res_count) - 1; i++)
+ 		offset += priv->res_count[i];
  
- 	first_mode = sys_desc[0] + sys_desc[1];
- 
- 	for (u32 i = 0; i < sys_desc[3]; i++) {
- 		ret = wmax_thermal_information(priv->wdev, WMAX_OPERATION_LIST_IDS,
- 					       i + first_mode, &out_data);
+ 	for (unsigned int i = 0; i < priv->profile_count; i++) {
+ 		ret = awcc_op_get_resource_id(priv->wdev, i + offset, &id);
 -		if (ret == -EIO)
 -			return ret;
+ 		/*
+ 		 * Some devices report an incorrect number of thermal profiles
+ 		 * so the resource ID list may end prematurely
+ 		 */
  		if (ret == -EBADRQC)
  			break;
 +		if (ret)
 +			return ret;
  
- 		if (!is_wmax_thermal_code(out_data))
+ 		if (!is_awcc_thermal_profile_id(id)) {
+ 			dev_dbg(&priv->wdev->dev, "Unmapped thermal profile ID 0x%02x\n", id);
  			continue;
+ 		}
  
- 		mode = out_data & WMAX_THERMAL_MODE_MASK;
- 		profile = wmax_mode_to_platform_profile[mode];
- 		priv->supported_thermal_profiles[profile] = out_data;
+ 		mode = FIELD_GET(AWCC_THERMAL_MODE_MASK, id);
+ 		profile = awcc_mode_to_platform_profile[mode];
+ 		priv->supported_profiles[profile] = id;
  
- 		set_bit(profile, choices);
+ 		__set_bit(profile, choices);
  	}
  
  	if (bitmap_empty(choices, PLATFORM_PROFILE_LAST))

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2025-04-22  7:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  7:56 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-14  5:11 linux-next: manual merge of the drivers-x86 tree with the drivers-x86-fixes tree Stephen Rothwell
2022-06-29  3:34 Stephen Rothwell

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=20250422175608.1ebc8a4c@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=hdegoede@redhat$(echo .)com \
    --cc=ilpo.jarvinen@linux$(echo .)intel.com \
    --cc=kuurtb@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=markgross@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox