mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Rob Herring <robh+dt@kernel.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: kbuild-all@lists.01.org, Marek Vasut <marex@denx.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] drm: bridge: Add TI SN65DSI83/84/85 DSI to LVDS bridge
Date: Mon, 15 Feb 2021 02:43:29 +0800	[thread overview]
Message-ID: <202102150240.xQlxaawa-lkp@intel.com> (raw)
In-Reply-To: <20210214174453.104616-2-jagan@amarulasolutions.com>

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

Hi Jagan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.11-rc7 next-20210212]
[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/Jagan-Teki/dt-bindings-display-bridge-Add-bindings-for-SN65DSI83-84-85/20210215-014714
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-randconfig-m021-20210215 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

New smatch warnings:
drivers/gpu/drm/bridge/ti-sn65dsi8x.c:193 sn65dsi_enable() warn: unsigned 'val' is never less than zero.
drivers/gpu/drm/bridge/ti-sn65dsi8x.c:422 sn65dsi_probe() error: uninitialized symbol 'ret'.

Old smatch warnings:
drivers/gpu/drm/bridge/ti-sn65dsi8x.c:214 sn65dsi_enable() warn: unsigned 'val' is never less than zero.

vim +/val +193 drivers/gpu/drm/bridge/ti-sn65dsi8x.c

   170	
   171	static void sn65dsi_enable(struct drm_bridge *bridge)
   172	{
   173		struct sn65dsi *sn = bridge_to_sn65dsi(bridge);
   174		struct drm_display_mode *mode = bridge_to_mode(bridge);
   175		int bpp = mipi_dsi_pixel_format_to_bpp(sn->dsi->format);
   176		unsigned int lanes = sn->dsi->lanes;
   177		unsigned int pixel_clk = mode->clock * 1000;
   178		unsigned int dsi_clk = pixel_clk * bpp / (lanes * 2);
   179		unsigned int val;
   180	
   181		/* reset SOFT_RESET bit */
   182		regmap_write(sn->regmap, SN65DSI_SOFT_RESET, 0x0);
   183	
   184		msleep(10);
   185	
   186		/* reset PLL_EN bit */
   187		regmap_write(sn->regmap, SN65DSI_CLK_PLL, 0x0);
   188	
   189		msleep(10);
   190	
   191		/* setup lvds clock */
   192		val = sn65dsi_get_clk_range(0, 5, pixel_clk, 25000000, 25000000);
 > 193		if (val < 0) {
   194			DRM_DEV_ERROR(sn->dev, "invalid LVDS clock range %d\n", val);
   195			return;
   196		}
   197	
   198		regmap_update_bits(sn->regmap, SN65DSI_LVDS_CLK,
   199				   LVDS_CLK_RANGE_MASK, val << LVDS_CLK_RANGE_SHIFT);
   200	
   201		regmap_update_bits(sn->regmap, SN65DSI_LVDS_CLK, HS_CLK_SRC, HS_CLK_SRC);
   202	
   203		/* setup bridge clock divider */
   204		val = (dsi_clk / pixel_clk) - 1;
   205		regmap_update_bits(sn->regmap, SN65DSI_CLK_DIV,
   206				   DSI_CLK_DIV_MASK, val << DSI_CLK_DIV_SHIFT);
   207	
   208		/* configure dsi */
   209		regmap_update_bits(sn->regmap, SN65DSI_DSI_CFG,
   210				   CHA_DSI_LANES_MASK, lanes << CHA_DSI_LANES_SHIFT);
   211	
   212		/* dsi clock range */
   213		val = sn65dsi_get_clk_range(8, 100, dsi_clk, 40000000, 5000000);
   214		if (val < 0) {
   215			DRM_DEV_ERROR(sn->dev, "invalid DSI clock range %d\n", val);
   216			return;
   217		}
   218	
   219		regmap_write(sn->regmap, SN65DSI_DSI_CLK_RANGE, val);
   220	
   221		/* setup lvds modes */
   222		regmap_read(sn->regmap, SN65DSI_LVDS_MODE, &val);
   223		if (mode->flags & DRM_MODE_FLAG_PVSYNC)
   224			val |= VS_NEG_POLARITY;
   225		if (mode->flags & DRM_MODE_FLAG_PHSYNC)
   226			val |= HS_NEG_POLARITY;
   227		if (bpp == 24) /* Channel A mode */
   228			val |= CHA_24BPP_MODE;
   229		regmap_write(sn->regmap, SN65DSI_LVDS_MODE, val);
   230	
   231		/* TODO Channel B is not configure yet */
   232		sn65dsi_configure_cha(sn, mode);
   233	
   234		/* set PLL_EN bit */
   235		regmap_write(sn->regmap, SN65DSI_CLK_PLL, PLL_EN);
   236	
   237		msleep(10);
   238	
   239		/* set SOFT_RESET bit */
   240		regmap_write(sn->regmap, SN65DSI_SOFT_RESET, SOFT_RESET);
   241	
   242		msleep(10);
   243	}
   244	

---
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: 38025 bytes --]

  reply	other threads:[~2021-02-14 18:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 17:44 [PATCH v3 1/2] dt-bindings: display: bridge: Add bindings for SN65DSI83/84/85 Jagan Teki
2021-02-14 17:44 ` [PATCH v3 2/2] drm: bridge: Add TI SN65DSI83/84/85 DSI to LVDS bridge Jagan Teki
2021-02-14 18:43   ` kernel test robot [this message]
2021-03-05 21:51   ` Marek Vasut
2021-03-24 13:21   ` Claudius Heine
2021-02-15  9:02 ` [PATCH v3 1/2] dt-bindings: display: bridge: Add bindings for SN65DSI83/84/85 Neil Armstrong
2021-02-15 11:25   ` Jagan Teki
2021-02-15 16:49     ` Neil Armstrong
2021-03-05 21:36 ` Rob Herring
2021-03-05 21:43 ` Marek Vasut
2021-03-24 13:56 ` Claudius Heine
2021-04-07 10:04   ` ch
2021-04-08 14:45   ` Jagan Teki
2021-04-21 22:34     ` Marek Vasut
2021-04-22  8:10       ` Jagan Teki

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=202102150240.xQlxaawa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.org \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®