Before resolving a resource into its scanout prime buffer, check that
the prime resource is actually older. If it is not, the resolve is an
expensive no-op, and we better skip it.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
{
struct etna_resource *rsc = etna_resource(prsc);
- if (rsc->scanout)
+ if (rsc->scanout &&
+ etna_resource_older(etna_resource(rsc->scanout->prime), rsc)) {
etna_copy_resource(pctx, rsc->scanout->prime, prsc, 0, 0);
+ etna_resource(rsc->scanout->prime)->seqno = rsc->seqno;
+ }
}
void