summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>2018-08-20 11:27:29 +0300
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:33:29 +0800
commitd64ff2b2f669e0a075078062ee38b93c024cbd03 (patch)
tree0226456251757f0aab5881d4c64bfa8c1c5a178e /include/video
parent21c144dad5c7efb92a05f430d59227a8be355054 (diff)
MLK-19274: drm: imx: dcss: add rotation functionality
This patch will allow userspace to rotate planes by setting the 'rotation' property. Generally, 0 and 180 rotations are allowed for pretty much all 8-bit xRGB and 2-plane YUV420 formats. 90/270 rotations can be performed only for non-compressed tiled GPU xRGB formats. Tiled YUV420 formats do not allow rotations at all because these formats need DTRC for de-tiling and DTRC has no rotation support. For more info, consult the DPR Features chapter in the reference manual. Test example: modetest -M imx-drm -w 27:rotation:4 -w 32:rotation:33 -w 27:alpha:30 -s 42@31:3840x2160-60@XR24 -P 32@31:3840x2160@NV21 The above will perform: * 180 degree rotation of primary plane (XR24); * vertical flip of first overlay plane (rotate-0 | reflect-y); * set primary plane alpha to 30; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/imx-dcss.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/video/imx-dcss.h b/include/video/imx-dcss.h
index 03330f330354..51a36150e35e 100644
--- a/include/video/imx-dcss.h
+++ b/include/video/imx-dcss.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -84,6 +84,8 @@ void dcss_dpr_format_set(struct dcss_soc *dcss, int ch_num, u32 pix_format,
void dcss_dpr_tile_derive(struct dcss_soc *dcss,
int ch_num,
uint64_t modifier);
+void dcss_dpr_set_rotation(struct dcss_soc *dcss, int ch_num, u32 rotation);
+
/* DTG */
void dcss_dtg_sync_set(struct dcss_soc *dcss, struct videomode *vm);
void dcss_dtg_plane_pos_set(struct dcss_soc *dcss, int ch_num,