aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihail Atanassov <mihail.atanassov@arm.com>2017-01-23 10:12:02 -0500
committerLiviu Dudau <Liviu.Dudau@arm.com>2017-04-24 05:45:34 -0400
commit88d4d90fe04cecddff6dc2d74cda34b3271d692e (patch)
tree866731993bc1b7d8716f0f7cbb9ac64dbc80ee26
parent85f6421889eca68ceb0a0403c4c00b2eaf3c16e0 (diff)
drm: mali-dp: add atomic_print_state for planes
Add function to dump the state of the plane. Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
-rw-r--r--drivers/gpu/drm/arm/malidp_planes.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index d5aec082294c..5b0bad87f0b5 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -16,6 +16,7 @@
16#include <drm/drm_fb_cma_helper.h> 16#include <drm/drm_fb_cma_helper.h>
17#include <drm/drm_gem_cma_helper.h> 17#include <drm/drm_gem_cma_helper.h>
18#include <drm/drm_plane_helper.h> 18#include <drm/drm_plane_helper.h>
19#include <drm/drm_print.h>
19 20
20#include "malidp_hw.h" 21#include "malidp_hw.h"
21#include "malidp_drv.h" 22#include "malidp_drv.h"
@@ -90,6 +91,17 @@ static void malidp_destroy_plane_state(struct drm_plane *plane,
90 kfree(m_state); 91 kfree(m_state);
91} 92}
92 93
94static void malidp_plane_atomic_print_state(struct drm_printer *p,
95 const struct drm_plane_state *state)
96{
97 struct malidp_plane_state *ms = to_malidp_plane_state(state);
98 struct malidp_plane *mp = to_malidp_plane(state->plane);
99
100 drm_printf(p, "\trotmem_size=%u\n", ms->rotmem_size);
101 drm_printf(p, "\tformat_id=%u\n", ms->format);
102 drm_printf(p, "\tn_planes=%u\n", ms->n_planes);
103}
104
93static const struct drm_plane_funcs malidp_de_plane_funcs = { 105static const struct drm_plane_funcs malidp_de_plane_funcs = {
94 .update_plane = drm_atomic_helper_update_plane, 106 .update_plane = drm_atomic_helper_update_plane,
95 .disable_plane = drm_atomic_helper_disable_plane, 107 .disable_plane = drm_atomic_helper_disable_plane,
@@ -98,6 +110,7 @@ static const struct drm_plane_funcs malidp_de_plane_funcs = {
98 .reset = drm_atomic_helper_plane_reset, 110 .reset = drm_atomic_helper_plane_reset,
99 .atomic_duplicate_state = malidp_duplicate_plane_state, 111 .atomic_duplicate_state = malidp_duplicate_plane_state,
100 .atomic_destroy_state = malidp_destroy_plane_state, 112 .atomic_destroy_state = malidp_destroy_plane_state,
113 .atomic_print_state = malidp_plane_atomic_print_state,
101}; 114};
102 115
103static int malidp_de_plane_check(struct drm_plane *plane, 116static int malidp_de_plane_check(struct drm_plane *plane,