From ea0f90a866a0f17bef8d1f2140db471de2452d1f Mon Sep 17 00:00:00 2001 From: Abhijit Kulkarni Date: Tue, 11 Apr 2017 19:50:47 -0700 Subject: drm/msm/sde: add secure use case properties This change adds custom PLANE(fb_translation_mode) and CRTC(security_level) properties for supporting secure use case. Plane property identifies the translation requirement for the planes. CRTC property speicifies what planes could be attached to this CRTC. CRs-Fixed: 2053654 Change-Id: Iea59027d4bee536c8554e3955723982a6fc361dd Signed-off-by: Abhijit Kulkarni --- include/uapi/drm/sde_drm.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'include') diff --git a/include/uapi/drm/sde_drm.h b/include/uapi/drm/sde_drm.h index c7bed3b1ccf3..bef841446247 100644 --- a/include/uapi/drm/sde_drm.h +++ b/include/uapi/drm/sde_drm.h @@ -64,6 +64,48 @@ /* DRM bitmasks are restricted to 0..63 */ #define SDE_DRM_BITMASK_COUNT 64 +/** + * Framebuffer modes for "fb_translation_mode" PLANE property + * + * @SDE_DRM_FB_NON_SEC: IOMMU configuration for this framebuffer mode + * is non-secure domain and requires + * both stage I and stage II translations when + * this buffer is accessed by the display HW. + * This is the default mode of all frambuffers. + * @SDE_DRM_FB_SEC: IOMMU configuration for this framebuffer mode + * is secure domain and requires + * both stage I and stage II translations when + * this buffer is accessed by the display HW. + * @SDE_DRM_FB_NON_SEC_DIR_TRANS: IOMMU configuration for this framebuffer mode + * is non-secure domain and requires + * only stage II translation when + * this buffer is accessed by the display HW. + * @SDE_DRM_FB_SEC_DIR_TRANS: IOMMU configuration for this framebuffer mode + * is secure domain and requires + * only stage II translation when + * this buffer is accessed by the display HW. +*/ + +#define SDE_DRM_FB_NON_SEC 0 +#define SDE_DRM_FB_SEC 1 +#define SDE_DRM_FB_NON_SEC_DIR_TRANS 2 +#define SDE_DRM_FB_SEC_DIR_TRANS 3 + +/** + * Secure levels for "security_level" CRTC property. + * CRTC property which specifies what plane types + * can be attached to this CRTC. Plane component + * derives the plane type based on the FB_MODE. + * @ SDE_DRM_SEC_NON_SEC: Both Secure and non-secure plane types can be + * attached to this CRTC. This is the default state of + * the CRTC. + * @ SDE_DRM_SEC_ONLY: Only secure planes can be added to this CRTC. If a + * CRTC is instructed to be in this mode it follows the + * platform dependent restrictions. + */ +#define SDE_DRM_SEC_NON_SEC 0 +#define SDE_DRM_SEC_ONLY 1 + /** * struct sde_drm_pix_ext_v1 - version 1 of pixel ext structure * @num_ext_pxls_lr: Number of total horizontal pixels -- cgit v1.2.3