[PATCH] drm: xlnx: zynqmp: Use dev_err_probe()
kernel test robot
lkp at intel.com
Wed Mar 22 10:36:49 UTC 2023
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.3-rc3 next-20230322]
[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/ye-xingchen-zte-com-cn/drm-xlnx-zynqmp-Use-dev_err_probe/20230322-162628
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/202303221625255005719%40zte.com.cn
patch subject: [PATCH] drm: xlnx: zynqmp: Use dev_err_probe()
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20230322/202303221848.iqaTMWyX-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/68f0f0c914304e81941645b5b2e06ca1424527f9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review ye-xingchen-zte-com-cn/drm-xlnx-zynqmp-Use-dev_err_probe/20230322-162628
git checkout 68f0f0c914304e81941645b5b2e06ca1424527f9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/gpu/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303221848.iqaTMWyX-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/xlnx/zynqmp_dp.c: In function 'zynqmp_dp_probe':
>> drivers/gpu/drm/xlnx/zynqmp_dp.c:1704:61: warning: format '%ld' expects a matching 'long int' argument [-Wformat=]
1704 | "failed to get reset: %ld\n");
| ~~^
| |
| long int
vim +1704 drivers/gpu/drm/xlnx/zynqmp_dp.c
1664
1665 /* -----------------------------------------------------------------------------
1666 * Initialization & Cleanup
1667 */
1668
1669 int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
1670 {
1671 struct platform_device *pdev = to_platform_device(dpsub->dev);
1672 struct drm_bridge *bridge;
1673 struct zynqmp_dp *dp;
1674 struct resource *res;
1675 int ret;
1676
1677 dp = kzalloc(sizeof(*dp), GFP_KERNEL);
1678 if (!dp)
1679 return -ENOMEM;
1680
1681 dp->dev = &pdev->dev;
1682 dp->dpsub = dpsub;
1683 dp->status = connector_status_disconnected;
1684
1685 INIT_DELAYED_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
1686
1687 /* Acquire all resources (IOMEM, IRQ and PHYs). */
1688 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dp");
1689 dp->iomem = devm_ioremap_resource(dp->dev, res);
1690 if (IS_ERR(dp->iomem)) {
1691 ret = PTR_ERR(dp->iomem);
1692 goto err_free;
1693 }
1694
1695 dp->irq = platform_get_irq(pdev, 0);
1696 if (dp->irq < 0) {
1697 ret = dp->irq;
1698 goto err_free;
1699 }
1700
1701 dp->reset = devm_reset_control_get(dp->dev, NULL);
1702 if (IS_ERR(dp->reset)) {
1703 ret = dev_err_probe(dp->dev, PTR_ERR(dp->reset),
> 1704 "failed to get reset: %ld\n");
1705 goto err_free;
1706 }
1707
1708 ret = zynqmp_dp_reset(dp, false);
1709 if (ret < 0)
1710 goto err_free;
1711
1712 ret = zynqmp_dp_phy_probe(dp);
1713 if (ret)
1714 goto err_reset;
1715
1716 /* Initialize the bridge. */
1717 bridge = &dp->bridge;
1718 bridge->funcs = &zynqmp_dp_bridge_funcs;
1719 bridge->ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID
1720 | DRM_BRIDGE_OP_HPD;
1721 bridge->type = DRM_MODE_CONNECTOR_DisplayPort;
1722 dpsub->bridge = bridge;
1723
1724 /*
1725 * Acquire the next bridge in the chain. Ignore errors caused by port at 5
1726 * not being connected for backward-compatibility with older DTs.
1727 */
1728 ret = drm_of_find_panel_or_bridge(dp->dev->of_node, 5, 0, NULL,
1729 &dp->next_bridge);
1730 if (ret < 0 && ret != -ENODEV)
1731 goto err_reset;
1732
1733 /* Initialize the hardware. */
1734 dp->config.misc0 &= ~ZYNQMP_DP_MAIN_STREAM_MISC0_SYNC_LOCK;
1735 zynqmp_dp_set_format(dp, NULL, ZYNQMP_DPSUB_FORMAT_RGB, 8);
1736
1737 zynqmp_dp_write(dp, ZYNQMP_DP_TX_PHY_POWER_DOWN,
1738 ZYNQMP_DP_TX_PHY_POWER_DOWN_ALL);
1739 zynqmp_dp_set(dp, ZYNQMP_DP_PHY_RESET, ZYNQMP_DP_PHY_RESET_ALL_RESET);
1740 zynqmp_dp_write(dp, ZYNQMP_DP_FORCE_SCRAMBLER_RESET, 1);
1741 zynqmp_dp_write(dp, ZYNQMP_DP_TRANSMITTER_ENABLE, 0);
1742 zynqmp_dp_write(dp, ZYNQMP_DP_INT_DS, 0xffffffff);
1743
1744 ret = zynqmp_dp_phy_init(dp);
1745 if (ret)
1746 goto err_reset;
1747
1748 zynqmp_dp_write(dp, ZYNQMP_DP_TRANSMITTER_ENABLE, 1);
1749
1750 /*
1751 * Now that the hardware is initialized and won't generate spurious
1752 * interrupts, request the IRQ.
1753 */
1754 ret = devm_request_threaded_irq(dp->dev, dp->irq, NULL,
1755 zynqmp_dp_irq_handler, IRQF_ONESHOT,
1756 dev_name(dp->dev), dp);
1757 if (ret < 0)
1758 goto err_phy_exit;
1759
1760 dpsub->dp = dp;
1761
1762 dev_dbg(dp->dev, "ZynqMP DisplayPort Tx probed with %u lanes\n",
1763 dp->num_lanes);
1764
1765 return 0;
1766
1767 err_phy_exit:
1768 zynqmp_dp_phy_exit(dp);
1769 err_reset:
1770 zynqmp_dp_reset(dp, true);
1771 err_free:
1772 kfree(dp);
1773 return ret;
1774 }
1775
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
More information about the dri-devel
mailing list