Re: [PATCH 08/27] drm/i915/pxp: Read register to check hardware session state (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Line 203 is clearly incorrect.  Please check lines 97, 123, and 171 as
well.

julia

---------- Forwarded message ----------
Date: Sun, 15 Nov 2020 01:12:07 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
Subject: Re:  [PATCH 08/27] drm/i915/pxp: Read register to check
    hardware session state

CC: kbuild-all@xxxxxxxxxxxx
In-Reply-To: <20201114014537.25495-8-sean.z.huang@xxxxxxxxx>
References: <20201114014537.25495-8-sean.z.huang@xxxxxxxxx>
TO: Sean Z Huang <sean.z.huang@xxxxxxxxx>
TO: Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
CC: "Huang, Sean Z" <sean.z.huang@xxxxxxxxx>

Hi Sean,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20201113]
[also build test WARNING on v5.10-rc3]
[cannot apply to drm-intel/for-linux-next char-misc/char-misc-testing v5.10-rc3 v5.10-rc2 v5.10-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sean-Z-Huang/drm-i915-pxp-Introduce-Intel-PXP-component/20201114-094926
base:    92edc4aef86780a8ad01b092c6d6630bb3cb423d
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: i386-randconfig-c001-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>


"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/gpu/drm/i915/pxp/intel_pxp_sm.c:203:17-20: ERROR: i915 is NULL but dereferenced.
   drivers/gpu/drm/i915/pxp/intel_pxp_sm.c:97:17-20: ERROR: i915 is NULL but dereferenced.
   drivers/gpu/drm/i915/pxp/intel_pxp_sm.c:123:17-20: ERROR: i915 is NULL but dereferenced.
   drivers/gpu/drm/i915/pxp/intel_pxp_sm.c:171:17-20: ERROR: i915 is NULL but dereferenced.

vim +203 drivers/gpu/drm/i915/pxp/intel_pxp_sm.c

c0c82470e52f958 Huang, Sean Z 2020-11-13  188
c0c82470e52f958 Huang, Sean Z 2020-11-13  189  /**
c0c82470e52f958 Huang, Sean Z 2020-11-13  190   * check_if_protected_type0_sessions_are_attacked - To check if type0 active sessions are attacked.
c0c82470e52f958 Huang, Sean Z 2020-11-13  191   * @i915: i915 device handle.
c0c82470e52f958 Huang, Sean Z 2020-11-13  192   *
c0c82470e52f958 Huang, Sean Z 2020-11-13  193   * Return: true if HW shows protected sessions are attacked, false otherwise.
c0c82470e52f958 Huang, Sean Z 2020-11-13  194   */
c0c82470e52f958 Huang, Sean Z 2020-11-13  195  static bool check_if_protected_type0_sessions_are_attacked(struct drm_i915_private *i915)
c0c82470e52f958 Huang, Sean Z 2020-11-13  196  {
c0c82470e52f958 Huang, Sean Z 2020-11-13  197  	i915_reg_t kcr_status_reg = KCR_STATUS_1;
c0c82470e52f958 Huang, Sean Z 2020-11-13  198  	u32 reg_value = 0;
c0c82470e52f958 Huang, Sean Z 2020-11-13  199  	u32 mask = 0x80000000;
c0c82470e52f958 Huang, Sean Z 2020-11-13  200  	int ret;
c0c82470e52f958 Huang, Sean Z 2020-11-13  201
c0c82470e52f958 Huang, Sean Z 2020-11-13  202  	if (!i915) {
c0c82470e52f958 Huang, Sean Z 2020-11-13 @203  		drm_dbg(&i915->drm, "Failed to %s, bad params\n", __func__);
c0c82470e52f958 Huang, Sean Z 2020-11-13  204  		goto end;
c0c82470e52f958 Huang, Sean Z 2020-11-13  205  	}
c0c82470e52f958 Huang, Sean Z 2020-11-13  206
c0c82470e52f958 Huang, Sean Z 2020-11-13  207  	if (i915->pxp.r0ctx->global_state_attacked)
c0c82470e52f958 Huang, Sean Z 2020-11-13  208  		return true;
c0c82470e52f958 Huang, Sean Z 2020-11-13  209
c0c82470e52f958 Huang, Sean Z 2020-11-13  210  	ret = pxp_sm_reg_read(i915, kcr_status_reg.reg, &reg_value);
c0c82470e52f958 Huang, Sean Z 2020-11-13  211  	if (ret) {
c0c82470e52f958 Huang, Sean Z 2020-11-13  212  		drm_dbg(&i915->drm, "Failed to pxp_sm_reg_read\n");
c0c82470e52f958 Huang, Sean Z 2020-11-13  213  		goto end;
c0c82470e52f958 Huang, Sean Z 2020-11-13  214  	}
c0c82470e52f958 Huang, Sean Z 2020-11-13  215
c0c82470e52f958 Huang, Sean Z 2020-11-13  216  	if (reg_value & mask)
c0c82470e52f958 Huang, Sean Z 2020-11-13  217  		return true;
c0c82470e52f958 Huang, Sean Z 2020-11-13  218  end:
c0c82470e52f958 Huang, Sean Z 2020-11-13  219  	return false;
c0c82470e52f958 Huang, Sean Z 2020-11-13  220  }
c0c82470e52f958 Huang, Sean Z 2020-11-13  221

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux