[PATCH v2 6/9] drm/bridge: Add ITE IT6263 LVDS to HDMI converter
kernel test robot
lkp at intel.com
Tue Oct 15 04:54:15 UTC 2024
Hi Liu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on arm64/for-next/core drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.12-rc3 next-20241014]
[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/Liu-Ying/arm64-dts-imx8mp-skov-revb-mi1010ait-1cp1-Add-panel-timing-node-to-panel-node/20241012-154239
base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link: https://lore.kernel.org/r/20241012073543.1388069-7-victor.liu%40nxp.com
patch subject: [PATCH v2 6/9] drm/bridge: Add ITE IT6263 LVDS to HDMI converter
config: i386-randconfig-052-20241015 (https://download.01.org/0day-ci/archive/20241015/202410151230.DwfMNFO5-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410151230.DwfMNFO5-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/bridge/ite-it6263.c:683:57-62: WARNING: conversion to bool not needed here
vim +683 drivers/gpu/drm/bridge/ite-it6263.c
655
656 static void
657 it6263_bridge_atomic_enable(struct drm_bridge *bridge,
658 struct drm_bridge_state *old_bridge_state)
659 {
660 struct drm_atomic_state *state = old_bridge_state->base.state;
661 struct it6263 *it = bridge_to_it6263(bridge);
662 const struct drm_crtc_state *crtc_state;
663 struct regmap *regmap = it->hdmi_regmap;
664 const struct drm_display_mode *mode;
665 struct drm_connector *connector;
666 bool is_stable = false;
667 struct drm_crtc *crtc;
668 unsigned int val;
669 bool pclk_high;
670 int i, ret;
671
672 connector = drm_atomic_get_new_connector_for_encoder(state,
673 bridge->encoder);
674 crtc = drm_atomic_get_new_connector_state(state, connector)->crtc;
675 crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
676 mode = &crtc_state->adjusted_mode;
677
678 regmap_write(regmap, HDMI_REG_HDMI_MODE, TX_HDMI_MODE);
679
680 it6263_hdmi_avi_infoframe_configure(it, connector, mode);
681
682 /* HDMI AFE setup */
> 683 pclk_high = mode->clock > HIGH_PIXEL_CLOCK_KHZ ? true : false;
684 regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, AFE_DRV_RST);
685 if (pclk_high)
686 regmap_write(regmap, HDMI_REG_AFE_XP_CTRL,
687 AFE_XP_GAINBIT | AFE_XP_RESETB);
688 else
689 regmap_write(regmap, HDMI_REG_AFE_XP_CTRL,
690 AFE_XP_ER0 | AFE_XP_RESETB);
691 regmap_write(regmap, HDMI_REG_AFE_ISW_CTRL, 0x10);
692 if (pclk_high)
693 regmap_write(regmap, HDMI_REG_AFE_IP_CTRL,
694 AFE_IP_GAINBIT | AFE_IP_RESETB);
695 else
696 regmap_write(regmap, HDMI_REG_AFE_IP_CTRL,
697 AFE_IP_ER0 | AFE_IP_RESETB);
698
699 /* HDMI software video reset */
700 regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, SOFTV_RST);
701 fsleep(1000);
702 regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, 0);
703
704 /* reconfigure LVDS and retry several times in case video is instable */
705 for (i = 0; i < 3; i++) {
706 ret = regmap_read_poll_timeout(regmap, HDMI_REG_SYS_STATUS, val,
707 val & TXVIDSTABLE,
708 20000, 500000);
709 if (!ret) {
710 is_stable = true;
711 break;
712 }
713
714 it6263_lvds_config(it);
715 }
716
717 if (!is_stable)
718 dev_warn(it->dev, "failed to wait for video stable\n");
719
720 /* HDMI AFE reset release and power up */
721 regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, 0);
722
723 regmap_write_bits(regmap, HDMI_REG_GCP, AVMUTE, 0);
724
725 regmap_write(regmap, HDMI_REG_PKT_GENERAL_CTRL, ENABLE_PKT | REPEAT_PKT);
726 }
727
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list