summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada/armada_plane.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-01-25 11:14:21 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2019-05-17 12:16:32 +0100
commit7d62237da6ec072292c2f738ebffbf10f6a101cf (patch)
tree9e72807a8da016470ca632b57b51ba9d9dcffc48 /drivers/gpu/drm/armada/armada_plane.h
parent89e0c53ccfbcca4a492d98735d2eda307368f742 (diff)
downloadlinux-7d62237da6ec072292c2f738ebffbf10f6a101cf.tar.bz2
drm/armada: move plane address and pitch calculation to atomic_check
Move the plane address and pitch calculations to atomic_check rather than the update function, so we don't have to probe the interlace setting for the CRTC while updating the plane. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_plane.h')
-rw-r--r--drivers/gpu/drm/armada/armada_plane.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/armada/armada_plane.h b/drivers/gpu/drm/armada/armada_plane.h
index 396c45a4ea5e..2707ec781941 100644
--- a/drivers/gpu/drm/armada/armada_plane.h
+++ b/drivers/gpu/drm/armada/armada_plane.h
@@ -6,6 +6,9 @@ struct armada_plane_state {
u32 src_hw;
u32 dst_yx;
u32 dst_hw;
+ u32 addrs[2][3];
+ u16 pitches[3];
+ bool interlace;
};
#define to_armada_plane_state(st) \
@@ -13,6 +16,8 @@ struct armada_plane_state {
#define armada_src_hw(state) to_armada_plane_state(state)->src_hw
#define armada_dst_yx(state) to_armada_plane_state(state)->dst_yx
#define armada_dst_hw(state) to_armada_plane_state(state)->dst_hw
+#define armada_addr(state, f, p) to_armada_plane_state(state)->addrs[f][p]
+#define armada_pitch(state, n) to_armada_plane_state(state)->pitches[n]
void armada_drm_plane_calc(struct drm_plane_state *state, u32 addrs[2][3],
u16 pitches[3], bool interlaced);