re: drm/amdgpu: add amdgpu <--> amdkfd gfx7 interface

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

 



Hello Oded Gabbay,

The patch 32c22e994f44: "drm/amdgpu: add amdgpu <--> amdkfd gfx7
interface" from Jun 12, 2015, leads to the following static checker
warning:

	drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c:453 kgd_hqd_destroy()
	warn: bitwise AND condition is false here

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
   439  static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type,
   440                                  unsigned int timeout, uint32_t pipe_id,
   441                                  uint32_t queue_id)
   442  {
   443          struct amdgpu_device *adev = get_amdgpu_device(kgd);
   444          uint32_t temp;
   445  
   446          acquire_queue(kgd, pipe_id, queue_id);
   447          WREG32(mmCP_HQD_PQ_DOORBELL_CONTROL, 0);
   448  
   449          WREG32(mmCP_HQD_DEQUEUE_REQUEST, reset_type);
   450  
   451          while (true) {
   452                  temp = RREG32(mmCP_HQD_ACTIVE);
   453                  if (temp & CP_HQD_ACTIVE__ACTIVE__SHIFT)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Never true.  ANDing against a shift is weird.  A zero shift is sort of
pointless, also.

   454                          break;
   455                  if (timeout == 0) {
   456                          pr_err("kfd: cp queue preemption time out (%dms)\n",
   457                                  temp);
   458                          release_queue(kgd);
   459                          return -ETIME;
   460                  }
   461                  msleep(20);
   462                  timeout -= 20;
   463          }
   464  
   465          release_queue(kgd);
   466          return 0;
   467  }

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux