drm/radeon: fixes for r6xx/r7xx gfx init
Dan Carpenter
dan.carpenter at oracle.com
Fri Feb 7 01:45:51 PST 2014
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
More information about the dri-devel
mailing list