[Intel-gfx] [PATCH v5 3/6] drm/i915/panelreplay: Initializaton and compute config for panel replay
Dan Carpenter
dan.carpenter at linaro.org
Wed Sep 6 09:00:23 UTC 2023
Hi Animesh,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Animesh-Manna/drm-panelreplay-dpcd-register-definition-for-panelreplay/20230905-154811
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link: https://lore.kernel.org/r/20230905073551.958368-4-animesh.manna%40intel.com
patch subject: [Intel-gfx] [PATCH v5 3/6] drm/i915/panelreplay: Initializaton and compute config for panel replay
config: i386-randconfig-141-20230906 (https://download.01.org/0day-ci/archive/20230906/202309060644.uWp5zW4i-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230906/202309060644.uWp5zW4i-lkp@intel.com/reproduce)
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 at intel.com>
| Reported-by: Dan Carpenter <dan.carpenter at linaro.org>
| Closes: https://lore.kernel.org/r/202309060644.uWp5zW4i-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/intel_dp.c:3779 intel_dp_vsc_sdp_pack() warn: was && intended here instead of ||?
vim +3779 drivers/gpu/drm/i915/display/intel_dp.c
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3755 static ssize_t intel_dp_vsc_sdp_pack(const struct drm_dp_vsc_sdp *vsc,
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3756 struct dp_sdp *sdp, size_t size)
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3757 {
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3758 size_t length = sizeof(struct dp_sdp);
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3759
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3760 if (size < length)
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3761 return -ENOSPC;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3762
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3763 memset(sdp, 0, size);
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3764
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3765 /*
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3766 * Prepare VSC Header for SU as per DP 1.4a spec, Table 2-119
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3767 * VSC SDP Header Bytes
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3768 */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3769 sdp->sdp_header.HB0 = 0; /* Secondary-Data Packet ID = 0 */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3770 sdp->sdp_header.HB1 = vsc->sdp_type; /* Secondary-data Packet Type */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3771 sdp->sdp_header.HB2 = vsc->revision; /* Revision Number */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3772 sdp->sdp_header.HB3 = vsc->length; /* Number of Valid Data Bytes */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3773
cafac5a9836199 Gwan-gyeong Mun 2020-05-14 3774 /*
4dd2d4a2ffcae4 Animesh Manna 2023-09-05 3775 * Other than revision 0x5 which supports Pixel Encoding/Colorimetry
4dd2d4a2ffcae4 Animesh Manna 2023-09-05 3776 * Format as per DP 1.4a spec, revision 0x7 also supports Pixel
4dd2d4a2ffcae4 Animesh Manna 2023-09-05 3777 * Encoding/Colorimetry Format as per DP 2.0 spec.
cafac5a9836199 Gwan-gyeong Mun 2020-05-14 3778 */
4dd2d4a2ffcae4 Animesh Manna 2023-09-05 @3779 if (vsc->revision != 0x5 || vsc->revision != 0x7)
This changes the rest of the function into a no-op. Ideally this sort
bug would be caught in testing.
cafac5a9836199 Gwan-gyeong Mun 2020-05-14 3780 goto out;
cafac5a9836199 Gwan-gyeong Mun 2020-05-14 3781
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3782 /* VSC SDP Payload for DB16 through DB18 */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3783 /* Pixel Encoding and Colorimetry Formats */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3784 sdp->db[16] = (vsc->pixelformat & 0xf) << 4; /* DB16[7:4] */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3785 sdp->db[16] |= vsc->colorimetry & 0xf; /* DB16[3:0] */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3786
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3787 switch (vsc->bpc) {
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3788 case 6:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3789 /* 6bpc: 0x0 */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3790 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3791 case 8:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3792 sdp->db[17] = 0x1; /* DB17[3:0] */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3793 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3794 case 10:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3795 sdp->db[17] = 0x2;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3796 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3797 case 12:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3798 sdp->db[17] = 0x3;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3799 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3800 case 16:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3801 sdp->db[17] = 0x4;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3802 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3803 default:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3804 MISSING_CASE(vsc->bpc);
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3805 break;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3806 }
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3807 /* Dynamic Range and Component Bit Depth */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3808 if (vsc->dynamic_range == DP_DYNAMIC_RANGE_CTA)
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3809 sdp->db[17] |= 0x80; /* DB17[7] */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3810
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3811 /* Content Type */
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3812 sdp->db[18] = vsc->content_type & 0x7;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3813
cafac5a9836199 Gwan-gyeong Mun 2020-05-14 3814 out:
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3815 return length;
03c761b00c87d6 Gwan-gyeong Mun 2020-02-11 3816 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list