Commit 6d837271 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-msm-next-2024-04-11' of https://gitlab.freedesktop.org/drm/msm into drm-fixes

Fixes for v6.9

Display:
- Fixes for PM refcount leak when DP goes to disconnected state and
  also when link training fails. This is also one of the issues found
  with the pm runtime series
- Add missing newlines to prints in msm_fb and msm_kms
- Change permissions of some dpu debugfs entries which write to const
  data from catalog to read-only to avoid protection faults
- Fix the interface table for the catalog of X1E80100. This is an
  important fix to bringup DP for X1E80100.
- Logging fix to print the callback symbol in the invalid IRQ message
  case rather than printing when its known to be NULL.
- Bindings fix to add DP node as child of mdss for mdss node
- Minor typo fix in DP driver API which handles port status change

GPU:
- fix CHRASHDUMP_READ()
- fix HHB (highest bank bit) for a619 to fix UBWC corruption
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvFwRUcHGWva7oDeydq1PTiZMduuykCD2MWaFrT4iMGZA@mail.gmail.com
parents 1bafeaf2 9dc23cba
...@@ -53,6 +53,15 @@ patternProperties: ...@@ -53,6 +53,15 @@ patternProperties:
compatible: compatible:
const: qcom,sm8150-dpu const: qcom,sm8150-dpu
"^displayport-controller@[0-9a-f]+$":
type: object
additionalProperties: true
properties:
compatible:
contains:
const: qcom,sm8150-dp
"^dsi@[0-9a-f]+$": "^dsi@[0-9a-f]+$":
type: object type: object
additionalProperties: true additionalProperties: true
......
...@@ -1377,6 +1377,10 @@ static void a6xx_calc_ubwc_config(struct adreno_gpu *gpu) ...@@ -1377,6 +1377,10 @@ static void a6xx_calc_ubwc_config(struct adreno_gpu *gpu)
if (adreno_is_a618(gpu)) if (adreno_is_a618(gpu))
gpu->ubwc_config.highest_bank_bit = 14; gpu->ubwc_config.highest_bank_bit = 14;
if (adreno_is_a619(gpu))
/* TODO: Should be 14 but causes corruption at e.g. 1920x1200 on DP */
gpu->ubwc_config.highest_bank_bit = 13;
if (adreno_is_a619_holi(gpu)) if (adreno_is_a619_holi(gpu))
gpu->ubwc_config.highest_bank_bit = 13; gpu->ubwc_config.highest_bank_bit = 13;
......
...@@ -852,7 +852,7 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu, ...@@ -852,7 +852,7 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
(block->type << 8) | i); (block->type << 8) | i);
in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE, in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,
block->size, dumper->iova + A6XX_CD_DATA_OFFSET); block->size, out);
out += block->size * sizeof(u32); out += block->size * sizeof(u32);
} }
......
...@@ -324,6 +324,7 @@ static const struct dpu_wb_cfg x1e80100_wb[] = { ...@@ -324,6 +324,7 @@ static const struct dpu_wb_cfg x1e80100_wb[] = {
}, },
}; };
/* TODO: INTF 3, 8 and 7 are used for MST, marked as INTF_NONE for now */
static const struct dpu_intf_cfg x1e80100_intf[] = { static const struct dpu_intf_cfg x1e80100_intf[] = {
{ {
.name = "intf_0", .id = INTF_0, .name = "intf_0", .id = INTF_0,
...@@ -358,8 +359,8 @@ static const struct dpu_intf_cfg x1e80100_intf[] = { ...@@ -358,8 +359,8 @@ static const struct dpu_intf_cfg x1e80100_intf[] = {
.name = "intf_3", .id = INTF_3, .name = "intf_3", .id = INTF_3,
.base = 0x37000, .len = 0x280, .base = 0x37000, .len = 0x280,
.features = INTF_SC7280_MASK, .features = INTF_SC7280_MASK,
.type = INTF_DP, .type = INTF_NONE,
.controller_id = MSM_DP_CONTROLLER_1, .controller_id = MSM_DP_CONTROLLER_0, /* pair with intf_0 for DP MST */
.prog_fetch_lines_worst_case = 24, .prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 30), .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 30),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 31), .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 31),
...@@ -368,7 +369,7 @@ static const struct dpu_intf_cfg x1e80100_intf[] = { ...@@ -368,7 +369,7 @@ static const struct dpu_intf_cfg x1e80100_intf[] = {
.base = 0x38000, .len = 0x280, .base = 0x38000, .len = 0x280,
.features = INTF_SC7280_MASK, .features = INTF_SC7280_MASK,
.type = INTF_DP, .type = INTF_DP,
.controller_id = MSM_DP_CONTROLLER_2, .controller_id = MSM_DP_CONTROLLER_1,
.prog_fetch_lines_worst_case = 24, .prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 20), .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 20),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 21), .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 21),
...@@ -381,6 +382,33 @@ static const struct dpu_intf_cfg x1e80100_intf[] = { ...@@ -381,6 +382,33 @@ static const struct dpu_intf_cfg x1e80100_intf[] = {
.prog_fetch_lines_worst_case = 24, .prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 22), .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 22),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 23), .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 23),
}, {
.name = "intf_6", .id = INTF_6,
.base = 0x3A000, .len = 0x280,
.features = INTF_SC7280_MASK,
.type = INTF_DP,
.controller_id = MSM_DP_CONTROLLER_2,
.prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 17),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 16),
}, {
.name = "intf_7", .id = INTF_7,
.base = 0x3b000, .len = 0x280,
.features = INTF_SC7280_MASK,
.type = INTF_NONE,
.controller_id = MSM_DP_CONTROLLER_2, /* pair with intf_6 for DP MST */
.prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 18),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 19),
}, {
.name = "intf_8", .id = INTF_8,
.base = 0x3c000, .len = 0x280,
.features = INTF_SC7280_MASK,
.type = INTF_NONE,
.controller_id = MSM_DP_CONTROLLER_1, /* pair with intf_4 for DP MST */
.prog_fetch_lines_worst_case = 24,
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12),
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13),
}, },
}; };
......
...@@ -459,15 +459,15 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent) ...@@ -459,15 +459,15 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
&perf->core_clk_rate); &perf->core_clk_rate);
debugfs_create_u32("enable_bw_release", 0600, entry, debugfs_create_u32("enable_bw_release", 0600, entry,
(u32 *)&perf->enable_bw_release); (u32 *)&perf->enable_bw_release);
debugfs_create_u32("threshold_low", 0600, entry, debugfs_create_u32("threshold_low", 0400, entry,
(u32 *)&perf->perf_cfg->max_bw_low); (u32 *)&perf->perf_cfg->max_bw_low);
debugfs_create_u32("threshold_high", 0600, entry, debugfs_create_u32("threshold_high", 0400, entry,
(u32 *)&perf->perf_cfg->max_bw_high); (u32 *)&perf->perf_cfg->max_bw_high);
debugfs_create_u32("min_core_ib", 0600, entry, debugfs_create_u32("min_core_ib", 0400, entry,
(u32 *)&perf->perf_cfg->min_core_ib); (u32 *)&perf->perf_cfg->min_core_ib);
debugfs_create_u32("min_llcc_ib", 0600, entry, debugfs_create_u32("min_llcc_ib", 0400, entry,
(u32 *)&perf->perf_cfg->min_llcc_ib); (u32 *)&perf->perf_cfg->min_llcc_ib);
debugfs_create_u32("min_dram_ib", 0600, entry, debugfs_create_u32("min_dram_ib", 0400, entry,
(u32 *)&perf->perf_cfg->min_dram_ib); (u32 *)&perf->perf_cfg->min_dram_ib);
debugfs_create_file("perf_mode", 0600, entry, debugfs_create_file("perf_mode", 0600, entry,
(u32 *)perf, &dpu_core_perf_mode_fops); (u32 *)perf, &dpu_core_perf_mode_fops);
......
...@@ -525,14 +525,14 @@ int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, ...@@ -525,14 +525,14 @@ int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms,
int ret; int ret;
if (!irq_cb) { if (!irq_cb) {
DPU_ERROR("invalid IRQ=[%d, %d] irq_cb:%ps\n", DPU_ERROR("IRQ=[%d, %d] NULL callback\n",
DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx), irq_cb); DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx));
return -EINVAL; return -EINVAL;
} }
if (!dpu_core_irq_is_valid(irq_idx)) { if (!dpu_core_irq_is_valid(irq_idx)) {
DPU_ERROR("invalid IRQ=[%d, %d]\n", DPU_ERROR("invalid IRQ=[%d, %d] irq_cb:%ps\n",
DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx)); DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx), irq_cb);
return -EINVAL; return -EINVAL;
} }
......
...@@ -484,7 +484,7 @@ static void dp_display_handle_video_request(struct dp_display_private *dp) ...@@ -484,7 +484,7 @@ static void dp_display_handle_video_request(struct dp_display_private *dp)
} }
} }
static int dp_display_handle_port_ststus_changed(struct dp_display_private *dp) static int dp_display_handle_port_status_changed(struct dp_display_private *dp)
{ {
int rc = 0; int rc = 0;
...@@ -541,7 +541,7 @@ static int dp_display_usbpd_attention_cb(struct device *dev) ...@@ -541,7 +541,7 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
drm_dbg_dp(dp->drm_dev, "hpd_state=%d sink_request=%d\n", drm_dbg_dp(dp->drm_dev, "hpd_state=%d sink_request=%d\n",
dp->hpd_state, sink_request); dp->hpd_state, sink_request);
if (sink_request & DS_PORT_STATUS_CHANGED) if (sink_request & DS_PORT_STATUS_CHANGED)
rc = dp_display_handle_port_ststus_changed(dp); rc = dp_display_handle_port_status_changed(dp);
else else
rc = dp_display_handle_irq_hpd(dp); rc = dp_display_handle_irq_hpd(dp);
} }
...@@ -588,6 +588,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) ...@@ -588,6 +588,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data)
ret = dp_display_usbpd_configure_cb(&pdev->dev); ret = dp_display_usbpd_configure_cb(&pdev->dev);
if (ret) { /* link train failed */ if (ret) { /* link train failed */
dp->hpd_state = ST_DISCONNECTED; dp->hpd_state = ST_DISCONNECTED;
pm_runtime_put_sync(&pdev->dev);
} else { } else {
dp->hpd_state = ST_MAINLINK_READY; dp->hpd_state = ST_MAINLINK_READY;
} }
...@@ -645,6 +646,7 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) ...@@ -645,6 +646,7 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
dp_display_host_phy_exit(dp); dp_display_host_phy_exit(dp);
dp->hpd_state = ST_DISCONNECTED; dp->hpd_state = ST_DISCONNECTED;
dp_display_notify_disconnect(&dp->dp_display.pdev->dev); dp_display_notify_disconnect(&dp->dp_display.pdev->dev);
pm_runtime_put_sync(&pdev->dev);
mutex_unlock(&dp->event_mutex); mutex_unlock(&dp->event_mutex);
return 0; return 0;
} }
......
...@@ -89,7 +89,7 @@ int msm_framebuffer_prepare(struct drm_framebuffer *fb, ...@@ -89,7 +89,7 @@ int msm_framebuffer_prepare(struct drm_framebuffer *fb,
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
ret = msm_gem_get_and_pin_iova(fb->obj[i], aspace, &msm_fb->iova[i]); ret = msm_gem_get_and_pin_iova(fb->obj[i], aspace, &msm_fb->iova[i]);
drm_dbg_state(fb->dev, "FB[%u]: iova[%d]: %08llx (%d)", drm_dbg_state(fb->dev, "FB[%u]: iova[%d]: %08llx (%d)\n",
fb->base.id, i, msm_fb->iova[i], ret); fb->base.id, i, msm_fb->iova[i], ret);
if (ret) if (ret)
return ret; return ret;
...@@ -176,7 +176,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev, ...@@ -176,7 +176,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
const struct msm_format *format; const struct msm_format *format;
int ret, i, n; int ret, i, n;
drm_dbg_state(dev, "create framebuffer: mode_cmd=%p (%dx%d@%4.4s)", drm_dbg_state(dev, "create framebuffer: mode_cmd=%p (%dx%d@%4.4s)\n",
mode_cmd, mode_cmd->width, mode_cmd->height, mode_cmd, mode_cmd->width, mode_cmd->height,
(char *)&mode_cmd->pixel_format); (char *)&mode_cmd->pixel_format);
...@@ -232,7 +232,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev, ...@@ -232,7 +232,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
refcount_set(&msm_fb->dirtyfb, 1); refcount_set(&msm_fb->dirtyfb, 1);
drm_dbg_state(dev, "create: FB ID: %d (%p)", fb->base.id, fb); drm_dbg_state(dev, "create: FB ID: %d (%p)\n", fb->base.id, fb);
return fb; return fb;
......
...@@ -149,7 +149,7 @@ int msm_crtc_enable_vblank(struct drm_crtc *crtc) ...@@ -149,7 +149,7 @@ int msm_crtc_enable_vblank(struct drm_crtc *crtc)
struct msm_kms *kms = priv->kms; struct msm_kms *kms = priv->kms;
if (!kms) if (!kms)
return -ENXIO; return -ENXIO;
drm_dbg_vbl(dev, "crtc=%u", crtc->base.id); drm_dbg_vbl(dev, "crtc=%u\n", crtc->base.id);
return vblank_ctrl_queue_work(priv, crtc, true); return vblank_ctrl_queue_work(priv, crtc, true);
} }
...@@ -160,7 +160,7 @@ void msm_crtc_disable_vblank(struct drm_crtc *crtc) ...@@ -160,7 +160,7 @@ void msm_crtc_disable_vblank(struct drm_crtc *crtc)
struct msm_kms *kms = priv->kms; struct msm_kms *kms = priv->kms;
if (!kms) if (!kms)
return; return;
drm_dbg_vbl(dev, "crtc=%u", crtc->base.id); drm_dbg_vbl(dev, "crtc=%u\n", crtc->base.id);
vblank_ctrl_queue_work(priv, crtc, false); vblank_ctrl_queue_work(priv, crtc, false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment