.. | .. |
---|
26 | 26 | * Jerome Glisse |
---|
27 | 27 | */ |
---|
28 | 28 | #include <linux/kernel.h> |
---|
29 | | -#include <drm/drmP.h> |
---|
| 29 | + |
---|
30 | 30 | #include "radeon.h" |
---|
31 | 31 | #include "radeon_asic.h" |
---|
32 | 32 | #include "r600d.h" |
---|
.. | .. |
---|
350 | 350 | static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i) |
---|
351 | 351 | { |
---|
352 | 352 | struct r600_cs_track *track = p->track; |
---|
353 | | - u32 slice_tile_max, size, tmp; |
---|
| 353 | + u32 slice_tile_max, tmp; |
---|
354 | 354 | u32 height, height_align, pitch, pitch_align, depth_align; |
---|
355 | 355 | u64 base_offset, base_align; |
---|
356 | 356 | struct array_mode_checker array_check; |
---|
.. | .. |
---|
360 | 360 | /* When resolve is used, the second colorbuffer has always 1 sample. */ |
---|
361 | 361 | unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples; |
---|
362 | 362 | |
---|
363 | | - size = radeon_bo_size(track->cb_color_bo[i]) - track->cb_color_bo_offset[i]; |
---|
364 | 363 | format = G_0280A0_FORMAT(track->cb_color_info[i]); |
---|
365 | 364 | if (!r600_fmt_is_valid_color(format)) { |
---|
366 | 365 | dev_warn(p->dev, "%s:%d cb invalid format %d for %d (0x%08X)\n", |
---|
.. | .. |
---|
488 | 487 | return -EINVAL; |
---|
489 | 488 | } |
---|
490 | 489 | } |
---|
491 | | - /* fall through */ |
---|
| 490 | + fallthrough; |
---|
492 | 491 | case V_0280A0_CLEAR_ENABLE: |
---|
493 | 492 | { |
---|
494 | 493 | uint32_t block_max = G_028100_CMASK_BLOCK_MAX(track->cb_color_mask[i]); |
---|
.. | .. |
---|
517 | 516 | static int r600_cs_track_validate_db(struct radeon_cs_parser *p) |
---|
518 | 517 | { |
---|
519 | 518 | struct r600_cs_track *track = p->track; |
---|
520 | | - u32 nviews, bpe, ntiles, size, slice_tile_max, tmp; |
---|
| 519 | + u32 nviews, bpe, ntiles, slice_tile_max, tmp; |
---|
521 | 520 | u32 height_align, pitch_align, depth_align; |
---|
522 | 521 | u32 pitch = 8192; |
---|
523 | 522 | u32 height = 8192; |
---|
.. | .. |
---|
564 | 563 | } |
---|
565 | 564 | ib[track->db_depth_size_idx] = S_028000_SLICE_TILE_MAX(tmp - 1) | (track->db_depth_size & 0x3FF); |
---|
566 | 565 | } else { |
---|
567 | | - size = radeon_bo_size(track->db_bo); |
---|
568 | 566 | /* pitch in pixels */ |
---|
569 | 567 | pitch = (G_028000_PITCH_TILE_MAX(track->db_depth_size) + 1) * 8; |
---|
570 | 568 | slice_tile_max = G_028000_SLICE_TILE_MAX(track->db_depth_size) + 1; |
---|
.. | .. |
---|
1537 | 1535 | break; |
---|
1538 | 1536 | case V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA: |
---|
1539 | 1537 | is_array = true; |
---|
1540 | | - /* fall through */ |
---|
| 1538 | + fallthrough; |
---|
1541 | 1539 | case V_038000_SQ_TEX_DIM_2D_MSAA: |
---|
1542 | 1540 | array_check.nsamples = 1 << llevel; |
---|
1543 | 1541 | llevel = 0; |
---|
.. | .. |
---|
2342 | 2340 | int r600_dma_cs_next_reloc(struct radeon_cs_parser *p, |
---|
2343 | 2341 | struct radeon_bo_list **cs_reloc) |
---|
2344 | 2342 | { |
---|
2345 | | - struct radeon_cs_chunk *relocs_chunk; |
---|
2346 | 2343 | unsigned idx; |
---|
2347 | 2344 | |
---|
2348 | 2345 | *cs_reloc = NULL; |
---|
.. | .. |
---|
2350 | 2347 | DRM_ERROR("No relocation chunk !\n"); |
---|
2351 | 2348 | return -EINVAL; |
---|
2352 | 2349 | } |
---|
2353 | | - relocs_chunk = p->chunk_relocs; |
---|
2354 | 2350 | idx = p->dma_reloc_idx; |
---|
2355 | 2351 | if (idx >= p->nrelocs) { |
---|
2356 | 2352 | DRM_ERROR("Relocs at %d after relocations chunk end %d !\n", |
---|