hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/gpu/drm/radeon/r600_cs.c
....@@ -26,7 +26,7 @@
2626 * Jerome Glisse
2727 */
2828 #include <linux/kernel.h>
29
-#include <drm/drmP.h>
29
+
3030 #include "radeon.h"
3131 #include "radeon_asic.h"
3232 #include "r600d.h"
....@@ -350,7 +350,7 @@
350350 static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
351351 {
352352 struct r600_cs_track *track = p->track;
353
- u32 slice_tile_max, size, tmp;
353
+ u32 slice_tile_max, tmp;
354354 u32 height, height_align, pitch, pitch_align, depth_align;
355355 u64 base_offset, base_align;
356356 struct array_mode_checker array_check;
....@@ -360,7 +360,6 @@
360360 /* When resolve is used, the second colorbuffer has always 1 sample. */
361361 unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples;
362362
363
- size = radeon_bo_size(track->cb_color_bo[i]) - track->cb_color_bo_offset[i];
364363 format = G_0280A0_FORMAT(track->cb_color_info[i]);
365364 if (!r600_fmt_is_valid_color(format)) {
366365 dev_warn(p->dev, "%s:%d cb invalid format %d for %d (0x%08X)\n",
....@@ -488,7 +487,7 @@
488487 return -EINVAL;
489488 }
490489 }
491
- /* fall through */
490
+ fallthrough;
492491 case V_0280A0_CLEAR_ENABLE:
493492 {
494493 uint32_t block_max = G_028100_CMASK_BLOCK_MAX(track->cb_color_mask[i]);
....@@ -517,7 +516,7 @@
517516 static int r600_cs_track_validate_db(struct radeon_cs_parser *p)
518517 {
519518 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;
521520 u32 height_align, pitch_align, depth_align;
522521 u32 pitch = 8192;
523522 u32 height = 8192;
....@@ -564,7 +563,6 @@
564563 }
565564 ib[track->db_depth_size_idx] = S_028000_SLICE_TILE_MAX(tmp - 1) | (track->db_depth_size & 0x3FF);
566565 } else {
567
- size = radeon_bo_size(track->db_bo);
568566 /* pitch in pixels */
569567 pitch = (G_028000_PITCH_TILE_MAX(track->db_depth_size) + 1) * 8;
570568 slice_tile_max = G_028000_SLICE_TILE_MAX(track->db_depth_size) + 1;
....@@ -1537,7 +1535,7 @@
15371535 break;
15381536 case V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA:
15391537 is_array = true;
1540
- /* fall through */
1538
+ fallthrough;
15411539 case V_038000_SQ_TEX_DIM_2D_MSAA:
15421540 array_check.nsamples = 1 << llevel;
15431541 llevel = 0;
....@@ -2342,7 +2340,6 @@
23422340 int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
23432341 struct radeon_bo_list **cs_reloc)
23442342 {
2345
- struct radeon_cs_chunk *relocs_chunk;
23462343 unsigned idx;
23472344
23482345 *cs_reloc = NULL;
....@@ -2350,7 +2347,6 @@
23502347 DRM_ERROR("No relocation chunk !\n");
23512348 return -EINVAL;
23522349 }
2353
- relocs_chunk = p->chunk_relocs;
23542350 idx = p->dma_reloc_idx;
23552351 if (idx >= p->nrelocs) {
23562352 DRM_ERROR("Relocs at %d after relocations chunk end %d !\n",