Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8809323 authored by Sravanthi Kollukuduru's avatar Sravanthi Kollukuduru
Browse files

drm/msm/dsi-staging: add support for dsi null packet insertion



For DSI6G v1.4.0 and above, DSI controller has support to insert
NULL packets in the middle of pixel data or DMA packets to avoid
HS-LP-HS transitions while the transfer is taking place.

Change-Id: I780495feca2030705f3f89909700a8a9d571564c
Signed-off-by: default avatarSravanthi Kollukuduru <skolluku@codeaurora.org>
parent f797d13b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -100,3 +100,4 @@ Optional properties:
					controller. This must be enabled for debugging purpose
					only with simulator panel. It should not be enabled for
					normal DSI panels.
- - qcom,null-insertion-enabled:	A boolean to enable NULL packet insertion feature for DSI controller.
+3 −1
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
 * @version:     DSI controller version.
 * @index:       DSI controller instance ID.
 * @phy_isolation_enabled:       DSI controller works isolated from phy.
 * @null_insertion_enabled:      DSI controller inserts null packet.
 *
 * This function setups the catalog information in the dsi_ctrl_hw object.
 *
@@ -120,7 +121,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
 */
int dsi_catalog_ctrl_setup(struct dsi_ctrl_hw *ctrl,
		   enum dsi_ctrl_version version, u32 index,
		   bool phy_isolation_enabled)
		   bool phy_isolation_enabled, bool null_insertion_enabled)
{
	int rc = 0;

@@ -131,6 +132,7 @@ int dsi_catalog_ctrl_setup(struct dsi_ctrl_hw *ctrl,
	}

	ctrl->index = index;
	ctrl->null_insertion_enabled = null_insertion_enabled;
	set_bit(DSI_CTRL_VIDEO_TPG, ctrl->feature_map);
	set_bit(DSI_CTRL_CMD_TPG, ctrl->feature_map);
	set_bit(DSI_CTRL_VARIABLE_REFRESH_RATE, ctrl->feature_map);
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
 * @version:     DSI controller version.
 * @index:       DSI controller instance ID.
 * @phy_isolation_enabled:       DSI controller works isolated from phy.
 * @null_insertion_enabled:      DSI controller inserts null packet.
 *
 * This function setups the catalog information in the dsi_ctrl_hw object.
 *
@@ -31,7 +32,7 @@
 */
int dsi_catalog_ctrl_setup(struct dsi_ctrl_hw *ctrl,
		   enum dsi_ctrl_version version, u32 index,
		   bool phy_isolation_enabled);
		   bool phy_isolation_enabled, bool null_insertion_enabled);

/**
 * dsi_catalog_phy_setup() - return catalog info for dsi phy hardware
+5 −1
Original line number Diff line number Diff line
@@ -1449,6 +1449,9 @@ static int dsi_ctrl_dts_parse(struct dsi_ctrl *dsi_ctrl,
	dsi_ctrl->phy_isolation_enabled = of_property_read_bool(of_node,
				    "qcom,dsi-phy-isolation-enabled");

	dsi_ctrl->null_insertion_enabled = of_property_read_bool(of_node,
					"qcom,null-insertion-enabled");

	return 0;
}

@@ -1506,7 +1509,8 @@ static int dsi_ctrl_dev_probe(struct platform_device *pdev)
	}

	rc = dsi_catalog_ctrl_setup(&dsi_ctrl->hw, dsi_ctrl->version,
		    dsi_ctrl->cell_index, dsi_ctrl->phy_isolation_enabled);
		dsi_ctrl->cell_index, dsi_ctrl->phy_isolation_enabled,
		dsi_ctrl->null_insertion_enabled);
	if (rc) {
		pr_err("Catalog does not support version (%d)\n",
		       dsi_ctrl->version);
+3 −0
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ struct dsi_ctrl_interrupts {
 * @misr_cache:          Cached Frame MISR value
 * @phy_isolation_enabled:    A boolean property allows to isolate the phy from
 *                          dsi controller and run only dsi controller.
 * @null_insertion_enabled:  A boolean property to allow dsi controller to
 *                           insert null packet.
 */
struct dsi_ctrl {
	struct platform_device *pdev;
@@ -239,6 +241,7 @@ struct dsi_ctrl {
	u32 misr_cache;

	bool phy_isolation_enabled;
	bool null_insertion_enabled;
};

/**
Loading