Lines Matching full:planes
3 * rcar_du_plane.c -- R-Car Display Unit Planes
32 * The core idea is to avoid using a free planes bitmask that would need to be
35 * over all plane states to compute the free planes bitmask, allocates hardware
36 * planes based on that bitmask, and stores the result back in the plane states.
38 * For this to work we need to access the current state of planes not touched by
40 * planes using drm_atomic_get_plane_state(). This effectively serializes atomic
54 * Lowering the number of planes doesn't strictly require reallocation in rcar_du_plane_needs_realloc()
59 old_state->format->planes != new_state->format->planes) in rcar_du_plane_needs_realloc()
62 /* Reallocate hardware planes if the source has changed. */ in rcar_du_plane_needs_realloc()
77 if (state->format->planes == 2) in rcar_du_plane_hwmask()
89 * and allocate planes in reverse index order otherwise to ensure maximum
90 * availability of planes 0 and 1.
99 unsigned int num_planes = state->format->planes; in rcar_du_plane_hwalloc()
141 /* Check if hardware planes need to be reallocated. */ in rcar_du_atomic_check_planes()
154 plane->group->index, plane - plane->group->planes); in rcar_du_atomic_check_planes()
164 index = plane - plane->group->planes; in rcar_du_atomic_check_planes()
180 index = plane - plane->group->planes; in rcar_du_atomic_check_planes()
195 * Compute the used planes mask for each group at the same time to avoid in rcar_du_atomic_check_planes()
196 * looping over the planes separately later. in rcar_du_atomic_check_planes()
203 dev_dbg(rcdu->dev, "%s: finding free planes for group %u\n", in rcar_du_atomic_check_planes()
207 struct rcar_du_plane *plane = &group->planes[i]; in rcar_du_atomic_check_planes()
217 * hardware planes must not be added to the used planes in rcar_du_atomic_check_planes()
220 * above. Use the local freed planes list to check for in rcar_du_atomic_check_planes()
227 plane - plane->group->planes); in rcar_du_atomic_check_planes()
237 plane - plane->group->planes, in rcar_du_atomic_check_planes()
239 new_plane_state->format->planes : 0, in rcar_du_atomic_check_planes()
246 dev_dbg(rcdu->dev, "%s: group %u free planes mask 0x%02x\n", in rcar_du_atomic_check_planes()
250 /* Reallocate hardware planes for each plane that needs it. */ in rcar_du_atomic_check_planes()
265 plane->group->index, plane - plane->group->planes); in rcar_du_atomic_check_planes()
268 * Skip planes that are being disabled or don't need to be in rcar_du_atomic_check_planes()
276 * Try to allocate the plane from the free planes currently in rcar_du_atomic_check_planes()
279 * allocating from all free planes. in rcar_du_atomic_check_planes()
298 __func__, new_plane_state->format->planes, idx); in rcar_du_atomic_check_planes()
305 dev_dbg(rcdu->dev, "%s: group %u free planes mask 0x%02x\n", in rcar_du_atomic_check_planes()
346 if (state->format->planes == 2) in rcar_du_plane_setup_scanout()
351 for (i = 0; i < state->format->planes; ++i) { in rcar_du_plane_setup_scanout()
388 if (state->format->planes == 2) { in rcar_du_plane_setup_scanout()
480 if (state->format->planes == 2) { in rcar_du_plane_setup_format_gen2()
548 if (state->format->planes == 2) in __rcar_du_plane_setup()
767 * planes. in rcar_du_planes_init()
777 struct rcar_du_plane *plane = &rgrp->planes[i]; in rcar_du_planes_init()