dri-devel Archive on lore.kernel.org
 help / color / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sam Ravnborg <sam@ravnborg.org>,
	dri-devel@lists.freedesktop.org,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
	kbuild-all@lists.01.org, Neil Armstrong <narmstrong@baylibre.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jonas Karlman <jonas@kwiboo.se>,
	Andrzej Hajda <a.hajda@samsung.com>,
	clang-built-linux@googlegroups.com,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v1 16/22] drm/bridge: parade-ps8622: Backlight update
Date: Sun, 2 Aug 2020 22:05:01 +0800
Message-ID: <202008022254.9UWPo5f5%lkp@intel.com> (raw)
In-Reply-To: <20200802110636.1018743-17-sam@ravnborg.org>


[-- Attachment #1: Type: text/plain, Size: 9646 bytes --]

Hi Sam,

I love your patch! Yet something to improve:

[auto build test ERROR on backlight/for-backlight-next]
[also build test ERROR on next-20200731]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip linus/master drm/drm-next v5.8-rc7]
[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]

url:    https://github.com/0day-ci/linux/commits/Sam-Ravnborg/backlight-add-init-macros-and-accessors/20200802-190940
base:    for-backlight-next
config: x86_64-randconfig-a011-20200802 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 25af353b0e74907d5d50c8616b885bd1f73a68b3)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/bridge/parade-ps8622.c:337:48: error: implicit declaration of function 'blacklight_get_brightness' [-Werror,-Wimplicit-function-declaration]
           return ps8622_set(ps8622->client, 0x01, 0xa7, blacklight_get_brightness(bl));
                                                         ^
   drivers/gpu/drm/bridge/parade-ps8622.c:337:48: note: did you mean 'backlight_get_brightness'?
   include/linux/backlight.h:469:19: note: 'backlight_get_brightness' declared here
   static inline int backlight_get_brightness(const struct backlight_device *bd)
                     ^
>> drivers/gpu/drm/bridge/parade-ps8622.c:519:2: error: must use 'struct' tag to refer to type 'backlight_device'
           backlight_device *bl;
           ^
           struct 
>> drivers/gpu/drm/bridge/parade-ps8622.c:521:52: error: use of undeclared identifier 'dev'
           bl = devm_backlight_device_register(dev, dev_name(dev), dev,
                                                             ^
   drivers/gpu/drm/bridge/parade-ps8622.c:521:38: error: use of undeclared identifier 'dev'
           bl = devm_backlight_device_register(dev, dev_name(dev), dev,
                                               ^
   drivers/gpu/drm/bridge/parade-ps8622.c:521:58: error: use of undeclared identifier 'dev'
           bl = devm_backlight_device_register(dev, dev_name(dev), dev,
                                                                   ^
   5 errors generated.

vim +/blacklight_get_brightness +337 drivers/gpu/drm/bridge/parade-ps8622.c

   329	
   330	static int ps8622_backlight_update(struct backlight_device *bl)
   331	{
   332		struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
   333	
   334		if (!ps8622->enabled)
   335			return -EINVAL;
   336	
 > 337		return ps8622_set(ps8622->client, 0x01, 0xa7, blacklight_get_brightness(bl));
   338	}
   339	
   340	static const struct backlight_ops ps8622_backlight_ops = {
   341		.update_status	= ps8622_backlight_update,
   342	};
   343	
   344	static void ps8622_pre_enable(struct drm_bridge *bridge)
   345	{
   346		struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
   347		int ret;
   348	
   349		if (ps8622->enabled)
   350			return;
   351	
   352		gpiod_set_value(ps8622->gpio_rst, 0);
   353	
   354		if (ps8622->v12) {
   355			ret = regulator_enable(ps8622->v12);
   356			if (ret)
   357				DRM_ERROR("fails to enable ps8622->v12");
   358		}
   359	
   360		if (drm_panel_prepare(ps8622->panel)) {
   361			DRM_ERROR("failed to prepare panel\n");
   362			return;
   363		}
   364	
   365		gpiod_set_value(ps8622->gpio_slp, 1);
   366	
   367		/*
   368		 * T1 is the range of time that it takes for the power to rise after we
   369		 * enable the lcd/ps8622 fet. T2 is the range of time in which the
   370		 * data sheet specifies we should deassert the reset pin.
   371		 *
   372		 * If it takes T1.max for the power to rise, we need to wait atleast
   373		 * T2.min before deasserting the reset pin. If it takes T1.min for the
   374		 * power to rise, we need to wait at most T2.max before deasserting the
   375		 * reset pin.
   376		 */
   377		usleep_range(PS8622_RST_HIGH_T2_MIN_US + PS8622_POWER_RISE_T1_MAX_US,
   378			     PS8622_RST_HIGH_T2_MAX_US + PS8622_POWER_RISE_T1_MIN_US);
   379	
   380		gpiod_set_value(ps8622->gpio_rst, 1);
   381	
   382		/* wait 20ms after RST high */
   383		usleep_range(20000, 30000);
   384	
   385		ret = ps8622_send_config(ps8622);
   386		if (ret) {
   387			DRM_ERROR("Failed to send config to bridge (%d)\n", ret);
   388			return;
   389		}
   390	
   391		ps8622->enabled = true;
   392	}
   393	
   394	static void ps8622_enable(struct drm_bridge *bridge)
   395	{
   396		struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
   397	
   398		if (drm_panel_enable(ps8622->panel)) {
   399			DRM_ERROR("failed to enable panel\n");
   400			return;
   401		}
   402	}
   403	
   404	static void ps8622_disable(struct drm_bridge *bridge)
   405	{
   406		struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
   407	
   408		if (drm_panel_disable(ps8622->panel)) {
   409			DRM_ERROR("failed to disable panel\n");
   410			return;
   411		}
   412		msleep(PS8622_PWMO_END_T12_MS);
   413	}
   414	
   415	static void ps8622_post_disable(struct drm_bridge *bridge)
   416	{
   417		struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
   418	
   419		if (!ps8622->enabled)
   420			return;
   421	
   422		ps8622->enabled = false;
   423	
   424		/*
   425		 * This doesn't matter if the regulators are turned off, but something
   426		 * else might keep them on. In that case, we want to assert the slp gpio
   427		 * to lower power.
   428		 */
   429		gpiod_set_value(ps8622->gpio_slp, 0);
   430	
   431		if (drm_panel_unprepare(ps8622->panel)) {
   432			DRM_ERROR("failed to unprepare panel\n");
   433			return;
   434		}
   435	
   436		if (ps8622->v12)
   437			regulator_disable(ps8622->v12);
   438	
   439		/*
   440		 * Sleep for at least the amount of time that it takes the power rail to
   441		 * fall to prevent asserting the rst gpio from doing anything.
   442		 */
   443		usleep_range(PS8622_POWER_FALL_T16_MAX_US,
   444			     2 * PS8622_POWER_FALL_T16_MAX_US);
   445		gpiod_set_value(ps8622->gpio_rst, 0);
   446	
   447		msleep(PS8622_POWER_OFF_T17_MS);
   448	}
   449	
   450	static int ps8622_get_modes(struct drm_connector *connector)
   451	{
   452		struct ps8622_bridge *ps8622;
   453	
   454		ps8622 = connector_to_ps8622(connector);
   455	
   456		return drm_panel_get_modes(ps8622->panel, connector);
   457	}
   458	
   459	static const struct drm_connector_helper_funcs ps8622_connector_helper_funcs = {
   460		.get_modes = ps8622_get_modes,
   461	};
   462	
   463	static const struct drm_connector_funcs ps8622_connector_funcs = {
   464		.fill_modes = drm_helper_probe_single_connector_modes,
   465		.destroy = drm_connector_cleanup,
   466		.reset = drm_atomic_helper_connector_reset,
   467		.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
   468		.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
   469	};
   470	
   471	static int ps8622_attach(struct drm_bridge *bridge,
   472				 enum drm_bridge_attach_flags flags)
   473	{
   474		struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
   475		int ret;
   476	
   477		if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
   478			DRM_ERROR("Fix bridge driver to make connector optional!");
   479			return -EINVAL;
   480		}
   481	
   482		if (!bridge->encoder) {
   483			DRM_ERROR("Parent encoder object not found");
   484			return -ENODEV;
   485		}
   486	
   487		ps8622->connector.polled = DRM_CONNECTOR_POLL_HPD;
   488		ret = drm_connector_init(bridge->dev, &ps8622->connector,
   489				&ps8622_connector_funcs, DRM_MODE_CONNECTOR_LVDS);
   490		if (ret) {
   491			DRM_ERROR("Failed to initialize connector with drm\n");
   492			return ret;
   493		}
   494		drm_connector_helper_add(&ps8622->connector,
   495						&ps8622_connector_helper_funcs);
   496		drm_connector_register(&ps8622->connector);
   497		drm_connector_attach_encoder(&ps8622->connector,
   498								bridge->encoder);
   499	
   500		if (ps8622->panel)
   501			drm_panel_attach(ps8622->panel, &ps8622->connector);
   502	
   503		drm_helper_hpd_irq_event(ps8622->connector.dev);
   504	
   505		return ret;
   506	}
   507	
   508	static const struct drm_bridge_funcs ps8622_bridge_funcs = {
   509		.pre_enable = ps8622_pre_enable,
   510		.enable = ps8622_enable,
   511		.disable = ps8622_disable,
   512		.post_disable = ps8622_post_disable,
   513		.attach = ps8622_attach,
   514	};
   515	
   516	static int ps8622_register_blacklight(struct ps8622_bridge *ps8622)
   517	{
   518		DECLARE_BACKLIGHT_INIT_RAW(props, PS8622_MAX_BRIGHTNESS, PS8622_MAX_BRIGHTNESS);
 > 519		backlight_device *bl;
   520	
 > 521		bl = devm_backlight_device_register(dev, dev_name(dev), dev,
   522						    ps8622, &ps8622_backlight_ops, &props);
   523		if (IS_ERR(bl)) {
   524			DRM_ERROR("failed to register backlight\n");
   525			return PTR_ERR(bl);
   526		}
   527	
   528		ps8622->bl = bl;
   529		return 0;
   530	}
   531	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38729 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply index

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 11:06 [RFC PATCH v1 0/22] backlight: add init macros and accessors Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 01/22] backlight: Silently fail backlight_update_status() if no device Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 02/22] backlight: Add DECLARE_* macro for device registration Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 03/22] backlight: Add get/set operations for brightness/power properties Sam Ravnborg
2020-08-04 16:43   ` daniel
2020-08-04 19:56     ` Sam Ravnborg
2020-08-05  7:16       ` daniel
2020-08-02 11:06 ` [PATCH v1 04/22] backlight: gpio: Use DECLARE_BACKLIGHT_INIT_RAW and get/setters Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 05/22] drm/gma500: Backlight support Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 06/22] drm/panel: asus-z00t-tm5p5-n35596: Backlight update Sam Ravnborg
2020-08-04 16:59   ` daniel
2020-08-02 11:06 ` [PATCH v1 07/22] drm/panel: jdi-lt070me05000: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 08/22] drm/panel: novatek-nt35510: " Sam Ravnborg
2020-08-04 21:29   ` Linus Walleij
2020-08-02 11:06 ` [PATCH v1 09/22] drm/panel: orisetech-otm8009a: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 10/22] drm/panel: raydium-rm67191: " Sam Ravnborg
2020-08-04 17:04   ` daniel
2020-08-02 11:06 ` [PATCH v1 11/22] drm/panel: samsung-s6e63m0: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 12/22] drm/panel: samsung-s6e63j0x03: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 13/22] drm/panel: samsung-s6e3ha2: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 14/22] drm/panel: sony-acx424akp: " Sam Ravnborg
2020-08-04 21:31   ` Linus Walleij
2020-08-02 11:06 ` [PATCH v1 15/22] drm/panel: sony-acx565akm: " Sam Ravnborg
2020-08-04 17:09   ` daniel
2020-08-02 11:06 ` [PATCH v1 16/22] drm/bridge: parade-ps8622: " Sam Ravnborg
2020-08-02 14:05   ` kernel test robot [this message]
2020-08-02 14:32   ` Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 17/22] drm/tilcdc: " Sam Ravnborg
2020-08-02 13:21   ` kernel test robot
2020-08-02 11:06 ` [PATCH v1 18/22] drm/radeon: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 19/22] drm/amdgpu/atom: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 20/22] drm/i915: " Sam Ravnborg
2020-08-02 11:06 ` [PATCH v1 21/22] drm/omap: display: " Sam Ravnborg
2020-08-02 14:26   ` Sebastian Reichel
2020-08-02 14:32     ` Sam Ravnborg
2020-08-02 22:48       ` Sebastian Reichel
2020-08-02 11:06 ` [PATCH v1 22/22] drm/shmobile: " Sam Ravnborg
2020-08-04 16:51 ` [RFC PATCH v1 0/22] backlight: add init macros and accessors daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202008022254.9UWPo5f5%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jingoohan1@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kbuild-all@lists.01.org \
    --cc=lee.jones@linaro.org \
    --cc=narmstrong@baylibre.com \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git