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

Commit 8ef25401 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dsi-staging: validate dsi command size before sending command."

parents 2046b6d2 37c9cf2d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1076,7 +1076,19 @@ int dsi_message_validate_tx_mode(struct dsi_ctrl *dsi_ctrl,
			pr_err(" Cannot transfer command,ops not defined\n");
			return -ENOTSUPP;
		}
		if ((cmd_len + 4) > SZ_4K) {
			pr_err("Cannot transfer,size is greater than 4096\n");
			return -ENOTSUPP;
		}
	}

	if (*flags & DSI_CTRL_CMD_FETCH_MEMORY) {
		if ((dsi_ctrl->cmd_len + cmd_len + 4) > SZ_4K) {
			pr_err("Cannot transfer,size is greater than 4096\n");
			return -ENOTSUPP;
		}
	}

	return rc;
}