Files
android_kernel_samsung_sm86…/msm/dp/dp_mst_sim.h
Xiaowen Wu fdb86d6f62 disp: msm: dp: add new APIs to dp_mst_sim
Add below new APIs to dp_mst_sim to allow more controls from other
dp modules:

dp_sim_create_bridge: create dp_sim bridge simulator.
dp_sim_destroy_bridge: destroy dp_sim bridge simulator.
dp_sim_set_sim_mode: enable/disable simulation mode.
dp_sim_set_mst_mode: update dp-mst simulation mode.
dp_sim_update_port_status: update dp-mst port status in simulator.
dp_sim_update_port_edid: update dp-sst/mst port edid in simulator.
dp_sim_write_dpcd_reg: update dpcd register in simulator.
dp_sim_read_dpcd_reg: read dpcd register from simulator.

With the new functions dp_debug can move its internal debug function
to dp aux simulator, and dp_display can switch between simulation
mode and physical mode dynamically.

Change-Id: I26296b45a38dac422b8a098b50dca287909c8000
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-10 22:34:33 -05:00

52 lines
1.6 KiB
C

/* Copyright (c) 2019-2021, 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 _DP_MST_SIM_H_
#define _DP_MST_SIM_H_
#include "dp_aux_bridge.h"
#include "dp_mst_sim_helper.h"
#include <drm/drm_connector.h>
#include <drm/drm_modes.h>
enum dp_sim_mode_type {
DP_SIM_MODE_EDID = 0x00000001,
DP_SIM_MODE_DPCD_READ = 0x00000002,
DP_SIM_MODE_DPCD_WRITE = 0x00000004,
DP_SIM_MODE_LINK_TRAIN = 0x00000008,
DP_SIM_MODE_MST = 0x00000010,
DP_SIM_MODE_ALL = 0x0000001F,
};
int dp_sim_create_bridge(struct device *dev,
struct dp_aux_bridge **bridge);
int dp_sim_destroy_bridge(struct dp_aux_bridge *bridge);
int dp_sim_set_sim_mode(struct dp_aux_bridge *bridge, u32 sim_mode);
int dp_sim_update_port_num(struct dp_aux_bridge *bridge, u32 port_num);
int dp_sim_update_port_status(struct dp_aux_bridge *bridge,
int port, enum drm_connector_status status);
int dp_sim_update_port_edid(struct dp_aux_bridge *bridge,
int port, const u8 *edid, u32 size);
int dp_sim_write_dpcd_reg(struct dp_aux_bridge *bridge,
const u8 *dpcd, u32 size, u32 offset);
int dp_sim_read_dpcd_reg(struct dp_aux_bridge *bridge,
u8 *dpcd, u32 size, u32 offset);
#endif /* _DP_MST_SIM_H_ */