drm: mipi: Disable the MIPI DSI commands 0x2E and 0x3E

For the Secure UI feature, the display feature, which allows host to
read-back its internal memory buffer, should be disable. The MIPI DSI
command 0x2E (read_memory_start) and 0x3E (read_memory_continue) will
be disable.

Port from: bde6847

Change-Id: Ifc2579051e8005de5e915aad1bccd883c681572f
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444417
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509784
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This commit is contained in:
Bang Nguyen authored and Gilberto Gambugge committed 2023-06-01 00:47:06 -03:00
1 parent 988ac19a0c
commit 6ae21ba490
1 file changed
+9
+9
View File
@@ -445,6 +445,8 @@ EXPORT_SYMBOL(mipi_dsi_packet_format_is_long);
int mipi_dsi_create_packet(struct mipi_dsi_packet *packet,
const struct mipi_dsi_msg *msg)
{
const u8 *dsi_buf;
if (!packet || !msg)
return -EINVAL;
@@ -456,6 +458,13 @@ int mipi_dsi_create_packet(struct mipi_dsi_packet *packet,
if (msg->channel > 3)
return -EINVAL;
dsi_buf = msg->tx_buf;
if ((dsi_buf[0] == MIPI_DCS_READ_MEMORY_START) ||
(dsi_buf[0] == MIPI_DCS_READ_MEMORY_CONTINUE)) {
pr_debug("%s: Invalid dsi_cmd=0x%4x\n", __func__, dsi_buf[0]);
return -EINVAL;
}
memset(packet, 0, sizeof(*packet));
packet->header[2] = ((msg->channel & 0x3) << 6) | (msg->type & 0x3f);