diff --git a/.pick_status.json b/.pick_status.json index 4338231d31d..2673d990024 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -301,7 +301,7 @@ "description": "panfrost: Relax the stride check when importing resources", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "051d62cf041054bf0fdbd0ae5d2160d1b02e0203" }, diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index b42efa68af1..bb4f78cab35 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -625,20 +625,15 @@ pan_image_layout_init(const struct panfrost_device *dev, /* Compute the would-be stride */ unsigned stride = bytes_per_pixel * effective_width; - /* On Bifrost, pixel lines have to be aligned on 64 bytes otherwise - * we end up with DATA_INVALID faults. That doesn't seem to be - * mandatory on Midgard, but we keep the alignment for performance. - */ - if (linear) - stride = ALIGN_POT(stride, 64); - if (explicit_layout) { /* Make sure the explicit stride is valid */ - if (explicit_layout->line_stride < stride || - (explicit_layout->line_stride & 63)) + if (explicit_layout->line_stride < stride) return false; stride = explicit_layout->line_stride; + } else if (linear) { + /* Keep lines alignment on 64 byte for performance */ + stride = ALIGN_POT(stride, 64); } slice->line_stride = stride;