disp: msm: dsi: avoid debugfs HW access based on HW ownership

Add VM ownership checks before accessing the HW through the debugfs
path in dsi display/ctrl modules to avoid illegal access.

Change-Id: Ia6e2ab0ef60d0f11e5945a63885d939db2ef78b0
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
这个提交包含在:
Veera Sundaram Sankaran
2020-12-08 15:37:29 -08:00
提交者 Dhaval Patel
父节点 b261fe33db
当前提交 04fea2ede3
修改 2 个文件,包含 52 行新增3 行删除

查看文件

@@ -187,6 +187,7 @@ struct dsi_display_ext_bridge {
* @is_active: status of the display
* @trusted_vm_env: Set to true, it the executing VM is Trusted VM.
* Set to false, otherwise.
* @hw_ownership: Indicates if VM owns the hardware resources.
* @tx_cmd_buf_ndx: Index to the DSI debugfs TX CMD buffer.
* @cmd_set: Debugfs TX cmd set.
* @enabled: Boolean to indicate display enabled.
@@ -287,6 +288,7 @@ struct dsi_display {
bool is_active;
bool trusted_vm_env;
bool hw_ownership;
int tx_cmd_buf_ndx;
struct dsi_panel_cmd_set cmd_set;