Skip to content

Commit 19e2d26

Browse files
bparrottomba
authored andcommitted
drm/omap: add plane_atomic_print_state support
Now that we added specific item to our subclassed drm_plane_state we can add omap_plane_atomic_print_state() helper to dump out our own driver specific plane state. Signed-off-by: Benoit Parrot <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2e54ff0 commit 19e2d26

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/gpu/drm/omapdrm/omap_plane.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,19 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane)
348348
return &state->base;
349349
}
350350

351+
static void omap_plane_atomic_print_state(struct drm_printer *p,
352+
const struct drm_plane_state *state)
353+
{
354+
struct omap_plane_state *omap_state = to_omap_plane_state(state);
355+
356+
if (omap_state->overlay)
357+
drm_printf(p, "\toverlay=%s (caps=0x%x)\n",
358+
omap_state->overlay->name,
359+
omap_state->overlay->caps);
360+
else
361+
drm_printf(p, "\toverlay=None\n");
362+
}
363+
351364
static int omap_plane_atomic_set_property(struct drm_plane *plane,
352365
struct drm_plane_state *state,
353366
struct drm_property *property,
@@ -387,6 +400,7 @@ static const struct drm_plane_funcs omap_plane_funcs = {
387400
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
388401
.atomic_set_property = omap_plane_atomic_set_property,
389402
.atomic_get_property = omap_plane_atomic_get_property,
403+
.atomic_print_state = omap_plane_atomic_print_state,
390404
};
391405

392406
static bool omap_plane_supports_yuv(struct drm_plane *plane)

0 commit comments

Comments
 (0)