lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211215181413.2950676-1-john@metanate.com>
Date:   Wed, 15 Dec 2021 18:14:12 +0000
From:   John Keeping <john@...anate.com>
To:     dri-devel@...ts.freedesktop.org
Cc:     John Keeping <john@...anate.com>, Sandy Huang <hjc@...k-chips.com>,
        Heiko Stübner <heiko@...ech.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/rockchip: vop: implement atomic_print_state

Rockchip VOP subclasses drm_crtc_state so implementing the
atomic_print_state hook allows printing the additional Rockchip-specific
fields of the CRTC state.

Signed-off-by: John Keeping <john@...anate.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 3e8d9e2d1b67..f3975905599b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1569,6 +1569,19 @@ static void vop_crtc_destroy_state(struct drm_crtc *crtc,
 	kfree(s);
 }
 
+static void vop_crtc_print_state(struct drm_printer *p,
+				 const struct drm_crtc_state *state)
+{
+	struct rockchip_crtc_state *s = to_rockchip_crtc_state(state);
+
+	drm_printf(p, "\toutput_type=%s\n",
+		   drm_get_connector_type_name(s->output_type));
+	drm_printf(p, "\toutput_mode=%d\n", s->output_mode);
+	drm_printf(p, "\toutput_bpc=%d\n", s->output_bpc);
+	drm_printf(p, "\toutput_flags=%x\n", s->output_flags);
+	drm_printf(p, "\tenable_afbc=%d\n", s->enable_afbc);
+}
+
 static void vop_crtc_reset(struct drm_crtc *crtc)
 {
 	struct rockchip_crtc_state *crtc_state =
@@ -1652,6 +1665,7 @@ static const struct drm_crtc_funcs vop_crtc_funcs = {
 	.reset = vop_crtc_reset,
 	.atomic_duplicate_state = vop_crtc_duplicate_state,
 	.atomic_destroy_state = vop_crtc_destroy_state,
+	.atomic_print_state = vop_crtc_print_state,
 	.enable_vblank = vop_crtc_enable_vblank,
 	.disable_vblank = vop_crtc_disable_vblank,
 	.set_crc_source = vop_crtc_set_crc_source,
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ