mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
pan: Drop the format argument passed to drm_is_mtk_tiled()
It's not used, and we shouldn't have to check the format to identify a modifier anyway. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Acked-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
This commit is contained in:
parent
022e3cb66a
commit
67e574f1bd
3 changed files with 8 additions and 10 deletions
|
|
@ -1469,7 +1469,7 @@ pan_resource_modifier_convert(struct panfrost_context *ctx,
|
|||
if (template.next) {
|
||||
struct pipe_resource second_template = *template.next;
|
||||
bool fix_stride;
|
||||
assert(drm_is_mtk_tiled(rsrc->base.format, rsrc->image.layout.modifier));
|
||||
assert(drm_is_mtk_tiled(rsrc->image.layout.modifier));
|
||||
/* fix up the stride */
|
||||
switch (rsrc->base.format) {
|
||||
case PIPE_FORMAT_R8_G8B8_420_UNORM:
|
||||
|
|
@ -1529,8 +1529,7 @@ pan_resource_modifier_convert(struct panfrost_context *ctx,
|
|||
util_num_layers(&rsrc->base, i), &blit.dst.box);
|
||||
blit.src.box = blit.dst.box;
|
||||
|
||||
if (drm_is_mtk_tiled(rsrc->base.format,
|
||||
rsrc->image.layout.modifier))
|
||||
if (drm_is_mtk_tiled(rsrc->image.layout.modifier))
|
||||
screen->vtbl.mtk_detile(ctx, &blit);
|
||||
else
|
||||
panfrost_blit_no_afbc_legalization(&ctx->base, &blit);
|
||||
|
|
@ -1582,7 +1581,7 @@ pan_legalize_format(struct panfrost_context *ctx,
|
|||
|
||||
if (!drm_is_afbc(rsrc->image.layout.modifier) &&
|
||||
!drm_is_afrc(rsrc->image.layout.modifier) &&
|
||||
!drm_is_mtk_tiled(old_format, rsrc->image.layout.modifier))
|
||||
!drm_is_mtk_tiled(rsrc->image.layout.modifier))
|
||||
return;
|
||||
|
||||
if (drm_is_afbc(rsrc->image.layout.modifier)) {
|
||||
|
|
@ -1594,7 +1593,7 @@ pan_legalize_format(struct panfrost_context *ctx,
|
|||
struct pan_afrc_format_info new_info =
|
||||
panfrost_afrc_get_format_info(new_format);
|
||||
compatible = !memcmp(&old_info, &new_info, sizeof(old_info));
|
||||
} else if (drm_is_mtk_tiled(old_format, rsrc->image.layout.modifier)) {
|
||||
} else if (drm_is_mtk_tiled(rsrc->image.layout.modifier)) {
|
||||
compatible = false;
|
||||
dest_modifier = DRM_FORMAT_MOD_LINEAR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ panfrost_walk_dmabuf_modifiers(struct pipe_screen *screen,
|
|||
if (drm_is_afrc(pan_best_modifiers[i]) && !afrc)
|
||||
continue;
|
||||
|
||||
if (drm_is_mtk_tiled(format, pan_best_modifiers[i]) &&
|
||||
if (drm_is_mtk_tiled(pan_best_modifiers[i]) &&
|
||||
!panfrost_format_supports_mtk_tiled(format))
|
||||
continue;
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ panfrost_walk_dmabuf_modifiers(struct pipe_screen *screen,
|
|||
modifiers[count] = pan_best_modifiers[i];
|
||||
|
||||
if (external_only)
|
||||
external_only[count] = drm_is_mtk_tiled(format, modifiers[count]);
|
||||
external_only[count] = drm_is_mtk_tiled(modifiers[count]);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,9 +446,8 @@ bool panfrost_format_supports_mtk_tiled(enum pipe_format format);
|
|||
((mod >> 52) == \
|
||||
(DRM_FORMAT_MOD_ARM_TYPE_AFRC | (DRM_FORMAT_MOD_VENDOR_ARM << 4)))
|
||||
|
||||
#define drm_is_mtk_tiled(format, mod) \
|
||||
((mod >> 52) == \
|
||||
(0 | (DRM_FORMAT_MOD_VENDOR_MTK << 4)))
|
||||
#define drm_is_mtk_tiled(mod) \
|
||||
((mod >> 52) == (0 | (DRM_FORMAT_MOD_VENDOR_MTK << 4)))
|
||||
|
||||
struct pan_image_explicit_layout {
|
||||
unsigned offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue