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 10:28:20 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2019-05-17 12:16:32 +0100
commit9184ae8db3d563438519cab295c2c9698255ca87 (patch)
tree3fb3fa9c318346b00409c60ccb906717af1bd0c8 /drivers/gpu/drm/armada/armada_plane.h
parentad52f53ff4e3167425b4b2195a23b9d2d0d243c6 (diff)
downloadlinux-stable-9184ae8db3d563438519cab295c2c9698255ca87.tar.gz
linux-stable-9184ae8db3d563438519cab295c2c9698255ca87.tar.bz2
linux-stable-9184ae8db3d563438519cab295c2c9698255ca87.zip
drm/armada: add plane size/location accessors
Add accessors for getting the register values for the plane from the plane state. This will allow us to generate the values when validating the plane rather than when programming, which allows us to fix the interlace handling without adding lots of additional handling in the update functions. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/armada/armada_plane.h b/drivers/gpu/drm/armada/armada_plane.h
index ff4281ba7fad..049c593342eb 100644
--- a/drivers/gpu/drm/armada/armada_plane.h
+++ b/drivers/gpu/drm/armada/armada_plane.h
@@ -1,6 +1,10 @@
#ifndef ARMADA_PLANE_H
#define ARMADA_PLANE_H
+#define armada_src_hw(state) armada_rect_hw_fp(&(state)->src)
+#define armada_dst_yx(state) armada_rect_yx(&(state)->dst)
+#define armada_dst_hw(state) armada_rect_hw(&(state)->dst)
+
void armada_drm_plane_calc(struct drm_plane_state *state, u32 addrs[2][3],
u16 pitches[3], bool interlaced);
int armada_drm_plane_prepare_fb(struct drm_plane *plane,