1 From 05293c3b61cdeb0004722cc86e03123183557de1 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 26 Dec 2019 15:45:04 +0100
4 Subject: [PATCH] drm/vc4: crtc: Move crtc state to common header
6 We'll need to access the crtc_state from outside of vc4_crtc.c, so let's
9 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
11 drivers/gpu/drm/vc4/vc4_crtc.c | 21 ---------------------
12 drivers/gpu/drm/vc4/vc4_drv.h | 21 +++++++++++++++++++++
13 2 files changed, 21 insertions(+), 21 deletions(-)
15 --- a/drivers/gpu/drm/vc4/vc4_crtc.c
16 +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
21 -struct vc4_crtc_state {
22 - struct drm_crtc_state base;
23 - /* Dlist area for this CRTC configuration. */
24 - struct drm_mm_node mm;
32 - unsigned int bottom;
36 -static inline struct vc4_crtc_state *
37 -to_vc4_crtc_state(struct drm_crtc_state *crtc_state)
39 - return (struct vc4_crtc_state *)crtc_state;
42 #define CRTC_WRITE(offset, val) writel(val, vc4_crtc->regs + (offset))
43 #define CRTC_READ(offset) readl(vc4_crtc->regs + (offset))
45 --- a/drivers/gpu/drm/vc4/vc4_drv.h
46 +++ b/drivers/gpu/drm/vc4/vc4_drv.h
47 @@ -488,6 +488,27 @@ to_vc4_crtc(struct drm_crtc *crtc)
48 return (struct vc4_crtc *)crtc;
51 +struct vc4_crtc_state {
52 + struct drm_crtc_state base;
53 + /* Dlist area for this CRTC configuration. */
54 + struct drm_mm_node mm;
62 + unsigned int bottom;
66 +static inline struct vc4_crtc_state *
67 +to_vc4_crtc_state(struct drm_crtc_state *crtc_state)
69 + return (struct vc4_crtc_state *)crtc_state;
72 #define V3D_READ(offset) readl(vc4->v3d->regs + offset)
73 #define V3D_WRITE(offset, val) writel(val, vc4->v3d->regs + offset)
74 #define HVS_READ(offset) readl(vc4->hvs->regs + offset)