[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181012201703.29065-8-bparrot@ti.com>
Date: Fri, 12 Oct 2018 15:17:02 -0500
From: Benoit Parrot <bparrot@...com>
To: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Daniel Vetter <daniel@...ll.ch>
CC: Tomi Valkeinen <tomi.valkeinen@...com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Jyri Sarha <jsarha@...com>, Benoit Parrot <bparrot@...com>
Subject: [Patch v4 7/8] 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 <bparrot@...com>
---
drivers/gpu/drm/omapdrm/omap_plane.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 224520348fc5..116071982a0e 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -348,6 +348,23 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane)
return ©->base;
}
+static void omap_plane_atomic_print_state(struct drm_printer *p,
+ const struct drm_plane_state *state)
+{
+ struct omap_plane_state *omap_state = to_omap_plane_state(state);
+
+ drm_printf(p, "\toverlay=%s\n", omap_state->overlay ?
+ omap_state->overlay->name : "(null)");
+ if (omap_state->overlay) {
+ drm_printf(p, "\t\tidx=%d\n", omap_state->overlay->idx);
+ drm_printf(p, "\t\toverlay_id=%d\n",
+ omap_state->overlay->overlay_id);
+ drm_printf(p, "\t\tcaps=0x%x\n", omap_state->overlay->caps);
+ drm_printf(p, "\t\tpossible_crtcs=0x%x\n",
+ omap_state->overlay->possible_crtcs);
+ }
+}
+
static int omap_plane_atomic_set_property(struct drm_plane *plane,
struct drm_plane_state *state,
struct drm_property *property,
@@ -387,6 +404,7 @@ static const struct drm_plane_funcs omap_plane_funcs = {
.atomic_destroy_state = omap_plane_atomic_destroy_state,
.atomic_set_property = omap_plane_atomic_set_property,
.atomic_get_property = omap_plane_atomic_get_property,
+ .atomic_print_state = omap_plane_atomic_print_state,
};
static const char *plane_id_to_name[] = {
--
2.9.0
Powered by blists - more mailing lists