summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorNarendra Muppalla <NarendraM@codeaurora.org>2017-01-29 12:20:13 -0800
committerNarendra Muppalla <NarendraM@codeaurora.org>2017-01-30 11:53:27 -0800
commit3a7cd576f7c7b5e655a74c5528a08c789b7c14f6 (patch)
treed2d46cef6a7c25e601442b95c5f16b850e2bfe06 /include/uapi
parent958e36a73f7fe46ee28a749cd9b56ddf5dbf56cd (diff)
parent3ac6b6590ba8390a1b25f0f9cea8953220c6b6a3 (diff)
Merge remote-tracking branch 'quic/dev/msm-4.4-drm_kms' into msm-4.4-01-29-tip
* quic/dev/msm-4.4-drm_kms: drm/msm/sde: allow mmus to be optional during kms init drm/msm/sde: check for null catalog in sde hw destroy drm/msm: treat data bus dtsi property as optional drm/msm/sde: add crtc clock & bandwidth capabilities drm/msm/sde: parse csc type dtsi entry to select valid csc drm/msm: fix copyright marking in "msm" drm driver drm/msm: remove smmu coherent hardware table walk attrib drm/msm/sde: add DMA2 and DMA3 pipe staging support drm/msm/sde: add event for underruns drm/msm/sde: fix check for frame event overflow ARM: dts: msm: add ping pong split definitions for msm8996 ARM: dts: msm: add sde max bus bandwidth setting for msm8996 drm/msm/sde: add dynamic clock and bandwidth commit support ARM: dts: msm: add sde bus scale settings for msm8996 drm/msm/sde: add bus bandwidth control for crtc drm/msm/sde: add frame done callback event to crtc drm/msm/sde: bypass crtc atomic begin/flush if disabled drm/msm/sde: add debugfs entry for vbif drm/msm/sde: add debugfs entry for danger and safe status drm/msm/sde: enable ping pong split support ARM: dts: msm: enable imgswap on sharp nt35597 dual panel drm/msm/sde: remove catalog parsing limits drm/msm/sde: update pixel extension uapi drm/msm/sde: enable master physical encoder last drm/msm/sde: reset ctl mixer config at end of use case drm/msm: Support virtualization of color processing properties drm/msm/sde: Move DSPP/SSPP color process hw programming to common location drm/msm/sde: Add support for Memory Color in plane drm/msm/sde: Add PA global adjustment properties to plane drm/msm: implement smmu detach and guard freeing of client dev drm/msm/sde: reset kickoff count atomically before irq enable ARM: dts: msm: default sde clock rate to max for msm8996 drm/msm/sde: base scaler phase on decimated dimensions drm/msm/sde: move sde hw init to hw_init callback drm/msm/sde: check for missed irqs in command encoder drm/msm: support probe deferral in msm_drv drm/msm/sde: fix iounmap usage and init callflow drm/msm/sde: fixup sde_kms shutdown sequence and naming drm/msm/sde: fix cmd mode vblank irq control drm/msm/sde: apply correct zpos range for sde clients drm: Increase max number of DRM object properties drm/msm/sde: add debug dump and panic facility drm/msm/sde: match xlog features in evtlog drm/msm/sde: add debugfs support for misr data drm/msm/sde: Add device tree subnode parsing capability drm/msm: create separate commit thread for each display drm/msm/sde: Add backlight class support for sde drm driver drm/msm/sde: add common sde debug folder drm/msm/sde: route evtlog to sde trace log drm/msm/sde: add systrace compatible trace macro drm/msm/sde: separate plane/encoder/crtc functions into headers drm/msm/sde: add default 10 bit csc matrix to source pipe drm/msm/sde: add 10 bit csc for sde drm/msm/sde: add qseedv3.x support for sde drm/msm/sde: add 10-bit formats support drm/msm/sde: print error only if catalog property is mandatory drm/msm/sde: remove redundant vblank request in crtc drm/msm/sde: add vblank reference counting to crtc drm/msm/sde: handle pingpong blocks from virtual encoder drm/msm/sde: add support for BGRX and XBGR formats in plane drm/msm/sde: add multi-client and ref counting for core irq drm/msm/sde: cache connector list in sde crtc drm/msm/sde: remove display manager drm/msm/sde: fix video encoder access in phy encoder drm/msm/sde: add debugfs node for vsync and underrun status drm/msm/sde: update vblank and underrun isr handling drm/msm/sde: fix color component order drm/msm/dsi-staging: fix issues related to deferral drm/msm/sde: remove static allocation of mdp_top hw block drm/msm: initialize local varibles in sde power module drm/msm/sde: dual pipe use case support drm/msm/sde: update crtc status debugfs node ARM: dts: msm: add vbif OT and plane QoS/LUT for msm8996 drm/msm/sde: add clock control parsing to hardware catalog drm/msm/sde: correct read out of bit offset array drm/msm/sde: add plane QoS parsing to hardware catalog drm/msm/sde: add vbif parsing to hardware catalog drm/msm/sde: add writeback id parsing to hardware catalog drm/msm/sde: update mixer op mode config bit fields correctly drm/msm/sde: add sde error prefix for all errors drm/msm: add capability property for crtc drm/msm/sde: update ubwc and src split properties for sde drm/msm/sde: correct to use sync vblank request for commit drm/msm: execute pending vblank disable upon last close drm/msm/sde: update crtc to use sde debug macros drm/msm/sde: remove unused functions in sde crtc drm/msm/sde: move sde_crtc declarations into sde_crtc header drm/msm/sde: move sde_crtc away from legacy drm vblank apis drm/msm: add error logging in msm_atomic drm/msm/sde: move vbif functions to their own file defconfig: enable backlight class driver for msm defconfig. drm/msm/sde: additional event logging for fences drm/msm/sde: assign relative mixer stages based on zpos drm/msm/sde: remove redundant vblank request and notification drm/msm/sde: fixup header markings drm/msm: fix power handle APIs when clk are not present drm/msm/sde: don't convert ktime to ns when waiting for fences DOWNSTREAM: drm/msm/sde: enable sde client customizations drm/msm: rename kernel module to msm_drm drm/msm/sde: allow primary planes to be used with all crtcs drm/msm/sde: limit primary plane count to number of crtcs drm/msm: teardown all modes in lastclose handler drm/msm/sde: update proper error message for rm failure drm/sde: move hardware catalog to dtsi parser drm/msm/sde: enable proper support for split flush drm/msm/sde: add mode config mutex lock for connector search drm/msm/sde: bypass wait for commit done if crtc is not enabled drm/msm/sde: add proper mode config lock to plane QoS check drm/msm/sde: correct crtc to use new plane state for update drm/msm/sde: remove error message from optional settings drm/msm/sde: remove unused traffic shaper from hw drivers drm/msm: property read should return success for virtual crtc drm/msm/sde: avoid programming same plane source address drm/msm/sde: update plane dmesg logging to use sde macros drm/msm/sde: update scaler property definition and type drm/msm/sde: break out plane decimation to separate properties drm/msm/sde: update register writes to use SDE logging macros drm/msm/sde: update csc property definition and type drm/msm: Modularize property install function of color processing drm/msm: Add support for PA vLut feature drm/msm: Expose Assertive display capability drm/msm: Suspend/Resume support for color processing features drm/msm: Add support for PCC in Crtc drm/msm/sde: update catalog for post processing drm/msm/sde: don't duplicate input fence pointer with state drm/msm/sde: fix color component order for compressed formats drm/msm/sde: add writeback ROI support for msmskunk drm/msm/sde: add const alpha support for msmskunk ARM: dts: msm: add max clock property for sde to msm8996 drm/msm/sde: add max clock property for sde drm/msm: add support for custom event notification drm/msm: Initial version post processing header drm/msm: remove msm clock driver header files drm/msm/dsi-staging: keep backlight api under LED config drm/msm/sde: enable sde clocks during debugfs register read drm/msm/sde: update pipes on dirty plane properties drm/msm/sde: fix compilation issues in sde driver drm/msm/sde: update encoder dmesg logging to use sde macros drm/msm/sde: remove unused header dependency drm/msm/sde: use const alpha for wb if pipe alpha not supported drm/msm/sde: remove unused sde functions drm/msm/sde: add mode change request to cdm resource update drm/msm/sde: cleanup alpha calc and plane stage in crtc ARM: dts: msm: send panel off command during pre off state drm/msm/sde: remove unused writeback function stubs drm/msm/sde: remove unused vblank control for writeback drm/msm/sde: remove unused encoder function drm/msm/sde: always clear topology name when removing rsvp drm/msm/sde: reorganize top level interrupt handling code drm/msm/sde: add OT support for source pipe and writeback drm/msm/sde: add danger/safe/QoS support for source pipe drm/msm/sde: improve debug log for blend setup DOWNSTREAM: drm/msm/sde: optionally delay output fence signal drm/msm/sde: determine output fence timing on create drm/sde: use power handle api to vote for core clock ARM: dts: msm: add clk rate and gdsc supply entry for msm8996 drm/msm: add power handle driver for msm drm/msm/sde: add helper macro for performing ktime comparisons drm/msm/sde: assign ctls based on capability requirements drm/msm/sde: clean up crtc ctl tracking drm/msm/sde: improve resource manager hw block lookup time drm/msm: internal property updates should update cached value drm/msm/sde: fix plane stage setup in sde crtc ARM: dts: msm: add nt35597 panel definition for msm8996 drm/sde: remove warn on from sde encoder drm/sde: allow base layer plane stagging drm/msm: update plane, crtc and connector caps blob prop drm/msm/sde: add api for determining current interface mode drm/msm/sde: fix uninitialized return code in rm drm/msm/sde: fix atomic check for crtc driver drm/msm: validate framebuffer before accessing it drm/msm: fix atomic mode check for sde plane drm/msm: use drm helper API for atomic check ARM: dts: msm: remove hdmi connector for msm8996 drm/msm/sde: enable dynamic hardware resource assignment drm/msm/sde: dynamic hardware resource manager drm/msm/sde: move crtc towards multi-encoder support drm/msm/sde: list block interconnects as bitmasks drm/msm/sde: add topology management properties drivers/gpu/drm: disable drm fbdev emulation drm/msm/sde: use common structure for phys encoder init drm/msm/sde: list hardwired mixer connections drm/msm: enable/disable sde during driver open and close drm/dsi: turn off the wled backlight with panel power off drm/dsi: fix dsi control power supply turn off sequence drm/msm/sde: add support for dirty properties drm/msm: allow flags to be set in property helpers drm/msm/sde: trigger plane modeset on buffer pitch change ARM: dts: msm: add SDE writeback display for msm8996 drm/msm/sde: enable writeback enumeration in display manager drm/msm/sde: add virtual writeback device and connector drm/msm/sde: add resource management for writeback and cdm drm/msm/sde: add hardware driver support for chroma down module drm/msm/sde: add hardware driver support for writeback interface drm/msm/sde: add smmu domain selection logic to connector drm/msm/sde: add function to return raw interrupt status ARM: dts: msm: add SDE smmu node to msm8996 drm/msm/sde: Bypass unused interface during smmu init drm/msm: add non-realtime and secure smmu domains drm/msm: cache active displays within display manager drm/msm/sde: add connector api for querying display info drm/msm/sde: use msm_display_info for display information drm/msm/sde: explicitly enumerate supported plane formats drm/msm/sde: add retire fence support drm/msm/dsi-staging: use sde connector for dsi drm/msm/sde: add generic support for drm connectors drm/msm/sde: add utility functions for kms info drm/msm/sde: enable output_fence property drm/msm/sde: add output fence utility functions drm/msm/sde: support more formats including compression drm/msm: subdriver hook to validate modified formats drm/msm/sde: add drm fourcc modifier for qcom compressed format drm/msm/sde: command mode panel encoder support drm/msm/dsi-staging: turn gpio off if panel reset fails drm/msm/sde: single kickoff to flush hardware drm/msm/dsi-staging: add dsi cmd/vid mode to display info drm/msm: add subdriver callback for single kickoff drm/msm/sde: fix reading of the pingpong counters drm/dsi-staging: update configurations for display related GPIOs drm/msm/sde: add register name to logging drm/msm/sde: add logmask area for top registers drm/msm/sde: define sde specific macros for dmesg logging drm/msm/sde: enable explicit input fences drm/msm/sde: add support for crtc properties drm/dsi-staging: reset drm/dsi data before reconfiguring ARM: dts: msm: fix compilation errors for msm8996 ARM: dts: msm: add configurations for 1080p panel on msm8996 defconfig: enabled drm/kms driver in msm defconfig drm/msm/dsi: remove unused tag from dsi API drm/kms: remove compilation of hdcp_hdmi ARM: dts: msm: update settings for dsi panels drm/msm: disable mdp4 driver in drm kms drm/msm: switch to qti KGSL driver ARM: dts: msm: add configurations for 720p panel ARM: dts: msm: add device tree for sde dsi device on msm8996 drm/dsi-staging: add support to get regulator data from device tree drm/msm/sde: use sde plane csc cfg struct for user settings drm/msm: add display manager to makefile drm/msm: rename MSM drm platform driver's name into msm_drm drm/msm/sde: avoid dereferencing scaler blob if null state drm/msm: handle null blob property array drm/msm: enable both dsi drivers together drm: mipi: change header format to work with msm hardware drm/dsi-staging: remove interrupt handling drm/msm: move display manager out from dsi-staging drm/msm/dsi-staging: fix dynamic fps and seamless updates drm/msm/dsi-staging: support dynamic frame-rate and validation drm/msm: defer drm driver probe if backlight isn't ready drm/msm: common display interface for mdp driver drm/msm/sde: init private kms pointer before modeset init drm/msm/dsi-staging: add dsi panel driver drm/msm/dsi-staging: add debugfs support for dsi driver drm/msm/dsi-staging: add support for command mode panels drm/msm/dsi-staging: dsi display tests drm/msm/dsi-staging: add dsi drm interface drm/msm/dsi-staging: add dsi display driver drm/msm/sde: replace plane property/state handling with msm_prop drm/msm: add generic property/state handling drm/msm: use sde specific color format throughout drm/msm: move dynamic fps and seamless updates drm/msm: update wrapper macros for event logging drm/msm/sde: init spinlock for lm_lock drm/msm/sde: clean up debug output drm/msm: add event log for profiling msm drm driver events drm/msm/sde: pageflip fixes drm/msm/sde: remove crtc full modeset based on plane changes drm/msm/sde: add z-order and plane id to prints drm/msm/sde: add wrappers for release fence API drm/msm/sde: update max up/down scale drm/msm/sde: add planes color fill/fence timeout drm/msm/sde: updates to planes atomic_check drm/msm/sde: add cache for released plane states drm/msm/sde: input fence support for planes drm/msm/sde: add debugfs for crtc drm/msm/sde: don't overflow mixer cfg fields drm/msm: enable seamless dynamic framerates drm/msm/sde: remove plane decimation properties drm/msm/sde: change csc matrix coeff in h/w driver to s15.16 drm/msm/sde: enable blending across all planes drm/msm/sde: remove 'mdp' from sde file names defconfig: msm: enable SYNC Driver drm/msm/sde: add valid rotator writeback flag drm/msm/sde: add properties for planes msm: sde: sde plane properties user definitions drm/msm/sde: consolidate SDE error logging on DRM standard calls drm/msm/sde: set encoder role at display probe time drm/msm/sde: add preliminary debugfs support drm/msm/sde: add blending support for more use cases drm/msm/sde: enable NV12 modetest for planes drm/msm/sde: fixup mdp top split pipe control drm/msm/sde: add support for vblank callback drm/msm/dsi-staging: add dsi phy driver drm/msm/dsi-staging: add clock and power utilities drm/msm/dsi-staging: add dsi controller driver drm/msm/sde: add resource manager to enable dual dsi drm/msm/sde: adding implementation for mdp_top in hw driver drm/msm/sde: sde hw interrupt handling drm/msm/sde: simplify encoder display probe logic drm/msm/sde: move sde encoder to new display interface drm/msm/sde: programmable pre-fetch support for video encoders drm/msm/sde: sde encoder virtualization drm/msm/sde: add controller instance to INTF block in catalog drm/msm/sde: add basic sde object enumeration drm/msm: add smmu handler drm/msm/sde: add driver for sde support drm/msm/dsi-staging: add catalog for dsi driver drm/msm/dsi-staging: add hardware driver for dsi controller drm/msm/dsi-staging: add hardware driver for dsi phy drm/msm/dsi-staging: add dsi definitions for new dsi driver drm/msm: remove clock framework dependency Change-Id: I20ec5183e730d1033f824f3b33f52d5b1578f740 Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/Kbuild2
-rw-r--r--include/uapi/drm/drm_fourcc.h8
-rw-r--r--include/uapi/drm/drm_mode.h2
-rw-r--r--include/uapi/drm/msm_drm.h54
-rw-r--r--include/uapi/drm/msm_drm_pp.h82
-rw-r--r--include/uapi/drm/sde_drm.h298
6 files changed, 444 insertions, 2 deletions
diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild
index 38d437096c35..c3c78a0d0052 100644
--- a/include/uapi/drm/Kbuild
+++ b/include/uapi/drm/Kbuild
@@ -18,3 +18,5 @@ header-y += via_drm.h
header-y += vmwgfx_drm.h
header-y += msm_drm.h
header-y += virtgpu_drm.h
+header-y += sde_drm.h
+header-y += msm_drm_pp.h
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 0b69a7753558..53d7c80f5eb0 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -229,4 +229,12 @@
*/
#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
+/*
+ * Qualcomm Compressed Format
+ *
+ * Refers to a compressed variant of the base format that is compressed.
+ * Implementation may be platform and base-format specific.
+ */
+#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
+
#endif /* DRM_FOURCC_H */
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 6c11ca401de8..09c22caf34dd 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -72,6 +72,7 @@
#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14)
#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
+#define DRM_MODE_FLAG_SEAMLESS (1<<19)
/* DPMS flags */
@@ -354,6 +355,7 @@ struct drm_mode_fb_cmd {
#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
+#define DRM_MODE_FB_SECURE (1<<2) /* for secure framebuffers */
struct drm_mode_fb_cmd2 {
__u32 fb_id;
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 75a232b9a970..fd1be42188cd 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -20,6 +20,7 @@
#include <stddef.h>
#include <drm/drm.h>
+#include <drm/sde_drm.h>
/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints:
@@ -196,6 +197,39 @@ struct drm_msm_wait_fence {
struct drm_msm_timespec timeout; /* in */
};
+/**
+ * struct drm_msm_event_req - Payload to event enable/disable ioctls.
+ * @object_id: DRM object id. Ex: for crtc pass crtc id.
+ * @object_type: DRM object type. Ex: for crtc set it to DRM_MODE_OBJECT_CRTC.
+ * @event: Event for which notification is being enabled/disabled.
+ * Ex: for Histogram set - DRM_EVENT_HISTOGRAM.
+ * @client_context: Opaque pointer that will be returned during event response
+ * notification.
+ * @index: Object index(ex: crtc index), optional for user-space to set.
+ * Driver will override value based on object_id and object_type.
+ */
+struct drm_msm_event_req {
+ __u32 object_id;
+ __u32 object_type;
+ __u32 event;
+ __u64 client_context;
+ __u32 index;
+};
+
+/**
+ * struct drm_msm_event_resp - payload returned when read is called for
+ * custom notifications.
+ * @base: Event type and length of complete notification payload.
+ * @info: Contains information about DRM that which raised this event.
+ * @data: Custom payload that driver returns for event type.
+ * size of data = base.length - (sizeof(base) + sizeof(info))
+ */
+struct drm_msm_event_resp {
+ struct drm_event base;
+ struct drm_msm_event_req info;
+ __u8 data[];
+};
+
#define DRM_MSM_GET_PARAM 0x00
/* placeholder:
#define DRM_MSM_SET_PARAM 0x01
@@ -206,7 +240,18 @@ struct drm_msm_wait_fence {
#define DRM_MSM_GEM_CPU_FINI 0x05
#define DRM_MSM_GEM_SUBMIT 0x06
#define DRM_MSM_WAIT_FENCE 0x07
-#define DRM_MSM_NUM_IOCTLS 0x08
+#define DRM_SDE_WB_CONFIG 0x08
+#define DRM_MSM_REGISTER_EVENT 0x09
+#define DRM_MSM_DEREGISTER_EVENT 0x0A
+#define DRM_MSM_NUM_IOCTLS 0x0B
+
+/**
+ * Currently DRM framework supports only VSYNC event.
+ * Starting the custom events at 0xff to provide space for DRM
+ * framework to add new events.
+ */
+#define DRM_EVENT_HISTOGRAM 0xff
+#define DRM_EVENT_AD 0x100
#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
@@ -215,5 +260,10 @@ struct drm_msm_wait_fence {
#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
-
+#define DRM_IOCTL_SDE_WB_CONFIG \
+ DRM_IOW((DRM_COMMAND_BASE + DRM_SDE_WB_CONFIG), struct sde_drm_wb_cfg)
+#define DRM_IOCTL_MSM_REGISTER_EVENT DRM_IOW((DRM_COMMAND_BASE + \
+ DRM_MSM_REGISTER_EVENT), struct drm_msm_event_req)
+#define DRM_IOCTL_MSM_DEREGISTER_EVENT DRM_IOW((DRM_COMMAND_BASE + \
+ DRM_MSM_DEREGISTER_EVENT), struct drm_msm_event_req)
#endif /* __MSM_DRM_H__ */
diff --git a/include/uapi/drm/msm_drm_pp.h b/include/uapi/drm/msm_drm_pp.h
new file mode 100644
index 000000000000..9ed3a13953ef
--- /dev/null
+++ b/include/uapi/drm/msm_drm_pp.h
@@ -0,0 +1,82 @@
+#ifndef _MSM_DRM_PP_H_
+#define _MSM_DRM_PP_H_
+
+#include <drm/drm.h>
+
+/**
+ * struct drm_msm_pcc_coeff - PCC coefficient structure for each color
+ * component.
+ * @c: constant coefficient.
+ * @r: red coefficient.
+ * @g: green coefficient.
+ * @b: blue coefficient.
+ * @rg: red green coefficient.
+ * @gb: green blue coefficient.
+ * @rb: red blue coefficient.
+ * @rgb: red blue green coefficient.
+ */
+
+struct drm_msm_pcc_coeff {
+ __u32 c;
+ __u32 r;
+ __u32 g;
+ __u32 b;
+ __u32 rg;
+ __u32 gb;
+ __u32 rb;
+ __u32 rgb;
+};
+
+/**
+ * struct drm_msm_pcc - pcc feature structure
+ * flags: for customizing operations
+ * r: red coefficients.
+ * g: green coefficients.
+ * b: blue coefficients.
+ */
+
+struct drm_msm_pcc {
+ __u64 flags;
+ struct drm_msm_pcc_coeff r;
+ struct drm_msm_pcc_coeff g;
+ struct drm_msm_pcc_coeff b;
+};
+
+/* struct drm_msm_pa_vlut - picture adjustment vLUT structure
+ * flags: for customizing vlut operation
+ * val: vLUT values
+ */
+#define PA_VLUT_SIZE 256
+struct drm_msm_pa_vlut {
+ __u64 flags;
+ __u32 val[PA_VLUT_SIZE];
+};
+
+/* struct drm_msm_memcol - Memory color feature strucuture.
+ * Skin, sky, foliage features are supported.
+ * @prot_flags: Bit mask for enabling protection feature.
+ * @color_adjust_p0: Adjustment curve.
+ * @color_adjust_p1: Adjustment curve.
+ * @color_adjust_p2: Adjustment curve.
+ * @blend_gain: Blend gain weightage from othe PA features.
+ * @sat_hold: Saturation hold value.
+ * @val_hold: Value hold info.
+ * @hue_region: Hue qualifier.
+ * @sat_region: Saturation qualifier.
+ * @val_region: Value qualifier.
+ */
+#define DRM_MSM_MEMCOL
+struct drm_msm_memcol {
+ __u64 prot_flags;
+ __u32 color_adjust_p0;
+ __u32 color_adjust_p1;
+ __u32 color_adjust_p2;
+ __u32 blend_gain;
+ __u32 sat_hold;
+ __u32 val_hold;
+ __u32 hue_region;
+ __u32 sat_region;
+ __u32 val_region;
+};
+
+#endif /* _MSM_DRM_PP_H_ */
diff --git a/include/uapi/drm/sde_drm.h b/include/uapi/drm/sde_drm.h
new file mode 100644
index 000000000000..c7bed3b1ccf3
--- /dev/null
+++ b/include/uapi/drm/sde_drm.h
@@ -0,0 +1,298 @@
+#ifndef _SDE_DRM_H_
+#define _SDE_DRM_H_
+
+/* Total number of supported color planes */
+#define SDE_MAX_PLANES 4
+
+/* Total number of parameterized detail enhancer mapping curves */
+#define SDE_MAX_DE_CURVES 3
+
+ /* Y/RGB and UV filter configuration */
+#define FILTER_EDGE_DIRECTED_2D 0x0
+#define FILTER_CIRCULAR_2D 0x1
+#define FILTER_SEPARABLE_1D 0x2
+#define FILTER_BILINEAR 0x3
+
+/* Alpha filters */
+#define FILTER_ALPHA_DROP_REPEAT 0x0
+#define FILTER_ALPHA_BILINEAR 0x1
+#define FILTER_ALPHA_2D 0x3
+
+/* Blend filters */
+#define FILTER_BLEND_CIRCULAR_2D 0x0
+#define FILTER_BLEND_SEPARABLE_1D 0x1
+
+/* LUT configuration flags */
+#define SCALER_LUT_SWAP 0x1
+#define SCALER_LUT_DIR_WR 0x2
+#define SCALER_LUT_Y_CIR_WR 0x4
+#define SCALER_LUT_UV_CIR_WR 0x8
+#define SCALER_LUT_Y_SEP_WR 0x10
+#define SCALER_LUT_UV_SEP_WR 0x20
+
+/**
+ * Blend operations for "blend_op" property
+ *
+ * @SDE_DRM_BLEND_OP_NOT_DEFINED: No blend operation defined for the layer.
+ * @SDE_DRM_BLEND_OP_OPAQUE: Apply a constant blend operation. The layer
+ * would appear opaque in case fg plane alpha
+ * is 0xff.
+ * @SDE_DRM_BLEND_OP_PREMULTIPLIED: Apply source over blend rule. Layer already
+ * has alpha pre-multiplication done. If the fg
+ * plane alpha is less than 0xff, apply
+ * modulation as well. This operation is
+ * intended on layers having alpha channel.
+ * @SDE_DRM_BLEND_OP_COVERAGE: Apply source over blend rule. Layer is not
+ * alpha pre-multiplied. Apply
+ * pre-multiplication. If fg plane alpha is
+ * less than 0xff, apply modulation as well.
+ * @SDE_DRM_BLEND_OP_MAX: Used to track maximum blend operation
+ * possible by mdp.
+ */
+#define SDE_DRM_BLEND_OP_NOT_DEFINED 0
+#define SDE_DRM_BLEND_OP_OPAQUE 1
+#define SDE_DRM_BLEND_OP_PREMULTIPLIED 2
+#define SDE_DRM_BLEND_OP_COVERAGE 3
+#define SDE_DRM_BLEND_OP_MAX 4
+
+/**
+ * Bit masks for "src_config" property
+ * construct bitmask via (1UL << SDE_DRM_<flag>)
+ */
+#define SDE_DRM_DEINTERLACE 0 /* Specifies interlaced input */
+
+/* DRM bitmasks are restricted to 0..63 */
+#define SDE_DRM_BITMASK_COUNT 64
+
+/**
+ * struct sde_drm_pix_ext_v1 - version 1 of pixel ext structure
+ * @num_ext_pxls_lr: Number of total horizontal pixels
+ * @num_ext_pxls_tb: Number of total vertical lines
+ * @left_ftch: Number of extra pixels to overfetch from left
+ * @right_ftch: Number of extra pixels to overfetch from right
+ * @top_ftch: Number of extra lines to overfetch from top
+ * @btm_ftch: Number of extra lines to overfetch from bottom
+ * @left_rpt: Number of extra pixels to repeat from left
+ * @right_rpt: Number of extra pixels to repeat from right
+ * @top_rpt: Number of extra lines to repeat from top
+ * @btm_rpt: Number of extra lines to repeat from bottom
+ */
+struct sde_drm_pix_ext_v1 {
+ /*
+ * Number of pixels ext in left, right, top and bottom direction
+ * for all color components.
+ */
+ int32_t num_ext_pxls_lr[SDE_MAX_PLANES];
+ int32_t num_ext_pxls_tb[SDE_MAX_PLANES];
+
+ /*
+ * Number of pixels needs to be overfetched in left, right, top
+ * and bottom directions from source image for scaling.
+ */
+ int32_t left_ftch[SDE_MAX_PLANES];
+ int32_t right_ftch[SDE_MAX_PLANES];
+ int32_t top_ftch[SDE_MAX_PLANES];
+ int32_t btm_ftch[SDE_MAX_PLANES];
+ /*
+ * Number of pixels needs to be repeated in left, right, top and
+ * bottom directions for scaling.
+ */
+ int32_t left_rpt[SDE_MAX_PLANES];
+ int32_t right_rpt[SDE_MAX_PLANES];
+ int32_t top_rpt[SDE_MAX_PLANES];
+ int32_t btm_rpt[SDE_MAX_PLANES];
+
+};
+
+/**
+ * struct sde_drm_scaler_v1 - version 1 of struct sde_drm_scaler
+ * @lr: Pixel extension settings for left/right
+ * @tb: Pixel extension settings for top/botton
+ * @init_phase_x: Initial scaler phase values for x
+ * @phase_step_x: Phase step values for x
+ * @init_phase_y: Initial scaler phase values for y
+ * @phase_step_y: Phase step values for y
+ * @horz_filter: Horizontal filter array
+ * @vert_filter: Vertical filter array
+ */
+struct sde_drm_scaler_v1 {
+ /*
+ * Pix ext settings
+ */
+ struct sde_drm_pix_ext_v1 pe;
+ /*
+ * Phase settings
+ */
+ int32_t init_phase_x[SDE_MAX_PLANES];
+ int32_t phase_step_x[SDE_MAX_PLANES];
+ int32_t init_phase_y[SDE_MAX_PLANES];
+ int32_t phase_step_y[SDE_MAX_PLANES];
+
+ /*
+ * Filter type to be used for scaling in horizontal and vertical
+ * directions
+ */
+ uint32_t horz_filter[SDE_MAX_PLANES];
+ uint32_t vert_filter[SDE_MAX_PLANES];
+};
+
+/**
+ * struct sde_drm_de_v1 - version 1 of detail enhancer structure
+ * @enable: Enables/disables detail enhancer
+ * @sharpen_level1: Sharpening strength for noise
+ * @sharpen_level2: Sharpening strength for context
+ * @clip: Clip coefficient
+ * @limit: Detail enhancer limit factor
+ * @thr_quiet: Quite zone threshold
+ * @thr_dieout: Die-out zone threshold
+ * @thr_low: Linear zone left threshold
+ * @thr_high: Linear zone right threshold
+ * @prec_shift: Detail enhancer precision
+ * @adjust_a: Mapping curves A coefficients
+ * @adjust_b: Mapping curves B coefficients
+ * @adjust_c: Mapping curves C coefficients
+ */
+struct sde_drm_de_v1 {
+ uint32_t enable;
+ int16_t sharpen_level1;
+ int16_t sharpen_level2;
+ uint16_t clip;
+ uint16_t limit;
+ uint16_t thr_quiet;
+ uint16_t thr_dieout;
+ uint16_t thr_low;
+ uint16_t thr_high;
+ uint16_t prec_shift;
+ int16_t adjust_a[SDE_MAX_DE_CURVES];
+ int16_t adjust_b[SDE_MAX_DE_CURVES];
+ int16_t adjust_c[SDE_MAX_DE_CURVES];
+};
+
+/**
+ * struct sde_drm_scaler_v2 - version 2 of struct sde_drm_scaler
+ * @enable: Scaler enable
+ * @dir_en: Detail enhancer enable
+ * @pe: Pixel extension settings
+ * @horz_decimate: Horizontal decimation factor
+ * @vert_decimate: Vertical decimation factor
+ * @init_phase_x: Initial scaler phase values for x
+ * @phase_step_x: Phase step values for x
+ * @init_phase_y: Initial scaler phase values for y
+ * @phase_step_y: Phase step values for y
+ * @preload_x: Horizontal preload value
+ * @preload_y: Vertical preload value
+ * @src_width: Source width
+ * @src_height: Source height
+ * @dst_width: Destination width
+ * @dst_height: Destination height
+ * @y_rgb_filter_cfg: Y/RGB plane filter configuration
+ * @uv_filter_cfg: UV plane filter configuration
+ * @alpha_filter_cfg: Alpha filter configuration
+ * @blend_cfg: Selection of blend coefficients
+ * @lut_flag: LUT configuration flags
+ * @dir_lut_idx: 2d 4x4 LUT index
+ * @y_rgb_cir_lut_idx: Y/RGB circular LUT index
+ * @uv_cir_lut_idx: UV circular LUT index
+ * @y_rgb_sep_lut_idx: Y/RGB separable LUT index
+ * @uv_sep_lut_idx: UV separable LUT index
+ * @de: Detail enhancer settings
+*/
+struct sde_drm_scaler_v2 {
+ /*
+ * General definitions
+ */
+ uint32_t enable;
+ uint32_t dir_en;
+
+ /*
+ * Pix ext settings
+ */
+ struct sde_drm_pix_ext_v1 pe;
+
+ /*
+ * Decimation settings
+ */
+ uint32_t horz_decimate;
+ uint32_t vert_decimate;
+
+ /*
+ * Phase settings
+ */
+ int32_t init_phase_x[SDE_MAX_PLANES];
+ int32_t phase_step_x[SDE_MAX_PLANES];
+ int32_t init_phase_y[SDE_MAX_PLANES];
+ int32_t phase_step_y[SDE_MAX_PLANES];
+
+ uint32_t preload_x[SDE_MAX_PLANES];
+ uint32_t preload_y[SDE_MAX_PLANES];
+ uint32_t src_width[SDE_MAX_PLANES];
+ uint32_t src_height[SDE_MAX_PLANES];
+
+ uint32_t dst_width;
+ uint32_t dst_height;
+
+ uint32_t y_rgb_filter_cfg;
+ uint32_t uv_filter_cfg;
+ uint32_t alpha_filter_cfg;
+ uint32_t blend_cfg;
+
+ uint32_t lut_flag;
+ uint32_t dir_lut_idx;
+
+ /* for Y(RGB) and UV planes*/
+ uint32_t y_rgb_cir_lut_idx;
+ uint32_t uv_cir_lut_idx;
+ uint32_t y_rgb_sep_lut_idx;
+ uint32_t uv_sep_lut_idx;
+
+ /*
+ * Detail enhancer settings
+ */
+ struct sde_drm_de_v1 de;
+};
+
+
+/*
+ * Define constants for struct sde_drm_csc
+ */
+#define SDE_CSC_MATRIX_COEFF_SIZE 9
+#define SDE_CSC_CLAMP_SIZE 6
+#define SDE_CSC_BIAS_SIZE 3
+
+/**
+ * struct sde_drm_csc_v1 - version 1 of struct sde_drm_csc
+ * @ctm_coeff: Matrix coefficients, in S31.32 format
+ * @pre_bias: Pre-bias array values
+ * @post_bias: Post-bias array values
+ * @pre_clamp: Pre-clamp array values
+ * @post_clamp: Post-clamp array values
+ */
+struct sde_drm_csc_v1 {
+ int64_t ctm_coeff[SDE_CSC_MATRIX_COEFF_SIZE];
+ uint32_t pre_bias[SDE_CSC_BIAS_SIZE];
+ uint32_t post_bias[SDE_CSC_BIAS_SIZE];
+ uint32_t pre_clamp[SDE_CSC_CLAMP_SIZE];
+ uint32_t post_clamp[SDE_CSC_CLAMP_SIZE];
+};
+
+/* Writeback Config version definition */
+#define SDE_DRM_WB_CFG 0x1
+
+/* SDE_DRM_WB_CONFIG_FLAGS - Writeback configuration flags */
+#define SDE_DRM_WB_CFG_FLAGS_CONNECTED (1<<0)
+
+/**
+ * struct sde_drm_wb_cfg - Writeback configuration structure
+ * @flags: see DRM_MSM_WB_CONFIG_FLAGS
+ * @connector_id: writeback connector identifier
+ * @count_modes: Count of modes in modes_ptr
+ * @modes: Pointer to struct drm_mode_modeinfo
+ */
+struct sde_drm_wb_cfg {
+ uint32_t flags;
+ uint32_t connector_id;
+ uint32_t count_modes;
+ uint64_t modes;
+};
+
+#endif /* _SDE_DRM_H_ */