From: kbuild test robot <lkp@intel.com>
To: Douglas Anderson <dianders@chromium.org>
Cc: kbuild-all@lists.01.org, Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
robdclark@chromium.org, Jernej Skrabec <jernej.skrabec@siol.net>,
Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org, Jonas Karlman <jonas@kwiboo.se>,
Douglas Anderson <dianders@chromium.org>,
dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org,
seanpaul@chromium.org,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 9/9] drm/bridge: ti-sn65dsi86: Avoid invalid rates
Date: Sat, 21 Dec 2019 21:56:47 +0800 [thread overview]
Message-ID: <201912212109.ehZOyrlG%lkp@intel.com> (raw)
In-Reply-To: <20191217164702.v2.9.Ib59207b66db377380d13748752d6fce5596462c5@changeid>
[-- Attachment #1: Type: text/plain, Size: 4665 bytes --]
Hi Douglas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.5-rc2 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Anderson/drm-bridge-ti-sn65dsi86-Improve-support-for-AUO-B116XAK01-other-DP/20191221-083448
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e0165b2f1a912a06e381e91f0f4e495f4ac3736
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'ti_sn_bridge_enable':
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c:543:18: warning: 'rate_valid' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (rate_valid[i])
~~~~~~~~~~^~~
vim +/rate_valid +543 drivers/gpu/drm/bridge/ti-sn65dsi86.c
477
478 static void ti_sn_bridge_read_valid_rates(struct ti_sn_bridge *pdata,
479 bool rate_valid[])
480 {
481 u8 dpcd_val;
482 int rate_times_200khz;
483 int ret;
484 int i;
485
486 ret = drm_dp_dpcd_readb(&pdata->aux, DP_EDP_DPCD_REV, &dpcd_val);
487 if (ret != 1) {
488 DRM_DEV_ERROR(pdata->dev,
489 "Can't read eDP rev (%d), assuming 1.1\n", ret);
490 dpcd_val = DP_EDP_11;
491 }
492
493 if (dpcd_val >= DP_EDP_14) {
494 /* eDP 1.4 devices must provide a custom table */
495 __le16 sink_rates[DP_MAX_SUPPORTED_RATES];
496
497 ret = drm_dp_dpcd_read(&pdata->aux, DP_SUPPORTED_LINK_RATES,
498 sink_rates, sizeof(sink_rates));
499
500 if (ret != sizeof(sink_rates)) {
501 DRM_DEV_ERROR(pdata->dev,
502 "Can't read supported rate table (%d)\n", ret);
503
504 /* By zeroing we'll fall back to DP_MAX_LINK_RATE. */
505 memset(sink_rates, 0, sizeof(sink_rates));
506 }
507
508 for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
509 rate_times_200khz = le16_to_cpu(sink_rates[i]);
510
511 if (!rate_times_200khz)
512 break;
513
514 switch (rate_times_200khz) {
515 case 27000:
516 rate_valid[7] = 1;
517 break;
518 case 21600:
519 rate_valid[6] = 1;
520 break;
521 case 16200:
522 rate_valid[5] = 1;
523 break;
524 case 13500:
525 rate_valid[4] = 1;
526 break;
527 case 12150:
528 rate_valid[3] = 1;
529 break;
530 case 10800:
531 rate_valid[2] = 1;
532 break;
533 case 8100:
534 rate_valid[1] = 1;
535 break;
536 default:
537 /* unsupported */
538 break;
539 }
540 }
541
542 for (i = 0; i < ARRAY_SIZE(ti_sn_bridge_dp_rate_lut); i++) {
> 543 if (rate_valid[i])
544 return;
545 }
546 DRM_DEV_ERROR(pdata->dev,
547 "No matching eDP rates in table; falling back\n");
548 }
549
550 /* On older versions best we can do is use DP_MAX_LINK_RATE */
551 ret = drm_dp_dpcd_readb(&pdata->aux, DP_MAX_LINK_RATE, &dpcd_val);
552 if (ret != 1) {
553 DRM_DEV_ERROR(pdata->dev,
554 "Can't read max rate (%d); assuming 5.4 GHz\n",
555 ret);
556 dpcd_val = DP_LINK_BW_5_4;
557 }
558
559 switch (dpcd_val) {
560 default:
561 DRM_DEV_ERROR(pdata->dev,
562 "Unexpected max rate (%#x); assuming 5.4 GHz\n",
563 (int)dpcd_val);
564 /* fall through */
565 case DP_LINK_BW_5_4:
566 rate_valid[7] = 1;
567 /* fall through */
568 case DP_LINK_BW_2_7:
569 rate_valid[4] = 1;
570 /* fall through */
571 case DP_LINK_BW_1_62:
572 rate_valid[1] = 1;
573 break;
574 }
575 }
576
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52817 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Douglas Anderson <dianders@chromium.org>
Cc: robdclark@chromium.org, Jernej Skrabec <jernej.skrabec@siol.net>,
kbuild-all@lists.01.org, Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org,
Neil Armstrong <narmstrong@baylibre.com>,
Douglas Anderson <dianders@chromium.org>,
dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org,
Jonas Karlman <jonas@kwiboo.se>,
seanpaul@chromium.org,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 9/9] drm/bridge: ti-sn65dsi86: Avoid invalid rates
Date: Sat, 21 Dec 2019 21:56:47 +0800 [thread overview]
Message-ID: <201912212109.ehZOyrlG%lkp@intel.com> (raw)
In-Reply-To: <20191217164702.v2.9.Ib59207b66db377380d13748752d6fce5596462c5@changeid>
[-- Attachment #1: Type: text/plain, Size: 4665 bytes --]
Hi Douglas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.5-rc2 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Anderson/drm-bridge-ti-sn65dsi86-Improve-support-for-AUO-B116XAK01-other-DP/20191221-083448
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e0165b2f1a912a06e381e91f0f4e495f4ac3736
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'ti_sn_bridge_enable':
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c:543:18: warning: 'rate_valid' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (rate_valid[i])
~~~~~~~~~~^~~
vim +/rate_valid +543 drivers/gpu/drm/bridge/ti-sn65dsi86.c
477
478 static void ti_sn_bridge_read_valid_rates(struct ti_sn_bridge *pdata,
479 bool rate_valid[])
480 {
481 u8 dpcd_val;
482 int rate_times_200khz;
483 int ret;
484 int i;
485
486 ret = drm_dp_dpcd_readb(&pdata->aux, DP_EDP_DPCD_REV, &dpcd_val);
487 if (ret != 1) {
488 DRM_DEV_ERROR(pdata->dev,
489 "Can't read eDP rev (%d), assuming 1.1\n", ret);
490 dpcd_val = DP_EDP_11;
491 }
492
493 if (dpcd_val >= DP_EDP_14) {
494 /* eDP 1.4 devices must provide a custom table */
495 __le16 sink_rates[DP_MAX_SUPPORTED_RATES];
496
497 ret = drm_dp_dpcd_read(&pdata->aux, DP_SUPPORTED_LINK_RATES,
498 sink_rates, sizeof(sink_rates));
499
500 if (ret != sizeof(sink_rates)) {
501 DRM_DEV_ERROR(pdata->dev,
502 "Can't read supported rate table (%d)\n", ret);
503
504 /* By zeroing we'll fall back to DP_MAX_LINK_RATE. */
505 memset(sink_rates, 0, sizeof(sink_rates));
506 }
507
508 for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
509 rate_times_200khz = le16_to_cpu(sink_rates[i]);
510
511 if (!rate_times_200khz)
512 break;
513
514 switch (rate_times_200khz) {
515 case 27000:
516 rate_valid[7] = 1;
517 break;
518 case 21600:
519 rate_valid[6] = 1;
520 break;
521 case 16200:
522 rate_valid[5] = 1;
523 break;
524 case 13500:
525 rate_valid[4] = 1;
526 break;
527 case 12150:
528 rate_valid[3] = 1;
529 break;
530 case 10800:
531 rate_valid[2] = 1;
532 break;
533 case 8100:
534 rate_valid[1] = 1;
535 break;
536 default:
537 /* unsupported */
538 break;
539 }
540 }
541
542 for (i = 0; i < ARRAY_SIZE(ti_sn_bridge_dp_rate_lut); i++) {
> 543 if (rate_valid[i])
544 return;
545 }
546 DRM_DEV_ERROR(pdata->dev,
547 "No matching eDP rates in table; falling back\n");
548 }
549
550 /* On older versions best we can do is use DP_MAX_LINK_RATE */
551 ret = drm_dp_dpcd_readb(&pdata->aux, DP_MAX_LINK_RATE, &dpcd_val);
552 if (ret != 1) {
553 DRM_DEV_ERROR(pdata->dev,
554 "Can't read max rate (%d); assuming 5.4 GHz\n",
555 ret);
556 dpcd_val = DP_LINK_BW_5_4;
557 }
558
559 switch (dpcd_val) {
560 default:
561 DRM_DEV_ERROR(pdata->dev,
562 "Unexpected max rate (%#x); assuming 5.4 GHz\n",
563 (int)dpcd_val);
564 /* fall through */
565 case DP_LINK_BW_5_4:
566 rate_valid[7] = 1;
567 /* fall through */
568 case DP_LINK_BW_2_7:
569 rate_valid[4] = 1;
570 /* fall through */
571 case DP_LINK_BW_1_62:
572 rate_valid[1] = 1;
573 break;
574 }
575 }
576
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52817 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
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 9/9] drm/bridge: ti-sn65dsi86: Avoid invalid rates
Date: Sat, 21 Dec 2019 21:56:47 +0800 [thread overview]
Message-ID: <201912212109.ehZOyrlG%lkp@intel.com> (raw)
In-Reply-To: <20191217164702.v2.9.Ib59207b66db377380d13748752d6fce5596462c5@changeid>
[-- Attachment #1: Type: text/plain, Size: 4806 bytes --]
Hi Douglas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.5-rc2 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Douglas-Anderson/drm-bridge-ti-sn65dsi86-Improve-support-for-AUO-B116XAK01-other-DP/20191221-083448
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7e0165b2f1a912a06e381e91f0f4e495f4ac3736
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'ti_sn_bridge_enable':
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c:543:18: warning: 'rate_valid' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (rate_valid[i])
~~~~~~~~~~^~~
vim +/rate_valid +543 drivers/gpu/drm/bridge/ti-sn65dsi86.c
477
478 static void ti_sn_bridge_read_valid_rates(struct ti_sn_bridge *pdata,
479 bool rate_valid[])
480 {
481 u8 dpcd_val;
482 int rate_times_200khz;
483 int ret;
484 int i;
485
486 ret = drm_dp_dpcd_readb(&pdata->aux, DP_EDP_DPCD_REV, &dpcd_val);
487 if (ret != 1) {
488 DRM_DEV_ERROR(pdata->dev,
489 "Can't read eDP rev (%d), assuming 1.1\n", ret);
490 dpcd_val = DP_EDP_11;
491 }
492
493 if (dpcd_val >= DP_EDP_14) {
494 /* eDP 1.4 devices must provide a custom table */
495 __le16 sink_rates[DP_MAX_SUPPORTED_RATES];
496
497 ret = drm_dp_dpcd_read(&pdata->aux, DP_SUPPORTED_LINK_RATES,
498 sink_rates, sizeof(sink_rates));
499
500 if (ret != sizeof(sink_rates)) {
501 DRM_DEV_ERROR(pdata->dev,
502 "Can't read supported rate table (%d)\n", ret);
503
504 /* By zeroing we'll fall back to DP_MAX_LINK_RATE. */
505 memset(sink_rates, 0, sizeof(sink_rates));
506 }
507
508 for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
509 rate_times_200khz = le16_to_cpu(sink_rates[i]);
510
511 if (!rate_times_200khz)
512 break;
513
514 switch (rate_times_200khz) {
515 case 27000:
516 rate_valid[7] = 1;
517 break;
518 case 21600:
519 rate_valid[6] = 1;
520 break;
521 case 16200:
522 rate_valid[5] = 1;
523 break;
524 case 13500:
525 rate_valid[4] = 1;
526 break;
527 case 12150:
528 rate_valid[3] = 1;
529 break;
530 case 10800:
531 rate_valid[2] = 1;
532 break;
533 case 8100:
534 rate_valid[1] = 1;
535 break;
536 default:
537 /* unsupported */
538 break;
539 }
540 }
541
542 for (i = 0; i < ARRAY_SIZE(ti_sn_bridge_dp_rate_lut); i++) {
> 543 if (rate_valid[i])
544 return;
545 }
546 DRM_DEV_ERROR(pdata->dev,
547 "No matching eDP rates in table; falling back\n");
548 }
549
550 /* On older versions best we can do is use DP_MAX_LINK_RATE */
551 ret = drm_dp_dpcd_readb(&pdata->aux, DP_MAX_LINK_RATE, &dpcd_val);
552 if (ret != 1) {
553 DRM_DEV_ERROR(pdata->dev,
554 "Can't read max rate (%d); assuming 5.4 GHz\n",
555 ret);
556 dpcd_val = DP_LINK_BW_5_4;
557 }
558
559 switch (dpcd_val) {
560 default:
561 DRM_DEV_ERROR(pdata->dev,
562 "Unexpected max rate (%#x); assuming 5.4 GHz\n",
563 (int)dpcd_val);
564 /* fall through */
565 case DP_LINK_BW_5_4:
566 rate_valid[7] = 1;
567 /* fall through */
568 case DP_LINK_BW_2_7:
569 rate_valid[4] = 1;
570 /* fall through */
571 case DP_LINK_BW_1_62:
572 rate_valid[1] = 1;
573 break;
574 }
575 }
576
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 52817 bytes --]
next prev parent reply other threads:[~2019-12-21 13:57 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 0:47 [PATCH v2 0/9] drm/bridge: ti-sn65dsi86: Improve support for AUO B116XAK01 + other DP Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 1/9] drm/bridge: ti-sn65dsi86: Split the setting of the dp and dsi rates Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 2/9] drm/bridge: ti-sn65dsi86: zero is never greater than an unsigned int Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 3/9] drm/bridge: ti-sn65dsi86: Don't use MIPI variables for DP link Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 4/9] drm/bridge: ti-sn65dsi86: Config number of DP lanes Mo' Betta Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 5/9] drm/bridge: ti-sn65dsi86: Read num lanes from the DP sink Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 6/9] drm/bridge: ti-sn65dsi86: Use 18-bit DP if we can Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 7/9] drm/bridge: ti-sn65dsi86: Group DP link training bits in a function Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 8/9] drm/bridge: ti-sn65dsi86: Train at faster rates if slower ones fail Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 0:47 ` [PATCH v2 9/9] drm/bridge: ti-sn65dsi86: Avoid invalid rates Douglas Anderson
2019-12-18 0:47 ` Douglas Anderson
2019-12-18 4:01 ` Rob Clark
2019-12-18 4:01 ` Rob Clark
2019-12-18 4:03 ` Rob Clark
2019-12-18 4:03 ` Rob Clark
2019-12-18 22:41 ` Doug Anderson
2019-12-18 22:41 ` Doug Anderson
2019-12-21 13:56 ` kbuild test robot [this message]
2019-12-21 13:56 ` kbuild test robot
2019-12-21 13:56 ` kbuild test robot
2020-01-06 22:43 ` Doug Anderson
2020-01-06 22:43 ` Doug Anderson
2020-01-06 22:43 ` Doug Anderson
2020-01-07 0:55 ` [kbuild-all] " Rong Chen
2020-01-07 0:55 ` Rong Chen
2020-01-07 0:55 ` [kbuild-all] " Rong Chen
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=201912212109.ehZOyrlG%lkp@intel.com \
--to=lkp@intel.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=robdclark@chromium.org \
--cc=seanpaul@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.