mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mikita Lipski <mikita.lipski@amd.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Alex Deucher <alexander.deucher@amd.com>,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
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
Date: Fri, 19 Nov 2021 04:28:16 +0800	[thread overview]
Message-ID: <202111190405.PHKHC3iu-lkp@intel.com> (raw)

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

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

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

                 reply	other threads:[~2021-11-18 20:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202111190405.PHKHC3iu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mikita.lipski@amd.com \
    /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®