Message ID | 20250605-uvc-orientation-v2-4-5710f9d030aa@chromium.org |
---|---|
State | New |
Headers | show |
Series | media: uvcvideo: Add support for orientation and rotation. | expand |
Hi Ricardo,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5e1ff2314797bf53636468a97719a8222deca9ae]
url: https://github.com/intel-lab-lkp/linux/commits/Ricardo-Ribalda/media-uvcvideo-Always-set-default_value/20250606-015643
base: 5e1ff2314797bf53636468a97719a8222deca9ae
patch link: https://lore.kernel.org/r/20250605-uvc-orientation-v2-4-5710f9d030aa%40chromium.org
patch subject: [PATCH v2 04/12] media: ipu-bridge: Use v4l2_fwnode_device_parse helper
config: riscv-randconfig-002-20250606 (https://download.01.org/0day-ci/archive/20250606/202506061223.m9fBRBFN-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506061223.m9fBRBFN-lkp@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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506061223.m9fBRBFN-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-mgr-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-bridge-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fpga/tests/fpga-region-test.o
>> ERROR: modpost: "v4l2_fwnode_device_parse" [drivers/media/pci/intel/ipu-bridge.ko] undefined!
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 83e682e1a4b77d9d97b2988750732d0b7c9087b3..020aa52f590d66b6d333adc56ebfb9ab0561db51 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -253,36 +253,16 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev) { - enum v4l2_fwnode_orientation orientation; - struct acpi_pld_info *pld = NULL; + struct v4l2_fwnode_device_properties props; + int ret; - if (!acpi_get_physical_device_location(ACPI_PTR(adev->handle), &pld)) { - dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); + ret = v4l2_fwnode_device_parse(ADEV_DEV(adev), &props); + if (!ret || props.rotation == V4L2_FWNODE_PROPERTY_UNSET) { + dev_warn(ADEV_DEV(adev), "Using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } - switch (pld->panel) { - case ACPI_PLD_PANEL_FRONT: - orientation = V4L2_FWNODE_ORIENTATION_FRONT; - break; - case ACPI_PLD_PANEL_BACK: - orientation = V4L2_FWNODE_ORIENTATION_BACK; - break; - case ACPI_PLD_PANEL_TOP: - case ACPI_PLD_PANEL_LEFT: - case ACPI_PLD_PANEL_RIGHT: - case ACPI_PLD_PANEL_UNKNOWN: - orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; - break; - default: - dev_warn(ADEV_DEV(adev), "Unknown _PLD panel val %d\n", - pld->panel); - orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; - break; - } - - ACPI_FREE(pld); - return orientation; + return props.orientation; } int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor)
v4l2_fwnode_device_parse now supports acpi devices as well. Use the helper instead of re-implement the logic. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- drivers/media/pci/intel/ipu-bridge.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-)