lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[agd5f:drm-next 59/92] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:587:49: warning: converting the enum constant to a boolean
tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: eaae0714f4a82df81a60c6aae74c568e8974a716
commit: f4d596654cc62c4f41efc772d62c6ec31d3e102a [59/92] drm/amd/display: Enable DSC over eDP
config: i386-randconfig-r005-20211118 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c46becf500df2a7fb4b4fce16178a036c344315a)
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
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout f4d596654cc62c4f41efc772d62c6ec31d3e102a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:587:49: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT || SIGNAL_TYPE_EDP) {
^
1 warning generated.


vim +587 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c

531
532 bool dm_helpers_submit_i2c(
533 struct dc_context *ctx,
534 const struct dc_link *link,
535 struct i2c_command *cmd)
536 {
537 struct amdgpu_dm_connector *aconnector = link->priv;
538 struct i2c_msg *msgs;
539 int i = 0;
540 int num = cmd->number_of_payloads;
541 bool result;
542
543 if (!aconnector) {
544 DRM_ERROR("Failed to find connector for link!");
545 return false;
546 }
547
548 msgs = kcalloc(num, sizeof(struct i2c_msg), GFP_KERNEL);
549
550 if (!msgs)
551 return false;
552
553 for (i = 0; i < num; i++) {
554 msgs[i].flags = cmd->payloads[i].write ? 0 : I2C_M_RD;
555 msgs[i].addr = cmd->payloads[i].address;
556 msgs[i].len = cmd->payloads[i].length;
557 msgs[i].buf = cmd->payloads[i].data;
558 }
559
560 result = i2c_transfer(&aconnector->i2c->base, msgs, num) == num;
561
562 kfree(msgs);
563
564 return result;
565 }
566 bool dm_helpers_dp_write_dsc_enable(
567 struct dc_context *ctx,
568 const struct dc_stream_state *stream,
569 bool enable)
570 {
571 uint8_t enable_dsc = enable ? 1 : 0;
572 struct amdgpu_dm_connector *aconnector;
573 uint8_t ret = 0;
574
575 if (!stream)
576 return false;
577
578 if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
579 aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
580
581 if (!aconnector->dsc_aux)
582 return false;
583
584 ret = drm_dp_dpcd_write(aconnector->dsc_aux, DP_DSC_ENABLE, &enable_dsc, 1);
585 }
586
> 587 if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT || SIGNAL_TYPE_EDP) {
588 ret = dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
589 DC_LOG_DC("Send DSC %s to sst display\n", enable_dsc ? "enable" : "disable");
590 }
591
592 return (ret > 0);
593 }
594

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-18 21:29    [W:0.041 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site