re: drm/radeon: fixes for r6xx/r7xx gfx init

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

 



Hello Alex Deucher,

The patch d03f5d5971f2: "drm/radeon: fixes for r6xx/r7xx gfx init"
from Feb 19, 2010, leads to the following static checker warning:

	drivers/gpu/drm/radeon/r600_cp.c:885 r600_gfx_init()
	warn: right shifting to zero

drivers/gpu/drm/radeon/r600_cp.c
   879          cc_gc_shader_pipe_config |=
   880                  R600_INACTIVE_SIMDS((R6XX_MAX_SIMDS_MASK << dev_priv->r600_max_simds) & R6XX_MAX_SIMDS_MASK);
   881  
   882          backend_map = r600_get_tile_pipe_to_backend_map(dev_priv->r600_max_tile_pipes,
   883                                                          (R6XX_MAX_BACKENDS -
   884                                                           r600_count_pipe_bits((cc_rb_backend_disable &
   885                                                                                 R6XX_MAX_BACKENDS_MASK) >> 16)),
                                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

R6XX_MAX_BACKENDS_MASK is 0xFF and 0xFF >> 16 is zero.

   886                                                          (cc_rb_backend_disable >> 16));
   887          gb_tiling_config |= R600_BACKEND_MAP(backend_map);
   888  

         -->8|[ snip ]|8<--

  1535          if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV740)
  1536                  backend_map = 0x28;
  1537          else
  1538                  backend_map = r700_get_tile_pipe_to_backend_map(dev_priv,
  1539                                                                  dev_priv->r600_max_tile_pipes,
  1540                                                                  (R7XX_MAX_BACKENDS -
  1541                                                                   r600_count_pipe_bits((cc_rb_backend_disable &
  1542                                                                                         R7XX_MAX_BACKENDS_MASK) >> 16)),
                                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Same thing here.

  1543                                                                  (cc_rb_backend_disable >> 16));


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