Files
android_kernel_motorola_sm6225/msm/sde/sde_motUtil.h
T
Bang Nguyen 912a0498c8 disp: msm: Add DispUtil tool to motUtil Debugfs
Add the Display Utility(DispUtil) support to the motUtil Debugfs Framework.
This dispUtil tool will send a command from the motUtil debugfs to the panel
or it can read any information from panel back.
The 1st byte (set to 0) will indicate for the displUtil tool.

DispUtil Format:

1st         2nd         3rd    4th  5th       6th
0=DispUtil  0=Pri Disp 0=write 0=HS 0=DCS     number byte to read
            1=Sec Disp 1=read  1=LP 1=Generic

7th        8th         9th....
payldLen_u payldLen_l  payload

Port from: 79ee37d

Change-Id: Ib95d46342915543f942926df167e915cdd733252
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444398
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509800
Reviewed-by: Hua Tan <tanhua1@motorola.com>
2023-06-01 00:43:20 -03:00

64 lines
1.4 KiB
C

/*
* Copyright (c) 2018-2019, 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 __MOTUTIL_H__
#define __MOTUTIL_H__
#include <linux/debugfs.h>
#include <linux/types.h>
enum sde_motUtil_type {
MOTUTIL_DISP_UTIL = 0,
};
enum sde_motUtil_disp_cmd {
DISPUTIL_TYPE = 0,
DISPUTIL_PANEL_TYPE,
DISPUTIL_CMD_TYPE,
DISPUTIL_CMD_XFER_MODE,
DISPUTIL_MIPI_CMD_TYPE,
DISPUTIL_NUM_BYTE_RD,
DISPUTIL_PAYLOAD_LEN_U,
DISPUTIL_PAYLOAD_LEN_L,
DISPUTIL_PAYLOAD,
};
struct motUtil {
struct mutex lock;
enum sde_motUtil_type motUtil_type;
bool read_cmd;
bool last_cmd_tx_status;
u16 read_len;
u8 *rd_buf;
int val;
bool te_enable;
};
#define DISPUTIL_DSI_WRITE 0
#define DISPUTIL_DSI_READ 1
#define DISPUTIL_DSI_DCS 0
#define DISPUTIL_DSI_GENERIC 1
#define DISPUTIL_DSI_HS_MODE 0
#define DISPUTIL_DSI_LP_MODE 1
#define MOTUTIL_MAIN_DISP 0
#define MOTUTIL_CLI_DISP 1
int sde_debugfs_mot_util_init(struct sde_kms *sde_kms,
struct dentry *parent);
#endif /* __MOTUTIL_H__ */