X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH v5 0/4] Fix SW_TABLET_MODE detection method
@ 2022-03-10 21:08 Jorge Lopez
  2022-03-10 21:08 ` [PATCH v5 1/4] Fix hp_wmi_read_int() reporting error (0x05) Jorge Lopez
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jorge Lopez @ 2022-03-10 21:08 UTC (permalink / raw)
  To: platform-driver-x86

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-08-19 16:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 21:08 [PATCH v5 0/4] Fix SW_TABLET_MODE detection method Jorge Lopez
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
2024-08-08 21:46   ` Stefan Sichler
2024-08-13 14:34     ` Ilpo Järvinen
2024-08-19 16:41       ` Stefan Sichler
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox