isl: Drop unused isl_surf_init_info::min_pitch
authorChad Versace <chadversary@chromium.org>
Fri, 10 Mar 2017 21:58:13 +0000 (13:58 -0800)
committerChad Versace <chadversary@chromium.org>
Tue, 28 Mar 2017 16:44:44 +0000 (09:44 -0700)
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl.c
src/intel/isl/isl.h

index 98a1152c282ddffecee8295db22703486329e961..c7072d09025990a9fb84713e134279e5c36bd724 100644 (file)
@@ -1043,11 +1043,7 @@ isl_calc_linear_min_row_pitch(const struct isl_device *dev,
 
    assert(phys_slice0_sa->w % fmtl->bw == 0);
 
-   uint32_t min_row_pitch = bs * (phys_slice0_sa->w / fmtl->bw);
-   min_row_pitch = MAX2(min_row_pitch, info->min_pitch);
-   min_row_pitch = isl_align_npot(min_row_pitch, alignment);
-
-   return min_row_pitch;
+   return isl_align_npot(bs * (phys_slice0_sa->w / fmtl->bw), alignment);
 }
 
 static uint32_t
@@ -1068,11 +1064,8 @@ isl_calc_tiled_min_row_pitch(const struct isl_device *dev,
       isl_align_div(total_w_el * tile_el_scale,
                     tile_info->logical_extent_el.width);
 
-   uint32_t min_row_pitch = total_w_tl * tile_info->phys_extent_B.width;
-   min_row_pitch = MAX2(min_row_pitch, surf_info->min_pitch);
-   min_row_pitch = isl_align_npot(min_row_pitch, alignment);
-
-   return min_row_pitch;
+   assert(alignment == tile_info->phys_extent_B.width);
+   return total_w_tl * tile_info->phys_extent_B.width;
 }
 
 static uint32_t
index 012be7b98e7a442c5b02a469fb845fbb4dd22709..17b52cf2f4f6446220f64c8470a657b6f006f16b 100644 (file)
@@ -810,9 +810,6 @@ struct isl_surf_init_info {
    /** Lower bound for isl_surf::alignment, in bytes. */
    uint32_t min_alignment;
 
-   /** Lower bound for isl_surf::pitch, in bytes. */
-   uint32_t min_pitch;
-
    /**
     * Exact value for isl_surf::row_pitch. Ignored if zero.  isl_surf_init()
     * will fail if this is misaligned or out of bounds.