Merge branch 'mdss-final-replay' into msm-4.4
This merge brings all display changes from msm-3.18 kernel.
* (58 commits)
msm: mdss: add support for additional DMA pipes
msm: mdss: refactor device tree pipe parsing logic
msm: mdss: refactor mixer configuration code
msm: mdss: add support for secure display on msm8953.
msm: mdss: disable ECG feature on 28nm PHY platform
msm: mdss: send DSI command using TPG when in secure session
msm: mdss: Update histogram and PA LUT in mdss V3
msm: mdss: validate layer count before copying userdata
msm: mdss: Fix potential NULL pointer dereferences
Revert "msm: mdss: Remove redundant handoff pending check"
msm: mdss: hdmi: Do not treat intermediate ddc error as failure
msm: mdss: revisit igc pipe enumeration logic
msm: mdss: Add PA support for mdss V3
msm: mdss: Add support for mdss v3 ops
msm: mdss: Update the postprocessing ops using mdss revision
msm: mdss: update the caching payload based on mdss version
msm: clk: hdmi: add support for atomic update
msm: sde: Add v4l2 rotator driver to enable multi-context usecase
msm: mdss: refactor pipe type checks
msm: mdss: add proper layer zorder validation
msm: mdss: stub bus scaling functions if driver is disabled
msm: mdss: avoid failure if primary panel pref is not enabled
msm: adv7533: add support for clients to read audio block
msm: mdss: add lineptr interrupt support for command mode panels
msm: mdss: update rotator frame rate in the pipe configuration
mdss: msm: Avoid excessive failure logs in igc config
msm: mdss: delay dma commands for split-dsi cmd mode panels
msm: mdss: enable GDSC before enabling clocks in MDP3 probe
mdss: dsi: turn off phy power supply during static screen
mdss: dsi: read dsi and phy revision during dsi ctrl probe
msm: mdss: Fix memory leak in MDP3 driver
msm: mdss: delay overlay start until first update for external
msm: mdss: free splash memory for MSM8909w after splash done
msm: mdss: hdmi: separate audio from transmitter core
msm: mdss: disable dsi burst mode when idle is enabled
msm: mdss: remove invalid csc initialization during hw init
msm: mdss: dsi: increase dsi error count only for valid errors
msm: mdss: remove HIST LUT programming in mdss_hw_init
msm: mdss: dsi: ignore error interrupt when mask not set
msm: mdss: add support to configure bus scale vectors from dt
msm: mdss: unstage the pipe if there is z_order mismatch
msm: mdss: squash MDP3 driver changes and SMMU change
msm: mdss: Read the bridge chip name and instance id from DTSI
msm: mdss: Enable continuous splash on bridge chip
msm: mdss: Fix multiple bridge chip usecase
msm: mdss: Enable export of mdss interrupt to external driver
msm: mdss: rotator: turn off rotator clock in wq release
msm: mdss: fix ulps during suspend feature logic
clk: msm: mdss: program correct divider for PLL configuration
msm: mdss: fix DSI PHY timing configuration logic
msm: mdss: hdmi: add support for hdmi simulation
msm: mdss: handle race condition in pingpong done counter
clk: qcom: mdss: calculate pixel clock for HDMI during handoff
msm: mdss: ensure proper dynamic refresh programming for dual DSI
msm: mdss: Add fps flag and update blit request version
msm: mdss: initialize fb split values during fb probe
mdss: mdp: fix rotator compat layer copy
msm: mdss: handle DSI ctrl/PHY regulator control properly
Conflicts:
Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
Documentation/devicetree/bindings/fb/mdss-dsi.txt
Documentation/devicetree/bindings/fb/mdss-mdp.txt
arch/arm/boot/dts/qcom/dsi-adv7533-1080p.dtsi
arch/arm/boot/dts/qcom/dsi-adv7533-720p.dtsi
arch/arm/boot/dts/qcom/msm8996-agave-adp.dtsi
drivers/media/platform/msm/Kconfig
drivers/media/platform/msm/Makefile
drivers/misc/hdcp.c
drivers/video/fbdev/msm/Makefile
drivers/video/fbdev/msm/mdp3.c
drivers/video/fbdev/msm/mdp3.h
drivers/video/fbdev/msm/mdp3_ctrl.c
drivers/video/fbdev/msm/mdp3_ctrl.h
drivers/video/fbdev/msm/mdp3_dma.c
drivers/video/fbdev/msm/mdp3_dma.h
drivers/video/fbdev/msm/mdp3_hwio.h
drivers/video/fbdev/msm/mdp3_ppp.c
drivers/video/fbdev/msm/mdp3_ppp.h
drivers/video/fbdev/msm/mdp3_ppp_hwio.c
drivers/video/fbdev/msm/mdss.h
drivers/video/fbdev/msm/mdss_compat_utils.c
drivers/video/fbdev/msm/mdss_dba_utils.c
drivers/video/fbdev/msm/mdss_dba_utils.h
drivers/video/fbdev/msm/mdss_debug.c
drivers/video/fbdev/msm/mdss_dsi.c
drivers/video/fbdev/msm/mdss_dsi.h
drivers/video/fbdev/msm/mdss_dsi_clk.c
drivers/video/fbdev/msm/mdss_dsi_host.c
drivers/video/fbdev/msm/mdss_dsi_panel.c
drivers/video/fbdev/msm/mdss_fb.c
drivers/video/fbdev/msm/mdss_fb.h
drivers/video/fbdev/msm/mdss_hdmi_edid.c
drivers/video/fbdev/msm/mdss_hdmi_hdcp2p2.c
drivers/video/fbdev/msm/mdss_hdmi_tx.c
drivers/video/fbdev/msm/mdss_hdmi_tx.h
drivers/video/fbdev/msm/mdss_hdmi_util.c
drivers/video/fbdev/msm/mdss_mdp.c
drivers/video/fbdev/msm/mdss_mdp.h
drivers/video/fbdev/msm/mdss_mdp_ctl.c
drivers/video/fbdev/msm/mdss_mdp_hwio.h
drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c
drivers/video/fbdev/msm/mdss_mdp_layer.c
drivers/video/fbdev/msm/mdss_mdp_overlay.c
drivers/video/fbdev/msm/mdss_mdp_pipe.c
drivers/video/fbdev/msm/mdss_mdp_pp.c
drivers/video/fbdev/msm/mdss_mdp_pp.h
drivers/video/fbdev/msm/mdss_mdp_pp_cache_config.c
drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c
drivers/video/fbdev/msm/mdss_mdp_util.c
drivers/video/fbdev/msm/mdss_panel.h
drivers/video/fbdev/msm/mdss_rotator.c
drivers/video/fbdev/msm/mdss_rotator_internal.h
drivers/video/fbdev/msm/mdss_smmu.c
drivers/video/fbdev/msm/msm_dba/adv7533.c
drivers/video/fbdev/msm/msm_mdss_io_8974.c
include/uapi/linux/msm_mdp.h
include/video/msm_dba.h
CRs-Fixed: 1000197
Change-Id: I521519c8abe8eed6924e2fbe3e1a026126582b77
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Narendra Muppalla <narendram@codeaurora.org>
diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_r1_internal.h b/drivers/media/platform/msm/sde/rotator/sde_rotator_r1_internal.h
new file mode 100644
index 0000000..b451775
--- /dev/null
+++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_r1_internal.h
@@ -0,0 +1,171 @@
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __SDE_ROTATOR_R1_INTERNAL_H__
+#define __SDE_ROTATOR_R1_INTERNAL_H__
+
+#include <linux/types.h>
+#include <linux/file.h>
+#include <linux/kref.h>
+#include <linux/kernel.h>
+
+#include "sde_rotator_util.h"
+
+/**
+ * enum sde_commit_stage_type - Indicate different commit stages
+ */
+enum sde_commit_stage_type {
+ SDE_COMMIT_STAGE_SETUP_DONE,
+ SDE_COMMIT_STAGE_READY_FOR_KICKOFF,
+};
+
+enum sde_mdp_wb_ctl_type {
+ SDE_MDP_WB_CTL_TYPE_BLOCK = 1,
+ SDE_MDP_WB_CTL_TYPE_LINE
+};
+
+enum sde_mdp_mixer_mux {
+ SDE_MDP_MIXER_MUX_DEFAULT,
+ SDE_MDP_MIXER_MUX_LEFT,
+ SDE_MDP_MIXER_MUX_RIGHT,
+};
+
+enum sde_mdp_pipe_type {
+ SDE_MDP_PIPE_TYPE_UNUSED,
+ SDE_MDP_PIPE_TYPE_VIG,
+ SDE_MDP_PIPE_TYPE_RGB,
+ SDE_MDP_PIPE_TYPE_DMA,
+ SDE_MDP_PIPE_TYPE_CURSOR,
+};
+
+struct sde_mdp_data;
+struct sde_mdp_ctl;
+struct sde_mdp_pipe;
+struct sde_mdp_mixer;
+struct sde_mdp_wb;
+
+struct sde_mdp_writeback {
+ u32 num;
+ char __iomem *base;
+ u32 offset;
+};
+
+struct sde_mdp_ctl_intfs_ops {
+ int (*start_fnc)(struct sde_mdp_ctl *ctl);
+ int (*stop_fnc)(struct sde_mdp_ctl *ctl, int panel_power_state);
+ int (*prepare_fnc)(struct sde_mdp_ctl *ctl, void *arg);
+ int (*display_fnc)(struct sde_mdp_ctl *ctl, void *arg);
+ int (*wait_fnc)(struct sde_mdp_ctl *ctl, void *arg);
+};
+
+struct sde_mdp_ctl {
+ u32 num;
+ char __iomem *base;
+ u32 opmode;
+ u32 flush_bits;
+ u32 flush_reg_data;
+ bool is_secure;
+ struct sde_rot_data_type *mdata;
+ struct sde_mdp_mixer *mixer_left;
+ struct sde_mdp_mixer *mixer_right;
+ void *priv_data;
+ u32 wb_type;
+ struct sde_mdp_writeback *wb;
+ struct sde_mdp_ctl_intfs_ops ops;
+ u32 offset;
+ int irq_num;
+};
+
+struct sde_mdp_mixer {
+ u32 num;
+ char __iomem *base;
+ u8 rotator_mode;
+ struct sde_mdp_ctl *ctl;
+ u32 offset;
+};
+
+struct sde_mdp_shared_reg_ctrl {
+ u32 reg_off;
+ u32 bit_off;
+};
+
+struct sde_mdp_pipe {
+ u32 num;
+ u32 type;
+ u32 ndx;
+ char __iomem *base;
+ u32 xin_id;
+ u32 flags;
+ u32 bwc_mode;
+ u16 img_width;
+ u16 img_height;
+ u8 horz_deci;
+ u8 vert_deci;
+ struct sde_rect src;
+ struct sde_rect dst;
+ struct sde_mdp_format_params *src_fmt;
+ struct sde_mdp_plane_sizes src_planes;
+ struct sde_mdp_mixer *mixer_left;
+ struct sde_mdp_mixer *mixer_right;
+ u32 params_changed;
+ u32 offset;
+};
+
+struct sde_mdp_writeback_arg {
+ struct sde_mdp_data *data;
+ void *priv_data;
+};
+
+struct sde_mdp_commit_cb {
+ void *data;
+ int (*commit_cb_fnc)(enum sde_commit_stage_type commit_state,
+ void *data);
+};
+
+static inline void sde_mdp_ctl_write(struct sde_mdp_ctl *ctl,
+ u32 reg, u32 val)
+{
+ SDEROT_DBG("ctl%d:%6.6x:%8.8x\n", ctl->num, ctl->offset + reg, val);
+ writel_relaxed(val, ctl->base + reg);
+}
+
+static inline bool sde_mdp_is_nrt_vbif_client(struct sde_rot_data_type *mdata,
+ struct sde_mdp_pipe *pipe)
+{
+ return mdata->vbif_nrt_io.base && pipe->mixer_left &&
+ pipe->mixer_left->rotator_mode;
+}
+int sde_mdp_set_intr_callback(u32 intr_type, u32 intf_num,
+ void (*fnc_ptr)(void *), void *arg);
+int sde_mdp_display_wait4comp(struct sde_mdp_ctl *ctl);
+int sde_mdp_writeback_display_commit(struct sde_mdp_ctl *ctl, void *arg);
+int sde_mdp_pipe_queue_data(struct sde_mdp_pipe *pipe,
+ struct sde_mdp_data *src_data);
+struct sde_mdp_ctl *sde_mdp_ctl_alloc(struct sde_rot_data_type *mdata,
+ u32 off);
+struct sde_mdp_writeback *sde_mdp_wb_assign(u32 num, u32 reg_index);
+void sde_mdp_wb_free(struct sde_mdp_writeback *wb);
+struct sde_mdp_mixer *sde_mdp_mixer_assign(u32 id, bool wb);
+int sde_mdp_writeback_start(struct sde_mdp_ctl *ctl);
+struct sde_mdp_pipe *sde_mdp_pipe_assign(struct sde_rot_data_type *mdata,
+ struct sde_mdp_mixer *mixer, u32 ndx);
+int sde_mdp_pipe_destroy(struct sde_mdp_pipe *pipe);
+int sde_mdp_ctl_free(struct sde_mdp_ctl *ctl);
+int sde_mdp_display_commit(struct sde_mdp_ctl *ctl, void *arg,
+ struct sde_mdp_commit_cb *commit_cb);
+int sde_mdp_mixer_pipe_update(struct sde_mdp_pipe *pipe,
+ struct sde_mdp_mixer *mixer, int params_changed);
+int sde_mdp_get_pipe_flush_bits(struct sde_mdp_pipe *pipe);
+struct sde_mdp_ctl *sde_mdp_ctl_mixer_switch(struct sde_mdp_ctl *ctl,
+ u32 return_type);
+struct sde_mdp_mixer *sde_mdp_mixer_get(struct sde_mdp_ctl *ctl, int mux);
+#endif /* __SDE_ROTATOR_R1_INTERNAL_H__ */