drivers/gpu/drm/i915/display/intel_ddi.c:2225:7-13: opportunity for str_enabled_disabled(enable) (fwd)
From: Julia Lawall
Date: Mon Oct 07 2024 - 06:24:44 EST
---------- Forwarded message ----------
Date: Mon, 7 Oct 2024 17:01:39 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: oe-kbuild@xxxxxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
Subject: drivers/gpu/drm/i915/display/intel_ddi.c:2225:7-13: opportunity for
str_enabled_disabled(enable)
BCC: lkp@xxxxxxxxx
CC: oe-kbuild-all@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
TO: Imre Deak <imre.deak@xxxxxxxxx>
CC: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
commit: 8ab5a03643fc529f0e8663bc4d5b43f8f6885922 drm/i915/dp: Disable FEC ready flag in the sink
date: 11 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 11 months ago
config: x86_64-randconfig-102-20241007 (https://download.01.org/0day-ci/archive/20241007/202410071601.TFpXoqgW-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
| Closes: https://lore.kernel.org/r/202410071601.TFpXoqgW-lkp@xxxxxxxxx/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/display/intel_ddi.c:2225:7-13: opportunity for str_enabled_disabled(enable)
vim +2225 drivers/gpu/drm/i915/display/intel_ddi.c
1639406a31c23ca drivers/gpu/drm/i915/display/intel_ddi.c Manasi Navare 2021-01-22 2212
a322b97589a6af4 drivers/gpu/drm/i915/intel_ddi.c Anusha Srivatsa 2018-11-28 2213 static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2214 const struct intel_crtc_state *crtc_state,
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2215 bool enable)
a322b97589a6af4 drivers/gpu/drm/i915/intel_ddi.c Anusha Srivatsa 2018-11-28 2216 {
47bdb1caba0bc5a drivers/gpu/drm/i915/display/intel_ddi.c Jani Nikula 2020-03-20 2217 struct drm_i915_private *i915 = dp_to_i915(intel_dp);
47bdb1caba0bc5a drivers/gpu/drm/i915/display/intel_ddi.c Jani Nikula 2020-03-20 2218
a322b97589a6af4 drivers/gpu/drm/i915/intel_ddi.c Anusha Srivatsa 2018-11-28 2219 if (!crtc_state->fec_enable)
a322b97589a6af4 drivers/gpu/drm/i915/intel_ddi.c Anusha Srivatsa 2018-11-28 2220 return;
a322b97589a6af4 drivers/gpu/drm/i915/intel_ddi.c Anusha Srivatsa 2018-11-28 2221
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2222 if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_CONFIGURATION,
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2223 enable ? DP_FEC_READY : 0) <= 0)
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2224 drm_dbg_kms(&i915->drm, "Failed to set FEC_READY to %s in the sink\n",
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 @2225 enable ? "enabled" : "disabled");
6e916b35afa8a37 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2226
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2227 if (enable &&
8ab5a03643fc529 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2228 drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_STATUS,
6e916b35afa8a37 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2229 DP_FEC_DECODE_EN_DETECTED | DP_FEC_DECODE_DIS_DETECTED) <= 0)
6e916b35afa8a37 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2230 drm_dbg_kms(&i915->drm, "Failed to clear FEC detected flags\n");
6e916b35afa8a37 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2231 }
6e916b35afa8a37 drivers/gpu/drm/i915/display/intel_ddi.c Imre Deak 2023-10-24 2232
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki