All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorge Lopez <jorgealtxwork@gmail.com>
To: platform-driver-x86@vger.kernel.org
Subject: [PATCH v5 0/4] Fix SW_TABLET_MODE detection method
Date: Thu, 10 Mar 2022 15:08:49 -0600	[thread overview]
Message-ID: <20220310210853.28367-1-jorge.lopez2@hp.com> (raw)

The intension for this patch was to address SW_TABLET_MODE detection 
problem.  It is during the initial investigation; two other issues were 
identified and are related to the initial task.  

First, several WMI queries were reporting error 0x05 including 
HPWMI_HARDWARE_QUERY that is responsible for returning dock and table 
modes values. See patch v5 part 2 and 3 comments for list of WMI queries 
affected.  The driver now reports the appropriate states and values 
correctly.

Lastly, a limiting data size restriction was discovered. 
struct bios_args data member size limits all possible WMI commands 
to those requiring buffer size of 128 bytes or less.  Several WMI 
commands and queries require a buffer size larger than 128 bytes 
hence limiting current and new feature supported by the driver. 
hp_wmi_perform_query function changed to handle the memory 
allocation and release of any required buffer size. 


Description of changes between version 4 and version 5
------------------------------------------------------

v5 patch 1: Fix hp_wmi_read_int() reporting error (0x05)
	-Moved hp_wmi_read_int() to a separate patch.
	-Initially part of v4 patch 1
	
v5 patch 2: Fix SW_TABLET_MODE detection method
	-Remaining part are changes included in v4 patch 1
	-Replaced return values with -ENODEV errors
	-Updated how the closing return value is calculated.
	-Patch 2 is dependent of patch 1 in order for tablet 
	 mode detection to work properly
	

v5 patch 3: Fix 0x05 error code reported by several WMI calls
	-No new changes were introduced.
	-Patch is identical to v4 patch 2
	
v5 patch 4: Changing bios_args.data to be dynamically allocated
	-Replace sizeof() with struct_size() and flex_array_size() helpers
	-Added ret variable value when the output buffer is zero


Jorge Lopez (4):
  Fix hp_wmi_read_int() reporting error (0x05)
  Fix SW_TABLET_MODE detection method
  Fix 0x05 error code reported by several WMI calls
  Changing bios_args.data to be dynamically allocated

 drivers/platform/x86/hp-wmi.c | 159 ++++++++++++++++++++++------------
 1 file changed, 106 insertions(+), 53 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-03-10 21:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 21:08 Jorge Lopez [this message]
2022-03-10 21:08 ` [PATCH v5 1/4] Fix hp_wmi_read_int() reporting error (0x05) Jorge Lopez
2022-03-14 10:41   ` Hans de Goede
2022-03-10 21:08 ` [PATCH v5 2/4] Fix SW_TABLET_MODE detection method Jorge Lopez
2022-03-14 10:44   ` Hans de Goede
2022-03-10 21:08 ` [PATCH v5 3/4] Fix 0x05 error code reported by several WMI calls Jorge Lopez
2022-03-14 10:44   ` Hans de Goede
2022-03-10 21:08 ` [PATCH v5 4/4] Changing bios_args.data to be dynamically allocated Jorge Lopez
2022-03-14 10:51   ` Hans de Goede
2022-03-14 11:33     ` Hans de Goede

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=20220310210853.28367-1-jorge.lopez2@hp.com \
    --to=jorgealtxwork@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.