panfrost: Correctly set modifier_constant

This fixes the tiled-linear conversion optimisation.

Fixes: 56f9cc9948 ("panfrost: Account for modifiers when creating BO")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>
This commit is contained in:
Icecream95 2020-09-05 10:11:41 +12:00 committed by Marge Bot
parent 361396c866
commit 23ad95227a

View file

@ -537,7 +537,7 @@ panfrost_resource_create_bo(struct panfrost_device *dev, struct panfrost_resourc
* linear, and if we control the modifier, and if the resource can be
* linear. */
pres->modifier_constant = !((pres->modifier != DRM_FORMAT_MOD_LINEAR)
&& (modifier == DRM_FORMAT_INVALID)
&& (modifier == DRM_FORMAT_MOD_INVALID)
&& panfrost_can_linear(dev, pres));
size_t bo_size;