Re: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-31 Thread kernel test robot
Hi Mario,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/acpi-bus linus/master v6.8-rc2 
next-20240131]
[cannot apply to drm-misc/drm-misc-next rafael-pm/devprop]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-video-Handle-fetching-EDID-that-is-longer-than-256-bytes/20240131-032909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
patch link:
https://lore.kernel.org/r/20240130192608.11666-3-mario.limonciello%40amd.com
patch subject: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper
config: x86_64-kismet-CONFIG_ACPI_WMI-CONFIG_DRM-0-0 
(https://download.01.org/0day-ci/archive/20240131/202401312256.jbaomfd9-...@intel.com/config)
reproduce: 
(https://download.01.org/0day-ci/archive/20240131/202401312256.jbaomfd9-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202401312256.jbaomfd9-...@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for ACPI_WMI when 
>> selected by DRM
   .config:248:warning: symbol value 'n' invalid for AIC79XX_CMDS_PER_DEVICE
   .config:250:warning: symbol value 'n' invalid for SATA_MOBILE_LPM_POLICY
   .config:308:warning: symbol value 'n' invalid for 
SQUASHFS_FRAGMENT_CACHE_SIZE
   .config:333:warning: symbol value 'n' invalid for PANEL_LCD_PIN_SDA
   .config:356:warning: symbol value 'n' invalid for PSTORE_BLK_MAX_REASON
   .config:414:warning: symbol value 'n' invalid for FB_OMAP2_NUM_FBS
   .config:459:warning: symbol value 'n' invalid for KFENCE_SAMPLE_INTERVAL
   .config:543:warning: symbol value 'n' invalid for CFAG12864B_RATE
   .config:651:warning: symbol value 'n' invalid for CRYPTO_DEV_QCE_SW_MAX_LEN
   .config:665:warning: symbol value 'n' invalid for BLK_DEV_LOOP_MIN_COUNT
   .config:756:warning: symbol value 'n' invalid for PANEL_LCD_CHARSET
   .config:840:warning: symbol value 'n' invalid for SND_AC97_POWER_SAVE_DEFAULT
   .config:855:warning: symbol value 'n' invalid for MAGIC_SYSRQ_DEFAULT_ENABLE
   .config:893:warning: symbol value 'n' invalid for 
DRM_I915_MAX_REQUEST_BUSYWAIT
   .config:894:warning: symbol value 'n' invalid for RAPIDIO_DISC_TIMEOUT
   .config:917:warning: symbol value 'n' invalid for FAT_DEFAULT_CODEPAGE
   .config:920:warning: symbol value 'n' invalid for SND_AT73C213_TARGET_BITRATE
   .config:966:warning: symbol value 'n' invalid for CMA_SIZE_MBYTES
   .config:967:warning: symbol value 'n' invalid for NET_EMATCH_STACK
   .config:969:warning: symbol value 'n' invalid for VMCP_CMA_SIZE
   .config:1152:warning: symbol value 'n' invalid for NODES_SHIFT
   .config:1247:warning: symbol value 'n' invalid for MTDRAM_ERASE_SIZE
   .config:1307:warning: symbol value 'n' invalid for SERIAL_UARTLITE_NR_UARTS
   .config:1318:warning: symbol value 'n' invalid for AIC7XXX_DEBUG_MASK
   .config:1479:warning: symbol value 'n' invalid for LEGACY_PTY_COUNT
   .config:1645:warning: symbol value 'n' invalid for AIC7XXX_RESET_DELAY_MS
   .config:1682:warning: symbol value 'n' invalid for INPUT_MOUSEDEV_SCREEN_Y
   .config:1861:warning: symbol value 'n' invalid for IBM_EMAC_POLL_WEIGHT
   .config:1936:warning: symbol value 'n' invalid for DRM_I915_STOP_TIMEOUT
   .config:2029:warning: symbol value 'n' invalid for 
USB_GADGET_STORAGE_NUM_BUFFERS
   .config:2151:warning: symbol value 'n' invalid for 
SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM
   .config:2259:warning: symbol value 'n' invalid for SND_HDA_PREALLOC_SIZE
   .config:2310:warning: symbol value 'n' invalid for RCU_FANOUT_LEAF
   .config:2467:warning: symbol value 'n' invalid for PANEL_LCD_BWIDTH
   .config:2523:warning: symbol value 'n' invalid for PANEL_LCD_PIN_E
   .config:2542:warning: symbol value 'n' invalid for PSTORE_BLK_CONSOLE_SIZE
   .config:2725:warning: symbol value 'n' invalid for PANEL_PARPORT
   .config:2745:warning: symbol value 'n' invalid for BOOKE_WDT_DEFAULT_TIMEOUT
   .config:2824:warning: symbol value 'n' invalid for NOUVEAU_DEBUG_DEFAULT
   .config:3026:warning: symbol value 'n' invalid for KCSAN_REPORT_ONCE_IN_MS
   .config:3136:warning: symbol value 'n' invalid for KCSAN_UDELAY_INTERRUPT
   .config:3162:warning: symbol value 'n' invalid for PANEL_LCD_PIN_BL
   .config:3190:warning: symbol value 'n' invalid for INITRAMFS_ROOT_GID
   .config:3306:warning: symbol value 'n' invalid for ATM_FORE200E_TX_RETRY
   .config:3347:warning: symbol value 'n' invalid for 
FB_OMAP2_DSS_MIN_FCK_PER_PCK
   .config:3351:warning: symbol value 'n' invalid for STACK_M

Re: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-31 Thread kernel test robot
Hi Mario,

kernel test robot noticed the following build errors:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on rafael-pm/acpi-bus linus/master v6.8-rc2 
next-20240131]
[cannot apply to drm-misc/drm-misc-next rafael-pm/devprop]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-video-Handle-fetching-EDID-that-is-longer-than-256-bytes/20240131-032909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
patch link:
https://lore.kernel.org/r/20240130192608.11666-3-mario.limonciello%40amd.com
patch subject: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper
config: i386-buildonly-randconfig-003-20240131 
(https://download.01.org/0day-ci/archive/20240131/202401311847.xfzpeok4-...@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 
6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240131/202401311847.xfzpeok4-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202401311847.xfzpeok4-...@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/platform/x86/wmi.c:68:2: error: unknown type name 
>> 'wmi_notify_handler'; did you mean 'acpi_notify_handler'?
  68 | wmi_notify_handler handler;
 | ^~
 | acpi_notify_handler
   include/acpi/actypes.h:1061:8: note: 'acpi_notify_handler' declared here
1061 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void 
*context);
 |^
>> drivers/platform/x86/wmi.c:163:30: error: incomplete definition of type 
>> 'struct acpi_device'
 163 | handle = wblock->acpi_device->handle;
 |  ~~~^
   include/linux/acpi.h:795:8: note: forward declaration of 'struct acpi_device'
 795 | struct acpi_device;
 |^
>> drivers/platform/x86/wmi.c:166:11: error: call to undeclared function 
>> 'acpi_execute_simple_method'; ISO C99 and later do not support implicit 
>> function declarations [-Wimplicit-function-declaration]
 166 | status = acpi_execute_simple_method(handle, method, enable);
 |  ^
   drivers/platform/x86/wmi.c:166:11: note: did you mean 
'acpi_execute_reg_methods'?
   include/acpi/acpixf.h:662:8: note: 'acpi_execute_reg_methods' declared here
 662 | acpi_execute_reg_methods(acpi_handle 
device,
 | ^
   include/acpi/platform/aclinux.h:93:21: note: expanded from macro 
'ACPI_EXTERNAL_RETURN_STATUS'
  93 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
 |^
   drivers/platform/x86/wmi.c:210:49: error: incomplete definition of type 
'struct acpi_device'
 210 | return acpi_evaluate_object(wblock->acpi_device->handle, 
"_WED", , out);
 | ~~~^
   include/linux/acpi.h:795:8: note: forward declaration of 'struct acpi_device'
 795 | struct acpi_device;
 |^
>> drivers/platform/x86/wmi.c:282:5: warning: no previous prototype for 
>> function 'wmi_instance_count' [-Wmissing-prototypes]
 282 | int wmi_instance_count(const char *guid_string)
 | ^
   drivers/platform/x86/wmi.c:282:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
 282 | int wmi_instance_count(const char *guid_string)
 | ^
 | static 
>> drivers/platform/x86/wmi.c:326:13: warning: no previous prototype for 
>> function 'wmi_evaluate_method' [-Wmissing-prototypes]
 326 | acpi_status wmi_evaluate_method(const char *guid_string, u8 
instance, u32 method_id,
 | ^
   drivers/platform/x86/wmi.c:326:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
 326 | acpi_status wmi_evaluate_method(const char *guid_string, u8 
instance, u32 method_id,
 | ^
 | static 
   drivers/platform/x86/wmi.c:368:30: error: incomplete definition of type 
'struct acpi_device'
 368 | handle = wblock->acpi_device->handle;
 |  ~~~^
   include/linux/acpi.h:795:8: note: forward declaration of 'struct acpi_device'
 795 | struct acpi_device;
 |^
   drivers/platform/x86/wmi.c:412:30: error: incompl

Re: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-31 Thread kernel test robot
Hi Mario,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/acpi-bus linus/master v6.8-rc2 
next-20240131]
[cannot apply to drm-misc/drm-misc-next rafael-pm/devprop]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-video-Handle-fetching-EDID-that-is-longer-than-256-bytes/20240131-032909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
patch link:
https://lore.kernel.org/r/20240130192608.11666-3-mario.limonciello%40amd.com
patch subject: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper
config: i386-buildonly-randconfig-001-20240131 
(https://download.01.org/0day-ci/archive/20240131/202401311759.htfj4nbl-...@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 
6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240131/202401311759.htfj4nbl-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202401311759.htfj4nbl-...@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/acpi/acpi_video.c:642:44: warning: format specifies type 'long' but 
>> the argument has type 'ssize_t' (aka 'int') [-Wformat]
 642 |  "Invalid _DDC data for length 
%ld\n", length);
 |~~~   
  ^~
 |%zd
   include/linux/acpi.h:1219:30: note: expanded from macro 'acpi_handle_debug'
1219 |handle, pr_fmt(fmt), ##__VA_ARGS__)
 |   ~~~ ^~~
   include/linux/dynamic_debug.h:250:59: note: expanded from macro 
'_dynamic_func_call'
 250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, 
##__VA_ARGS__)
 |  
^~~
   include/linux/dynamic_debug.h:248:65: note: expanded from macro 
'_dynamic_func_call_cls'
 248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, 
##__VA_ARGS__)
 |  
  ^~~
   include/linux/dynamic_debug.h:224:15: note: expanded from macro 
'__dynamic_func_call_cls'
 224 | func(, ##__VA_ARGS__);   \
 | ^~~
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for ACPI_WMI
   Depends on [n]: X86_PLATFORM_DEVICES [=n] && ACPI [=y]
   Selected by [y]:
   - DRM [=y] && HAS_IOMEM [=y] && (AGP [=n] || AGP [=n]=n) && 
!EMULATED_CMPXCHG && HAS_DMA [=y] && X86 [=y]


vim +642 drivers/acpi/acpi_video.c

^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  612  
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  613  
static int
4be44fcd3bf648 drivers/acpi/video.c  Len Brown 2005-08-05  614  
acpi_video_device_EDID(struct acpi_video_device *device,
4be44fcd3bf648 drivers/acpi/video.c  Len Brown 2005-08-05  615  
   union acpi_object **edid, ssize_t length)
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  616  {
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  617  
int status;
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  618  
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  619  
union acpi_object *obj;
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  620  
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  621  
struct acpi_object_list args = { 1,  };
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  622  
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  623  
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  624  
*edid = NULL;
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  625  
^1da177e4c3f41 drivers/acpi/video.c  Linus Torvalds2005-04-16  626  
if (!device)
d550d98d331737 drivers/acpi/video.c  Patrick Mochel2006-06-27  627  
return -ENODEV

Re: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-31 Thread kernel test robot
Hi Mario,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/acpi-bus linus/master v6.8-rc2 
next-20240131]
[cannot apply to drm-misc/drm-misc-next rafael-pm/devprop]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-video-Handle-fetching-EDID-that-is-longer-than-256-bytes/20240131-032909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
patch link:
https://lore.kernel.org/r/20240130192608.11666-3-mario.limonciello%40amd.com
patch subject: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper
config: x86_64-kismet-CONFIG_ACPI_PLATFORM_PROFILE-CONFIG_HP_WMI-0-0 
(https://download.01.org/0day-ci/archive/20240131/202401311634.fe5cbvwe-...@intel.com/config)
reproduce: 
(https://download.01.org/0day-ci/archive/20240131/202401311634.fe5cbvwe-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202401311634.fe5cbvwe-...@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for 
>> ACPI_PLATFORM_PROFILE when selected by HP_WMI
   .config:101:warning: symbol value 'n' invalid for RADIO_RTRACK2_PORT
   .config:223:warning: symbol value 'n' invalid for AIC79XX_CMDS_PER_DEVICE
   .config:240:warning: symbol value 'n' invalid for SATA_MOBILE_LPM_POLICY
   .config:310:warning: symbol value 'n' invalid for DRM_I915_TIMESLICE_DURATION
   .config:321:warning: symbol value 'n' invalid for PANEL_LCD_PIN_SDA
   .config:345:warning: symbol value 'n' invalid for PSTORE_BLK_MAX_REASON
   .config:457:warning: symbol value 'n' invalid for KFENCE_SAMPLE_INTERVAL
   .config:633:warning: symbol value 'n' invalid for CRYPTO_DEV_QCE_SW_MAX_LEN
   .config:651:warning: symbol value 'n' invalid for DRM_XE_JOB_TIMEOUT_MIN
   .config:674:warning: symbol value 'n' invalid for FB_GBE_MEM
   .config:739:warning: symbol value 'n' invalid for PANEL_LCD_CHARSET
   .config:836:warning: symbol value 'n' invalid for SND_AC97_POWER_SAVE_DEFAULT
   .config:851:warning: symbol value 'n' invalid for MAGIC_SYSRQ_DEFAULT_ENABLE
   .config:871:warning: symbol value 'n' invalid for 
DRM_I915_MAX_REQUEST_BUSYWAIT
   .config:900:warning: symbol value 'n' invalid for SND_AT73C213_TARGET_BITRATE
   .config:951:warning: symbol value 'n' invalid for DRM_XE_PREEMPT_TIMEOUT_MIN
   .config:961:warning: symbol value 'n' invalid for NET_EMATCH_STACK
   .config:962:warning: symbol value 'n' invalid for VMCP_CMA_SIZE
   .config:1002:warning: symbol value 'n' invalid for 
SQUASHFS_FRAGMENT_CACHE_SIZE
   .config:1113:warning: symbol value 'n' invalid for FB_OMAP2_NUM_FBS
   .config:1237:warning: symbol value 'n' invalid for MTDRAM_ERASE_SIZE
   .config:1253:warning: symbol value 'n' invalid for CFAG12864B_RATE
   .config:1290:warning: symbol value 'n' invalid for SERIAL_UARTLITE_NR_UARTS
   .config:1468:warning: symbol value 'n' invalid for LEGACY_PTY_COUNT
   .config:1528:warning: symbol value 'n' invalid for RAPIDIO_DISC_TIMEOUT
   .config:1568:warning: symbol value 'n' invalid for FAT_DEFAULT_CODEPAGE
   .config:1608:warning: symbol value 'n' invalid for WATCHDOG_OPEN_TIMEOUT
   .config:1615:warning: symbol value 'n' invalid for AIC7XXX_RESET_DELAY_MS
   .config:1638:warning: symbol value 'n' invalid for KCOV_IRQ_AREA_SIZE
   .config:1850:warning: symbol value 'n' invalid for IBM_EMAC_POLL_WEIGHT
   .config:1903:warning: symbol value 'n' invalid for DRM_I915_STOP_TIMEOUT
   .config:2189:warning: symbol value 'n' invalid for 
SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM
   .config:2246:warning: symbol value 'n' invalid for SND_HDA_PREALLOC_SIZE
   .config:2358:warning: symbol value 'n' invalid for DRM_XE_TIMESLICE_MAX
   .config:2452:warning: symbol value 'n' invalid for PANEL_LCD_BWIDTH
   .config:2554:warning: symbol value 'n' invalid for PSTORE_BLK_CONSOLE_SIZE
   .config:2701:warning: symbol value 'n' invalid for PANEL_PARPORT
   .config:2763:warning: symbol value 'n' invalid for BOOKE_WDT_DEFAULT_TIMEOUT
   .config:2798:warning: symbol value 'n' invalid for NOUVEAU_DEBUG_DEFAULT
   .config:2996:warning: symbol value 'n' invalid for KCSAN_REPORT_ONCE_IN_MS
   .config:3107:warning: symbol value 'n' invalid for KCSAN_UDELAY_INTERRUPT
   .config:3132:warning: symbol value 'n' invalid for PANEL_LCD_PIN_BL
   .config:3152:warning: symbol value 'n' invalid for 
DEBUG_OBJECTS_ENABLE_DEFAULT
   .config:3159:warning: symbol value 'n' invalid for INITRAMFS_ROOT_GID
   .config:3236:warning: symbol value 'n' invalid for PANEL_LCD_PIN_E
   .config:3278:warnin

Re: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-30 Thread kernel test robot
Hi Mario,

kernel test robot noticed the following build errors:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on rafael-pm/acpi-bus linus/master v6.8-rc2 
next-20240131]
[cannot apply to drm-misc/drm-misc-next rafael-pm/devprop]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-video-Handle-fetching-EDID-that-is-longer-than-256-bytes/20240131-032909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git 
linux-next
patch link:
https://lore.kernel.org/r/20240130192608.11666-3-mario.limonciello%40amd.com
patch subject: [PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper
config: i386-buildonly-randconfig-002-20240131 
(https://download.01.org/0day-ci/archive/20240131/202401311541.bde2glwr-...@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 
6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240131/202401311541.bde2glwr-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202401311541.bde2glwr-...@intel.com/

All errors (new ones prefixed by >>):

>> drivers/platform/x86/dell/dell-wmi-ddv.c:647:12: error: call to undeclared 
>> function 'acpi_device_uid'; ISO C99 and later do not support implicit 
>> function declarations [-Wimplicit-function-declaration]
 647 | uid_str = acpi_device_uid(acpi_dev);
 |   ^
>> drivers/platform/x86/dell/dell-wmi-ddv.c:647:10: error: incompatible integer 
>> to pointer conversion assigning to 'const char *' from 'int' 
>> [-Wint-conversion]
 647 | uid_str = acpi_device_uid(acpi_dev);
 | ^ ~
>> drivers/platform/x86/dell/dell-wmi-ddv.c:660:35: error: call to undeclared 
>> function 'to_acpi_device'; ISO C99 and later do not support implicit 
>> function declarations [-Wimplicit-function-declaration]
 660 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(dev->parent), );
 |  ^
>> drivers/platform/x86/dell/dell-wmi-ddv.c:660:35: error: incompatible integer 
>> to pointer conversion passing 'int' to parameter of type 'struct acpi_device 
>> *' [-Wint-conversion]
 660 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(dev->parent), );
 |  ^~~
   drivers/platform/x86/dell/dell-wmi-ddv.c:643:59: note: passing argument to 
parameter 'acpi_dev' here
 643 | static int dell_wmi_ddv_battery_index(struct acpi_device *acpi_dev, 
u32 *index)
 |   ^
   drivers/platform/x86/dell/dell-wmi-ddv.c:679:35: error: call to undeclared 
function 'to_acpi_device'; ISO C99 and later do not support implicit function 
declarations [-Wimplicit-function-declaration]
 679 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(dev->parent), );
 |  ^
   drivers/platform/x86/dell/dell-wmi-ddv.c:679:35: error: incompatible integer 
to pointer conversion passing 'int' to parameter of type 'struct acpi_device *' 
[-Wint-conversion]
 679 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(dev->parent), );
 |  ^~~
   drivers/platform/x86/dell/dell-wmi-ddv.c:643:59: note: passing argument to 
parameter 'acpi_dev' here
 643 | static int dell_wmi_ddv_battery_index(struct acpi_device *acpi_dev, 
u32 *index)
 |   ^
   drivers/platform/x86/dell/dell-wmi-ddv.c:705:35: error: call to undeclared 
function 'to_acpi_device'; ISO C99 and later do not support implicit function 
declarations [-Wimplicit-function-declaration]
 705 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(battery->dev.parent), );
 |  ^
   drivers/platform/x86/dell/dell-wmi-ddv.c:705:35: error: incompatible integer 
to pointer conversion passing 'int' to parameter of type 'struct acpi_device *' 
[-Wint-conversion]
 705 | ret = 
dell_wmi_ddv_battery_index(to_acpi_device(battery->dev.parent), );
 |  
^~~
   drivers/platform/x86/dell/dell-wmi-ddv.c:643:59: note: passing argument to 
parameter 'acpi_dev'

[PATCH v2 2/4] drm: Add drm_get_acpi_edid() helper

2024-01-30 Thread Mario Limonciello
Some manufacturers have intentionally put an EDID that differs from
the EDID on the internal panel on laptops.  Drivers can call this
helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method.

Signed-off-by: Mario Limonciello 
---
v1->v2:
 * Split code from previous amdgpu specific helper to generic drm helper.
---
 drivers/gpu/drm/Kconfig|  4 +++
 drivers/gpu/drm/drm_edid.c | 73 ++
 include/drm/drm_edid.h |  1 +
 3 files changed, 78 insertions(+)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 2520db0b776e..0065dcb63745 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -21,6 +21,10 @@ menuconfig DRM
select KCMP
select VIDEO_CMDLINE
select VIDEO_NOMODESET
+   select ACPI_VIDEO if ACPI
+   select BACKLIGHT_CLASS_DEVICE if ACPI
+   select INPUT if ACPI
+   select ACPI_WMI if X86
help
  Kernel-level support for the Direct Rendering Infrastructure (DRI)
  introduced in XFree86 4.0. If you say Y here, you need to select
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 69c68804023f..1fbbeaa664b2 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -28,6 +28,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -2188,6 +2189,47 @@ drm_do_probe_ddc_edid(void *data, u8 *buf, unsigned int 
block, size_t len)
return ret == xfers ? 0 : -1;
 }
 
+/**
+ * drm_do_probe_acpi_edid() - get EDID information via ACPI _DDC
+ * @data: struct drm_device
+ * @buf: EDID data buffer to be filled
+ * @block: 128 byte EDID block to start fetching from
+ * @len: EDID data buffer length to fetch
+ *
+ * Try to fetch EDID information by calling acpi_video_get_edid() function.
+ *
+ * Return: 0 on success or error code on failure.
+ */
+static int
+drm_do_probe_acpi_edid(void *data, u8 *buf, unsigned int block, size_t len)
+{
+   struct drm_device *ddev = data;
+   struct acpi_device *acpidev = ACPI_COMPANION(ddev->dev);
+   unsigned char start = block * EDID_LENGTH;
+   void *edid;
+   int r;
+
+   if (!acpidev)
+   return -ENODEV;
+
+   /* fetch the entire edid from BIOS */
+   r = acpi_video_get_edid(acpidev, ACPI_VIDEO_DISPLAY_LCD, -1, );
+   if (r < 0) {
+   DRM_DEBUG_KMS("Failed to get EDID from ACPI: %d\n", r);
+   return -EINVAL;
+   }
+   if (len > r || start > r || start + len > r) {
+   r = EINVAL;
+   goto cleanup;
+   }
+
+   memcpy(buf, edid + start, len);
+   r = 0;
+cleanup:
+   kfree(edid);
+   return r;
+}
+
 static void connector_bad_edid(struct drm_connector *connector,
   const struct edid *edid, int num_blocks)
 {
@@ -2643,6 +2685,37 @@ struct edid *drm_get_edid(struct drm_connector 
*connector,
 }
 EXPORT_SYMBOL(drm_get_edid);
 
+/**
+ * drm_get_acpi_edid - get EDID data, if available
+ * @connector: connector we're probing
+ *
+ * Use the BIOS to attempt to grab EDID data if possible.  If found,
+ * attach it to the connector.
+ *
+ * Return: Pointer to valid EDID or NULL if we couldn't find any.
+ */
+struct edid *drm_get_acpi_edid(struct drm_connector *connector)
+{
+   struct edid *edid = NULL;
+
+   switch (connector->connector_type) {
+   case DRM_MODE_CONNECTOR_LVDS:
+   case DRM_MODE_CONNECTOR_eDP:
+   break;
+   default:
+   return NULL;
+   }
+
+   if (connector->force == DRM_FORCE_OFF)
+   return NULL;
+
+   edid = _drm_do_get_edid(connector, drm_do_probe_acpi_edid, 
connector->dev, NULL);
+
+   drm_connector_update_edid_property(connector, edid);
+   return edid;
+}
+EXPORT_SYMBOL(drm_get_acpi_edid);
+
 /**
  * drm_edid_read_custom - Read EDID data using given EDID block read function
  * @connector: Connector to use
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 518d1b8106c7..60fbdc06badc 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -412,6 +412,7 @@ struct edid *drm_do_get_edid(struct drm_connector 
*connector,
void *data);
 struct edid *drm_get_edid(struct drm_connector *connector,
  struct i2c_adapter *adapter);
+struct edid *drm_get_acpi_edid(struct drm_connector *connector);
 u32 drm_edid_get_panel_id(struct i2c_adapter *adapter);
 struct edid *drm_get_edid_switcheroo(struct drm_connector *connector,
 struct i2c_adapter *adapter);
-- 
2.34.1