Skip to content

Commit afa0f6e

Browse files
committed
Merge tag 'drm-fixes-2023-11-24' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Back to regular scheduled fixes pull request, mainly a bunch of msm, some i915 and otherwise a few scattered, one memory crasher in the nouveau GSP paths is helping stabilise that work. msm: - Fix the VREG_CTRL_1 for 4nm CPHY to match downstream - Remove duplicate call to drm_kms_helper_poll_init() in msm_drm_init() - Fix the safe_lut_tbl[] for sc8280xp to match downstream - Don't attach the drm_dp_set_subconnector_property() for eDP - Fix to attach drm_dp_set_subconnector_property() for DP. Otherwise there is a bootup crash on multiple targets - Remove unnecessary NULL check left behind during cleanup i915: - Fix race between DP MST connectore registration and setup - Fix GT memory leak on probe error path panel: - Fixes for innolux and auo,b101uan08.3 panel. - Fix Himax83102-j02 timings. ivpu: - Fix ivpu MMIO reset. ast: - AST fix on connetor disconnection. nouveau: - gsp memory corruption fix rockchip: - color fix" * tag 'drm-fixes-2023-11-24' of git://anongit.freedesktop.org/drm/drm: nouveau/gsp: allocate enough space for all channel ids. drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP drm/ast: Disconnect BMC if physical connector is connected accel/ivpu/37xx: Fix hangs related to MMIO reset drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full drm/i915: do not clean GT table on error path drm/i915/dp_mst: Fix race between connector registration and setup drm/panel: simple: Fix Innolux G101ICE-L01 timings drm/panel: simple: Fix Innolux G101ICE-L01 bus flags drm/msm: remove unnecessary NULL check drm/panel: auo,b101uan08.3: Fine tune the panel power sequence drm/msm/dp: attach the DP subconnector property drm/msm/dp: don't touch DP subconnector property in eDP case drm/msm/dpu: Add missing safe_lut_tbl in sc8280xp catalog drm/msm: remove exra drm_kms_helper_poll_init() call drm/msm/dsi: use the correct VREG_CTRL_1 value for 4nm cphy
2 parents f1a0997 + b3ca8a0 commit afa0f6e

File tree

16 files changed

+138
-78
lines changed

16 files changed

+138
-78
lines changed

drivers/accel/ivpu/ivpu_hw_37xx.c

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,16 @@ static int ivpu_boot_pwr_domain_enable(struct ivpu_device *vdev)
502502
return ret;
503503
}
504504

505+
static int ivpu_boot_pwr_domain_disable(struct ivpu_device *vdev)
506+
{
507+
ivpu_boot_dpu_active_drive(vdev, false);
508+
ivpu_boot_pwr_island_isolation_drive(vdev, true);
509+
ivpu_boot_pwr_island_trickle_drive(vdev, false);
510+
ivpu_boot_pwr_island_drive(vdev, false);
511+
512+
return ivpu_boot_wait_for_pwr_island_status(vdev, 0x0);
513+
}
514+
505515
static void ivpu_boot_no_snoop_enable(struct ivpu_device *vdev)
506516
{
507517
u32 val = REGV_RD32(VPU_37XX_HOST_IF_TCU_PTW_OVERRIDES);
@@ -600,25 +610,17 @@ static int ivpu_hw_37xx_info_init(struct ivpu_device *vdev)
600610

601611
static int ivpu_hw_37xx_reset(struct ivpu_device *vdev)
602612
{
603-
int ret;
604-
u32 val;
605-
606-
if (IVPU_WA(punit_disabled))
607-
return 0;
613+
int ret = 0;
608614

609-
ret = REGB_POLL_FLD(VPU_37XX_BUTTRESS_VPU_IP_RESET, TRIGGER, 0, TIMEOUT_US);
610-
if (ret) {
611-
ivpu_err(vdev, "Timed out waiting for TRIGGER bit\n");
612-
return ret;
615+
if (ivpu_boot_pwr_domain_disable(vdev)) {
616+
ivpu_err(vdev, "Failed to disable power domain\n");
617+
ret = -EIO;
613618
}
614619

615-
val = REGB_RD32(VPU_37XX_BUTTRESS_VPU_IP_RESET);
616-
val = REG_SET_FLD(VPU_37XX_BUTTRESS_VPU_IP_RESET, TRIGGER, val);
617-
REGB_WR32(VPU_37XX_BUTTRESS_VPU_IP_RESET, val);
618-
619-
ret = REGB_POLL_FLD(VPU_37XX_BUTTRESS_VPU_IP_RESET, TRIGGER, 0, TIMEOUT_US);
620-
if (ret)
621-
ivpu_err(vdev, "Timed out waiting for RESET completion\n");
620+
if (ivpu_pll_disable(vdev)) {
621+
ivpu_err(vdev, "Failed to disable PLL\n");
622+
ret = -EIO;
623+
}
622624

623625
return ret;
624626
}
@@ -651,10 +653,6 @@ static int ivpu_hw_37xx_power_up(struct ivpu_device *vdev)
651653
{
652654
int ret;
653655

654-
ret = ivpu_hw_37xx_reset(vdev);
655-
if (ret)
656-
ivpu_warn(vdev, "Failed to reset HW: %d\n", ret);
657-
658656
ret = ivpu_hw_37xx_d0i3_disable(vdev);
659657
if (ret)
660658
ivpu_warn(vdev, "Failed to disable D0I3: %d\n", ret);
@@ -722,11 +720,11 @@ static int ivpu_hw_37xx_power_down(struct ivpu_device *vdev)
722720
{
723721
int ret = 0;
724722

725-
if (!ivpu_hw_37xx_is_idle(vdev) && ivpu_hw_37xx_reset(vdev))
726-
ivpu_err(vdev, "Failed to reset the VPU\n");
723+
if (!ivpu_hw_37xx_is_idle(vdev))
724+
ivpu_warn(vdev, "VPU not idle during power down\n");
727725

728-
if (ivpu_pll_disable(vdev)) {
729-
ivpu_err(vdev, "Failed to disable PLL\n");
726+
if (ivpu_hw_37xx_reset(vdev)) {
727+
ivpu_err(vdev, "Failed to reset VPU\n");
730728
ret = -EIO;
731729
}
732730

drivers/gpu/drm/ast/ast_drv.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,17 @@ to_ast_sil164_connector(struct drm_connector *connector)
174174
return container_of(connector, struct ast_sil164_connector, base);
175175
}
176176

177+
struct ast_bmc_connector {
178+
struct drm_connector base;
179+
struct drm_connector *physical_connector;
180+
};
181+
182+
static inline struct ast_bmc_connector *
183+
to_ast_bmc_connector(struct drm_connector *connector)
184+
{
185+
return container_of(connector, struct ast_bmc_connector, base);
186+
}
187+
177188
/*
178189
* Device
179190
*/
@@ -218,7 +229,7 @@ struct ast_device {
218229
} astdp;
219230
struct {
220231
struct drm_encoder encoder;
221-
struct drm_connector connector;
232+
struct ast_bmc_connector bmc_connector;
222233
} bmc;
223234
} output;
224235

drivers/gpu/drm/ast/ast_mode.c

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,13 +1767,38 @@ static const struct drm_encoder_funcs ast_bmc_encoder_funcs = {
17671767
.destroy = drm_encoder_cleanup,
17681768
};
17691769

1770+
static int ast_bmc_connector_helper_detect_ctx(struct drm_connector *connector,
1771+
struct drm_modeset_acquire_ctx *ctx,
1772+
bool force)
1773+
{
1774+
struct ast_bmc_connector *bmc_connector = to_ast_bmc_connector(connector);
1775+
struct drm_connector *physical_connector = bmc_connector->physical_connector;
1776+
1777+
/*
1778+
* Most user-space compositors cannot handle more than one connected
1779+
* connector per CRTC. Hence, we only mark the BMC as connected if the
1780+
* physical connector is disconnected. If the physical connector's status
1781+
* is connected or unknown, the BMC remains disconnected. This has no
1782+
* effect on the output of the BMC.
1783+
*
1784+
* FIXME: Remove this logic once user-space compositors can handle more
1785+
* than one connector per CRTC. The BMC should always be connected.
1786+
*/
1787+
1788+
if (physical_connector && physical_connector->status == connector_status_disconnected)
1789+
return connector_status_connected;
1790+
1791+
return connector_status_disconnected;
1792+
}
1793+
17701794
static int ast_bmc_connector_helper_get_modes(struct drm_connector *connector)
17711795
{
17721796
return drm_add_modes_noedid(connector, 4096, 4096);
17731797
}
17741798

17751799
static const struct drm_connector_helper_funcs ast_bmc_connector_helper_funcs = {
17761800
.get_modes = ast_bmc_connector_helper_get_modes,
1801+
.detect_ctx = ast_bmc_connector_helper_detect_ctx,
17771802
};
17781803

17791804
static const struct drm_connector_funcs ast_bmc_connector_funcs = {
@@ -1784,12 +1809,33 @@ static const struct drm_connector_funcs ast_bmc_connector_funcs = {
17841809
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
17851810
};
17861811

1787-
static int ast_bmc_output_init(struct ast_device *ast)
1812+
static int ast_bmc_connector_init(struct drm_device *dev,
1813+
struct ast_bmc_connector *bmc_connector,
1814+
struct drm_connector *physical_connector)
1815+
{
1816+
struct drm_connector *connector = &bmc_connector->base;
1817+
int ret;
1818+
1819+
ret = drm_connector_init(dev, connector, &ast_bmc_connector_funcs,
1820+
DRM_MODE_CONNECTOR_VIRTUAL);
1821+
if (ret)
1822+
return ret;
1823+
1824+
drm_connector_helper_add(connector, &ast_bmc_connector_helper_funcs);
1825+
1826+
bmc_connector->physical_connector = physical_connector;
1827+
1828+
return 0;
1829+
}
1830+
1831+
static int ast_bmc_output_init(struct ast_device *ast,
1832+
struct drm_connector *physical_connector)
17881833
{
17891834
struct drm_device *dev = &ast->base;
17901835
struct drm_crtc *crtc = &ast->crtc;
17911836
struct drm_encoder *encoder = &ast->output.bmc.encoder;
1792-
struct drm_connector *connector = &ast->output.bmc.connector;
1837+
struct ast_bmc_connector *bmc_connector = &ast->output.bmc.bmc_connector;
1838+
struct drm_connector *connector = &bmc_connector->base;
17931839
int ret;
17941840

17951841
ret = drm_encoder_init(dev, encoder,
@@ -1799,13 +1845,10 @@ static int ast_bmc_output_init(struct ast_device *ast)
17991845
return ret;
18001846
encoder->possible_crtcs = drm_crtc_mask(crtc);
18011847

1802-
ret = drm_connector_init(dev, connector, &ast_bmc_connector_funcs,
1803-
DRM_MODE_CONNECTOR_VIRTUAL);
1848+
ret = ast_bmc_connector_init(dev, bmc_connector, physical_connector);
18041849
if (ret)
18051850
return ret;
18061851

1807-
drm_connector_helper_add(connector, &ast_bmc_connector_helper_funcs);
1808-
18091852
ret = drm_connector_attach_encoder(connector, encoder);
18101853
if (ret)
18111854
return ret;
@@ -1864,6 +1907,7 @@ static const struct drm_mode_config_funcs ast_mode_config_funcs = {
18641907
int ast_mode_config_init(struct ast_device *ast)
18651908
{
18661909
struct drm_device *dev = &ast->base;
1910+
struct drm_connector *physical_connector = NULL;
18671911
int ret;
18681912

18691913
ret = drmm_mode_config_init(dev);
@@ -1904,23 +1948,27 @@ int ast_mode_config_init(struct ast_device *ast)
19041948
ret = ast_vga_output_init(ast);
19051949
if (ret)
19061950
return ret;
1951+
physical_connector = &ast->output.vga.vga_connector.base;
19071952
}
19081953
if (ast->tx_chip_types & AST_TX_SIL164_BIT) {
19091954
ret = ast_sil164_output_init(ast);
19101955
if (ret)
19111956
return ret;
1957+
physical_connector = &ast->output.sil164.sil164_connector.base;
19121958
}
19131959
if (ast->tx_chip_types & AST_TX_DP501_BIT) {
19141960
ret = ast_dp501_output_init(ast);
19151961
if (ret)
19161962
return ret;
1963+
physical_connector = &ast->output.dp501.connector;
19171964
}
19181965
if (ast->tx_chip_types & AST_TX_ASTDP_BIT) {
19191966
ret = ast_astdp_output_init(ast);
19201967
if (ret)
19211968
return ret;
1969+
physical_connector = &ast->output.astdp.connector;
19221970
}
1923-
ret = ast_bmc_output_init(ast);
1971+
ret = ast_bmc_output_init(ast, physical_connector);
19241972
if (ret)
19251973
return ret;
19261974

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,14 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
11611161
intel_connector->port = port;
11621162
drm_dp_mst_get_port_malloc(port);
11631163

1164+
/*
1165+
* TODO: set the AUX for the actual MST port decompressing the stream.
1166+
* At the moment the driver only supports enabling this globally in the
1167+
* first downstream MST branch, via intel_dp's (root port) AUX.
1168+
*/
1169+
intel_connector->dp.dsc_decompression_aux = &intel_dp->aux;
1170+
intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, intel_connector);
1171+
11641172
connector = &intel_connector->base;
11651173
ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs,
11661174
DRM_MODE_CONNECTOR_DisplayPort);
@@ -1172,14 +1180,6 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
11721180

11731181
drm_connector_helper_add(connector, &intel_dp_mst_connector_helper_funcs);
11741182

1175-
/*
1176-
* TODO: set the AUX for the actual MST port decompressing the stream.
1177-
* At the moment the driver only supports enabling this globally in the
1178-
* first downstream MST branch, via intel_dp's (root port) AUX.
1179-
*/
1180-
intel_connector->dp.dsc_decompression_aux = &intel_dp->aux;
1181-
intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, intel_connector);
1182-
11831183
for_each_pipe(dev_priv, pipe) {
11841184
struct drm_encoder *enc =
11851185
&intel_dp->mst_encoders[pipe]->base.base;

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,6 @@ int intel_gt_probe_all(struct drm_i915_private *i915)
982982

983983
err:
984984
i915_probe_error(i915, "Failed to initialize %s! (%d)\n", gtdef->name, ret);
985-
intel_gt_release_all(i915);
986-
987985
return ret;
988986
}
989987

@@ -1002,15 +1000,6 @@ int intel_gt_tiles_init(struct drm_i915_private *i915)
10021000
return 0;
10031001
}
10041002

1005-
void intel_gt_release_all(struct drm_i915_private *i915)
1006-
{
1007-
struct intel_gt *gt;
1008-
unsigned int id;
1009-
1010-
for_each_gt(gt, i915, id)
1011-
i915->gt[id] = NULL;
1012-
}
1013-
10141003
void intel_gt_info_print(const struct intel_gt_info *info,
10151004
struct drm_printer *p)
10161005
{

drivers/gpu/drm/i915/i915_driver.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
782782

783783
ret = i915_driver_mmio_probe(i915);
784784
if (ret < 0)
785-
goto out_tiles_cleanup;
785+
goto out_runtime_pm_put;
786786

787787
ret = i915_driver_hw_probe(i915);
788788
if (ret < 0)
@@ -842,8 +842,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
842842
i915_ggtt_driver_late_release(i915);
843843
out_cleanup_mmio:
844844
i915_driver_mmio_release(i915);
845-
out_tiles_cleanup:
846-
intel_gt_release_all(i915);
847845
out_runtime_pm_put:
848846
enable_rpm_wakeref_asserts(&i915->runtime_pm);
849847
i915_driver_late_release(i915);

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ static const struct dpu_perf_cfg sc8280xp_perf_data = {
406406
.min_llcc_ib = 0,
407407
.min_dram_ib = 800000,
408408
.danger_lut_tbl = {0xf, 0xffff, 0x0},
409+
.safe_lut_tbl = {0xfe00, 0xfe00, 0xffff},
409410
.qos_lut_tbl = {
410411
{.nentry = ARRAY_SIZE(sc8180x_qos_linear),
411412
.entries = sc8180x_qos_linear

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev)
844844

845845
return 0;
846846
fail:
847-
if (mdp5_kms)
848-
mdp5_destroy(mdp5_kms);
847+
mdp5_destroy(mdp5_kms);
849848
return ret;
850849
}
851850

drivers/gpu/drm/msm/dp/dp_display.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,11 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,
365365
/* reset video pattern flag on disconnect */
366366
if (!hpd) {
367367
dp->panel->video_test = false;
368-
drm_dp_set_subconnector_property(dp->dp_display.connector,
369-
connector_status_disconnected,
370-
dp->panel->dpcd, dp->panel->downstream_ports);
368+
if (!dp->dp_display.is_edp)
369+
drm_dp_set_subconnector_property(dp->dp_display.connector,
370+
connector_status_disconnected,
371+
dp->panel->dpcd,
372+
dp->panel->downstream_ports);
371373
}
372374

373375
dp->dp_display.is_connected = hpd;
@@ -396,8 +398,11 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
396398

397399
dp_link_process_request(dp->link);
398400

399-
drm_dp_set_subconnector_property(dp->dp_display.connector, connector_status_connected,
400-
dp->panel->dpcd, dp->panel->downstream_ports);
401+
if (!dp->dp_display.is_edp)
402+
drm_dp_set_subconnector_property(dp->dp_display.connector,
403+
connector_status_connected,
404+
dp->panel->dpcd,
405+
dp->panel->downstream_ports);
401406

402407
edid = dp->panel->edid;
403408

drivers/gpu/drm/msm/dp/dp_drm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
345345
if (IS_ERR(connector))
346346
return connector;
347347

348+
if (!dp_display->is_edp)
349+
drm_connector_attach_dp_subconnector_property(connector);
350+
348351
drm_connector_attach_encoder(connector, encoder);
349352

350353
return connector;

0 commit comments

Comments
 (0)