mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Merge tag 'LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers into android13-5.4-lahaina
LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0 * tag 'LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers: disp: msm: dsi: Fix potential data race in ctrl isr disp: msm: dsi: Fix potential data race in ctrl isr disp: msm: dsi: Fix potential data race in ctrl isr msm: smmu: Unregister SMMU fault handler before cleanup disp: msm: sde: Add change to fix slab out of bounds disp: msm: sde: fix splash resource cleanup for edp disp: msm: sde: get_modes from connector if not present disp: msm: dp: handle panel_init when host is ready disp: msm: sde: fix kms NULL pointer access in encoder IRQ control disp: msm: dsi: add support for hibernation disp: config: fix copyright marking for lahaina config disp: config: fix copyright marking for lahaina config disp: msm: dsi: fix error path for dsi_display init disp: msm: dsi: add null pointer check in dsi_display_dev_remove disp: config :disable CONFIG_DSI_PARSER for kodiak disp: msm: dp: parse display_type before connector initialization Conflicts: techpack/display/msm/dsi/dsi_display.c Change-Id: I5263698636da978ff39d868e2305e3f4699e3ac8
This commit is contained in:
commit
3700e67df3
13 changed files with 87 additions and 46 deletions
|
|
@ -4,7 +4,7 @@ export CONFIG_DRM_MSM_DP=y
|
|||
export CONFIG_DRM_MSM_DP_MST=y
|
||||
export CONFIG_SYNC_FILE=y
|
||||
export CONFIG_DRM_MSM_DSI=y
|
||||
export CONFIG_DSI_PARSER=y
|
||||
export CONFIG_DSI_PARSER=n
|
||||
export CONFIG_DRM_SDE_WB=y
|
||||
export CONFIG_DRM_MSM_REGISTER_LOGGING=y
|
||||
export CONFIG_QCOM_MDSS_PLL=y
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define CONFIG_DRM_MSM 1
|
||||
|
|
@ -9,7 +10,6 @@
|
|||
#define CONFIG_DRM_MSM_SDE 1
|
||||
#define CONFIG_SYNC_FILE 1
|
||||
#define CONFIG_DRM_MSM_DSI 1
|
||||
#define CONFIG_DSI_PARSER 1
|
||||
#define CONFIG_DRM_SDE_WB 1
|
||||
#define CONFIG_DRM_MSM_REGISTER_LOGGING 1
|
||||
#define CONFIG_DRM_SDE_EVTLOG_DEBUG 1
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -1184,6 +1184,7 @@ error_ctrl:
|
|||
static int dp_display_panel_ready(struct dp_display_private *dp)
|
||||
{
|
||||
int rc = 0;
|
||||
bool skip_op = is_skip_required(&dp->dp_display);
|
||||
|
||||
if (dp->dp_display.is_edp) {
|
||||
rc = dp->power->edp_panel_set_gpio(dp->power, DP_GPIO_EDP_VCC_EN, true);
|
||||
|
|
@ -1201,9 +1202,9 @@ static int dp_display_panel_ready(struct dp_display_private *dp)
|
|||
}
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
dp->panel->init(dp->panel, skip_op);
|
||||
}
|
||||
if (!dp->dp_display.cont_splash_enabled)
|
||||
dp->panel->init(dp->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1247,6 +1248,8 @@ static int dp_display_host_ready(struct dp_display_private *dp)
|
|||
dp->ctrl->abort(dp->ctrl, false);
|
||||
|
||||
dp->aux->init(dp->aux, dp->parser->aux_cfg, skip_op);
|
||||
dp->panel->init(dp->panel, skip_op);
|
||||
|
||||
dp_display_state_add(DP_STATE_READY);
|
||||
/* log this as it results from user action of cable connection */
|
||||
DP_INFO("[OK]\n");
|
||||
|
|
@ -3918,6 +3921,7 @@ static int dp_display_get_display_type(struct dp_display *dp_display,
|
|||
const char **display_type)
|
||||
{
|
||||
struct dp_display_private *dp;
|
||||
struct device_node *of_node;
|
||||
|
||||
if (!dp_display || !display_type) {
|
||||
pr_err("invalid input\n");
|
||||
|
|
@ -3927,7 +3931,11 @@ static int dp_display_get_display_type(struct dp_display *dp_display,
|
|||
dp = container_of(dp_display, struct dp_display_private, dp_display);
|
||||
if (dp->parser)
|
||||
*display_type = dp->parser->display_type;
|
||||
|
||||
else {
|
||||
of_node = dp->pdev->dev.of_node;
|
||||
*display_type = of_get_property(of_node, "qcom,display-type",
|
||||
NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -471,6 +471,7 @@ int dp_connector_get_info(struct drm_connector *connector,
|
|||
{
|
||||
struct dp_display *display = data;
|
||||
const char *display_type = NULL;
|
||||
u32 conn_disp_type = SDE_CONNECTOR_PRIMARY;
|
||||
|
||||
if (!info || !display || !display->drm_dev) {
|
||||
DP_ERR("invalid params\n");
|
||||
|
|
@ -480,11 +481,11 @@ int dp_connector_get_info(struct drm_connector *connector,
|
|||
info->intf_type = DRM_MODE_CONNECTOR_DisplayPort;
|
||||
|
||||
display->get_display_type(display, &display_type);
|
||||
if (display_type){
|
||||
if (display_type) {
|
||||
if (!strcmp(display_type, "primary"))
|
||||
info->display_type = SDE_CONNECTOR_PRIMARY;
|
||||
conn_disp_type = SDE_CONNECTOR_PRIMARY;
|
||||
else if (!strcmp(display_type, "secondary"))
|
||||
info->display_type = SDE_CONNECTOR_SECONDARY;
|
||||
conn_disp_type = SDE_CONNECTOR_SECONDARY;
|
||||
}
|
||||
|
||||
info->num_of_h_tiles = 1;
|
||||
|
|
@ -495,7 +496,8 @@ int dp_connector_get_info(struct drm_connector *connector,
|
|||
|
||||
if (display && display->is_edp) {
|
||||
info->intf_type = DRM_MODE_CONNECTOR_eDP;
|
||||
if(display->ext_hpd_en)
|
||||
info->display_type = conn_disp_type;
|
||||
if (display->ext_hpd_en)
|
||||
info->capabilities |= MSM_DISPLAY_CAP_HOT_PLUG;
|
||||
else
|
||||
info->is_connected = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -2381,7 +2381,7 @@ error:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int dp_panel_init_panel_info(struct dp_panel *dp_panel)
|
||||
static int dp_panel_init_panel_info(struct dp_panel *dp_panel, bool skip_op)
|
||||
{
|
||||
int rc = 0;
|
||||
struct dp_panel_private *panel;
|
||||
|
|
@ -2393,6 +2393,9 @@ static int dp_panel_init_panel_info(struct dp_panel *dp_panel)
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (skip_op)
|
||||
goto end;
|
||||
|
||||
panel = container_of(dp_panel, struct dp_panel_private, dp_panel);
|
||||
pinfo = &dp_panel->pinfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ struct dp_panel {
|
|||
|
||||
s64 fec_overhead_fp;
|
||||
|
||||
int (*init)(struct dp_panel *dp_panel);
|
||||
int (*init)(struct dp_panel *dp_panel, bool skip_op);
|
||||
int (*deinit)(struct dp_panel *dp_panel, u32 flags);
|
||||
int (*hw_cfg)(struct dp_panel *dp_panel, bool enable);
|
||||
int (*read_sink_caps)(struct dp_panel *dp_panel,
|
||||
|
|
|
|||
|
|
@ -178,13 +178,10 @@ static int dp_parser_misc(struct dp_parser *parser)
|
|||
&parser->pixel_base_off[i]);
|
||||
}
|
||||
|
||||
parser->display_type = of_get_property(of_node, "qcom,display-type", NULL);
|
||||
if (!parser->display_type) {
|
||||
if (parser->is_edp)
|
||||
parser->display_type = "primary";
|
||||
else
|
||||
parser->display_type = "secondary";
|
||||
}
|
||||
parser->display_type = of_get_property(of_node, "qcom,display-type",
|
||||
NULL);
|
||||
if (!parser->display_type)
|
||||
parser->display_type = "unknown";
|
||||
|
||||
parser->panel_notifier_support = of_property_read_bool(of_node,
|
||||
"qcom,panel-notifier-support");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*/
|
||||
|
||||
#include <linux/of_device.h>
|
||||
|
|
@ -229,10 +229,10 @@ static ssize_t debugfs_line_count_read(struct file *file,
|
|||
dsi_ctrl->cmd_trigger_frame);
|
||||
len += scnprintf((buf + len), max_len - len,
|
||||
"Command successful at line: %04x\n",
|
||||
dsi_ctrl->cmd_success_line);
|
||||
atomic_read(&dsi_ctrl->cmd_success_line));
|
||||
len += scnprintf((buf + len), max_len - len,
|
||||
"Command successful at frame: %04x\n",
|
||||
dsi_ctrl->cmd_success_frame);
|
||||
atomic_read(&dsi_ctrl->cmd_success_frame));
|
||||
|
||||
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
||||
|
||||
|
|
@ -2891,12 +2891,13 @@ static irqreturn_t dsi_ctrl_isr(int irq, void *ptr)
|
|||
if (dsi_ctrl->enable_cmd_dma_stats) {
|
||||
u32 reg = dsi_ctrl->hw.ops.log_line_count(&dsi_ctrl->hw,
|
||||
dsi_ctrl->cmd_mode);
|
||||
dsi_ctrl->cmd_success_line = (reg & 0xFFFF);
|
||||
dsi_ctrl->cmd_success_frame = ((reg >> 16) & 0xFFFF);
|
||||
atomic_set(&dsi_ctrl->cmd_success_line, (reg & 0xFFFF));
|
||||
atomic_set(&dsi_ctrl->cmd_success_frame, ((reg >> 16) & 0xFFFF));
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_CASE1,
|
||||
dsi_ctrl->cmd_success_line,
|
||||
dsi_ctrl->cmd_success_frame);
|
||||
}
|
||||
|
||||
atomic_set(&dsi_ctrl->dma_irq_trig, 1);
|
||||
dsi_ctrl_disable_status_interrupt(dsi_ctrl,
|
||||
DSI_SINT_CMD_MODE_DMA_DONE);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -309,8 +310,8 @@ struct dsi_ctrl {
|
|||
bool cmd_mode;
|
||||
u32 cmd_trigger_line;
|
||||
u32 cmd_trigger_frame;
|
||||
u32 cmd_success_line;
|
||||
u32 cmd_success_frame;
|
||||
atomic_t cmd_success_line;
|
||||
atomic_t cmd_success_frame;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5971,15 +5971,25 @@ static int dsi_display_init(struct dsi_display *display)
|
|||
if (rc) {
|
||||
DSI_ERR("[%s] failed to enable vregs, rc=%d\n",
|
||||
display->panel->name, rc);
|
||||
return rc;
|
||||
goto vreg_fail;
|
||||
}
|
||||
}
|
||||
|
||||
rc = component_add(&pdev->dev, &dsi_display_comp_ops);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
DSI_ERR("component add failed, rc=%d\n", rc);
|
||||
goto comp_add_fail;
|
||||
}
|
||||
|
||||
DSI_DEBUG("component add success: %s\n", display->name);
|
||||
return rc;
|
||||
|
||||
comp_add_fail:
|
||||
if (display->panel)
|
||||
dsi_pwr_enable_regulator(&display->panel->power_info, false);
|
||||
vreg_fail:
|
||||
_dsi_display_dev_deinit(display);
|
||||
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
|
|
@ -211,6 +212,10 @@ static void msm_smmu_destroy(struct msm_mmu *mmu)
|
|||
{
|
||||
struct msm_smmu *smmu = to_msm_smmu(mmu);
|
||||
struct platform_device *pdev = to_platform_device(smmu->client_dev);
|
||||
struct iommu_domain *domain = iommu_get_domain_for_dev(smmu->client_dev);
|
||||
|
||||
if (domain)
|
||||
iommu_set_fault_handler(domain, NULL, NULL);
|
||||
|
||||
if (smmu->client_dev)
|
||||
platform_device_unregister(pdev);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
* Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
|
|
@ -1258,16 +1258,6 @@ static void _sde_kms_release_splash_resource(struct sde_kms *sde_kms,
|
|||
SDE_EVT32(DRMID(crtc), crtc->state->active,
|
||||
sde_kms->splash_data.num_splash_displays);
|
||||
|
||||
/*remove all votes if eDP displays are done with splash*/
|
||||
if (dp_display_get_num_of_boot_displays()) {
|
||||
for (i = 0; i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++)
|
||||
sde_power_data_bus_set_quota(phandle, i,
|
||||
SDE_POWER_HANDLE_ENABLE_BUS_AB_QUOTA,
|
||||
phandle->ib_quota[i]);
|
||||
pm_runtime_put_sync(sde_kms->dev->dev);
|
||||
sde_kms->splash_data.num_splash_displays--;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_DSI_DISPLAYS; i++) {
|
||||
splash_display = &sde_kms->splash_data.splash_display[i];
|
||||
if (splash_display->encoder &&
|
||||
|
|
@ -3392,7 +3382,7 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms,
|
|||
struct msm_display_info info;
|
||||
struct drm_encoder *encoder = NULL;
|
||||
struct drm_crtc *crtc = NULL;
|
||||
int i, rc = 0;
|
||||
int i, rc = 0, splash_index = 0;
|
||||
struct drm_display_mode *drm_mode = NULL;
|
||||
struct drm_device *dev;
|
||||
struct msm_drm_private *priv;
|
||||
|
|
@ -3430,7 +3420,7 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms,
|
|||
|
||||
DRM_INFO("cont_splash enabled in %d of %d display(s)\n",
|
||||
sde_kms->splash_data.num_splash_displays,
|
||||
sde_kms->dsi_display_count);
|
||||
sde_kms->dsi_display_count + sde_kms->dp_display_count);
|
||||
|
||||
/* dsi */
|
||||
for (i = 0; i < sde_kms->dsi_display_count; ++i) {
|
||||
|
|
@ -3496,11 +3486,20 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms,
|
|||
mutex_unlock(&dev->mode_config.mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
|
||||
crtc->state->encoder_mask = (1 << drm_encoder_index(encoder));
|
||||
/* get supported modes in case of external bridge panels*/
|
||||
if (!dsi_display->panel->num_timing_nodes) {
|
||||
connector->funcs->fill_modes(connector,
|
||||
dev->mode_config.max_width,
|
||||
dev->mode_config.max_height);
|
||||
drm_mode = list_first_entry(&connector->modes,
|
||||
struct drm_display_mode, head);
|
||||
}
|
||||
else
|
||||
drm_mode = _sde_kms_get_splash_mode(sde_kms, connector, state);
|
||||
|
||||
drm_mode = _sde_kms_get_splash_mode(sde_kms, connector, state);
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
if (!drm_mode) {
|
||||
SDE_ERROR("drm_mode not found; handoff_type:%d\n",
|
||||
sde_kms->splash_data.type);
|
||||
|
|
@ -3557,6 +3556,19 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms,
|
|||
break;
|
||||
}
|
||||
|
||||
splash_display = &sde_kms->splash_data.splash_display[splash_index];
|
||||
if (splash_display->cont_splash_enabled) {
|
||||
priv = sde_kms->dev->dev_private;
|
||||
encoder->crtc = priv->crtcs[splash_index];
|
||||
splash_display->encoder = encoder;
|
||||
|
||||
SDE_DEBUG("dp-display:%d splash_index:%d crtc id[%d]:%d enc id[%d]:%d\n",
|
||||
i, splash_index, encoder->crtc->index, encoder->crtc->base.id,
|
||||
encoder->index, encoder->base.id);
|
||||
|
||||
splash_index++;
|
||||
}
|
||||
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
drm_connector_list_iter_begin(dev, &conn_iter);
|
||||
drm_for_each_connector_iter(connector, &conn_iter) {
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ int sde_wb_connector_set_modes(struct sde_wb_device *wb_dev,
|
|||
memset(&dispmode, 0, sizeof(dispmode));
|
||||
ret = drm_mode_convert_umode(wb_dev->drm_dev,
|
||||
&dispmode, &modeinfo[i]);
|
||||
/* null terminate the string */
|
||||
modeinfo[i].name[DRM_DISPLAY_MODE_LEN - 1] = '\0';
|
||||
if (ret) {
|
||||
SDE_ERROR(
|
||||
"failed to convert mode %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x status:%d rc:%d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue