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

Commit 76d89c1e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: add support for no blend planes"

parents 6b664b94 078d4279
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
@@ -593,6 +593,62 @@ struct drm_msm_spr_init_cfg {
	int cfg17[SPR_INIT_PARAM_SIZE_4];
};

#define FEATURE_DEM
#define CFG0_PARAM_LEN 8
#define CFG1_PARAM_LEN 8
#define CFG1_PARAM0_LEN 153
#define CFG0_PARAM2_LEN 256
#define CFG5_PARAM01_LEN 4
#define CFG3_PARAM01_LEN 4

struct drm_msm_dem_cfg {
	__u64 flags;
	__u32 pentile;
	__u32 cfg0_en;
	__u32 cfg0_param0_len;
	__u32 cfg0_param0[CFG0_PARAM_LEN];
	__u32 cfg0_param1_len;
	__u32 cfg0_param1[CFG0_PARAM_LEN];
	__u32 cfg0_param2_len;
	__u64 cfg0_param2_c0[CFG0_PARAM2_LEN];
	__u64 cfg0_param2_c1[CFG0_PARAM2_LEN];
	__u64 cfg0_param2_c2[CFG0_PARAM2_LEN];
	__u32 cfg0_param3_len;
	__u32 cfg0_param3_c0[CFG0_PARAM_LEN];
	__u32 cfg0_param3_c1[CFG0_PARAM_LEN];
	__u32 cfg0_param3_c2[CFG0_PARAM_LEN];
	__u32 cfg0_param4_len;
	__u32 cfg0_param4[CFG0_PARAM_LEN];

	__u32 cfg1_en;
	__u32 cfg1_high_idx;
	__u32 cfg1_low_idx;
	__u32 cfg01_param0_len;
	__u32 cfg01_param0[CFG1_PARAM_LEN];
	__u32 cfg1_param0_len;
	__u32 cfg1_param0_c0[CFG1_PARAM0_LEN];
	__u32 cfg1_param0_c1[CFG1_PARAM0_LEN];
	__u32 cfg1_param0_c2[CFG1_PARAM0_LEN];

	__u32 cfg2_en;
	__u32 cfg3_en;
	__u32 cfg3_param0_len;
	__u32 cfg3_param0_a[CFG3_PARAM01_LEN];
	__u32 cfg3_param0_b[CFG3_PARAM01_LEN];
	__u32 cfg3_ab_adj;
	__u32 cfg4_en;
	__u32 cfg5_en;
	__u32 cfg5_param0_len;
	__u32 cfg5_param0[CFG5_PARAM01_LEN];
	__u32 cfg5_param1_len;
	__u32 cfg5_param1[CFG5_PARAM01_LEN];

	__u32 c0_depth;
	__u32 c1_depth;
	__u32 c2_depth;
	__u32 src_id;
};

/**
 * struct drm_msm_ad4_manual_str_cfg - ad4 manual strength config set
 * by user-space client.
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _SDE_DRM_H_
@@ -59,12 +59,14 @@ extern "C" {
 *                                  less than 0xff, apply modulation as well.
 * @SDE_DRM_BLEND_OP_MAX:           Used to track maximum blend operation
 *                                  possible by mdp.
 * @SDE_DRM_BLEND_OP_SKIP:          Skip staging the layer in the layer mixer.
 */
#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
#define SDE_DRM_BLEND_OP_SKIP           5

/**
 * Bit masks for "src_config" property
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _DSI_CTRL_H_
@@ -195,6 +195,7 @@ struct dsi_ctrl_interrupts {
 * @clk_cb:		 Callback for DSI clock control.
 * @irq_info:            Interrupt information.
 * @recovery_cb:         Recovery call back to SDE.
 * @panel_id_cb:         Callback for reporting panel id.
 * @clk_info:            Clock information.
 * @clk_freq:            DSi Link clock frequency information.
 * @pwr_info:            Power information.
@@ -247,6 +248,7 @@ struct dsi_ctrl {

	struct dsi_ctrl_interrupts irq_info;
	struct dsi_event_cb_info recovery_cb;
	struct dsi_event_cb_info panel_id_cb;

	/* Clock and power states */
	struct dsi_ctrl_clk_info clk_info;
+35 −1
Original line number Diff line number Diff line
@@ -2044,6 +2044,12 @@ void dsi_display_enable_event(struct drm_connector *connector,
							*event_info;
		}
		break;
	case SDE_CONN_EVENT_PANEL_ID:
		if (event_info)
			display_for_each_ctrl(i, display)
				display->ctrl[i].ctrl->panel_id_cb
				    = *event_info;
		break;
	default:
		/* nothing to do */
		DSI_DEBUG("[%s] unhandled event %d\n", display->name, event_idx);
@@ -2151,6 +2157,7 @@ static void dsi_display_parse_cmdline_topology(struct dsi_display *display,
	char *sw_te = NULL;
	unsigned long cmdline_topology = NO_OVERRIDE;
	unsigned long cmdline_timing = NO_OVERRIDE;
	unsigned long panel_id = NO_OVERRIDE;

	if (display_type >= MAX_DSI_ACTIVE_DISPLAY) {
		DSI_ERR("display_type=%d not supported\n", display_type);
@@ -2166,6 +2173,17 @@ static void dsi_display_parse_cmdline_topology(struct dsi_display *display,
	if (sw_te)
		display->sw_te_using_wd = true;

	str = strnstr(boot_str, ":panelid", strlen(boot_str));
	if (str) {
		if (kstrtol(str + strlen(":panelid"), INT_BASE_10,
				(unsigned long *)&panel_id)) {
			DSI_INFO("panel id not found: %s\n", boot_str);
		} else {
			DSI_INFO("panel id found: %lx\n", panel_id);
			display->panel_id = panel_id;
		}
	}

	str = strnstr(boot_str, ":config", strlen(boot_str));
	if (!str)
		goto end;
@@ -5193,6 +5211,8 @@ int dsi_display_dev_probe(struct platform_device *pdev)
		rc =  -EINVAL;
		goto end;
	}
	/* initialize panel id to UINT64_MAX */
	display->panel_id = ~0x0;

	display->display_type = of_get_property(pdev->dev.of_node,
				"label", NULL);
@@ -7314,6 +7334,18 @@ int dsi_display_pre_commit(void *display,
	return rc;
}

static void dsi_display_panel_id_notification(struct dsi_display *display)
{
	if (display->panel_id != ~0x0 &&
		display->ctrl[0].ctrl->panel_id_cb.event_cb) {
		display->ctrl[0].ctrl->panel_id_cb.event_cb(
			display->ctrl[0].ctrl->panel_id_cb.event_usr_ptr,
			display->ctrl[0].ctrl->panel_id_cb.event_idx,
			0, ((display->panel_id & 0xffffffff00000000) >> 31),
			(display->panel_id & 0xffffffff), 0, 0);
	}
}

int dsi_display_enable(struct dsi_display *display)
{
	int rc = 0;
@@ -7346,6 +7378,8 @@ int dsi_display_enable(struct dsi_display *display)

		display->panel->panel_initialized = true;
		DSI_DEBUG("cont splash enabled, display enable not required\n");
		dsi_display_panel_id_notification(display);

		return 0;
	}

@@ -7369,7 +7403,7 @@ int dsi_display_enable(struct dsi_display *display)
			goto error;
		}
	}

	dsi_display_panel_id_notification(display);
	/* Block sending pps command if modeset is due to fps difference */
	if ((mode->priv_info->dsc_enabled ||
			mode->priv_info->vdc_enabled) &&
+3 −0
Original line number Diff line number Diff line
@@ -275,6 +275,9 @@ struct dsi_display {
	u32 clk_gating_config;
	bool queue_cmd_waits;
	struct workqueue_struct *dma_cmd_workq;

	/* panel id of the display */
	u64 panel_id;
};

int dsi_display_dev_probe(struct platform_device *pdev);
Loading