Skip to content

Commit 269ce3b

Browse files
committed
Merge tag 'drm-fixes-2024-11-02' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Regular fixes pull, nothing too out of the ordinary, the mediatek fixes came in a batch that I might have preferred a bit earlier but all seem fine, otherwise regular xe/amdgpu and a few misc ones. xe: - Fix missing HPD interrupt enabling, bringing one PM refactor with it - Workaround LNL GGTT invalidation not being visible to GuC - Avoid getting jobs stuck without a protecting timeout ivpu: - Fix firewall IRQ handling panthor: - Fix firmware initialization wrt page sizes - Fix handling and reporting of dead job groups sched: - Guarantee forward progress via WC_MEM_RECLAIM tests: - Fix memory leak in drm_display_mode_from_cea_vic() amdgpu: - DCN 3.5 fix - Vangogh SMU KASAN fix - SMU 13 profile reporting fix mediatek: - Fix degradation problem of alpha blending - Fix color format MACROs in OVL - Fix get efuse issue for MT8188 DPTX - Fix potential NULL dereference in mtk_crtc_destroy() - Correct dpi power-domains property - Add split subschema property constraints" * tag 'drm-fixes-2024-11-02' of https://gitlab.freedesktop.org/drm/kernel: (27 commits) drm/xe: Don't short circuit TDR on jobs not started drm/xe: Add mmio read before GGTT invalidate drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic() drm/connector: hdmi: Fix memory leak in drm_display_mode_from_cea_vic() drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic() drm/panthor: Report group as timedout when we fail to properly suspend drm/panthor: Fail job creation when the group is dead drm/panthor: Fix firmware initialization on systems with a page size > 4k accel/ivpu: Fix NOC firewall interrupt handling drm/xe/display: Add missing HPD interrupt enabling during non-d3cold RPM resume drm/xe/display: Separate the d3cold and non-d3cold runtime PM handling drm/xe: Remove runtime argument from display s/r functions drm/amdgpu/smu13: fix profile reporting drm/amd/pm: Vangogh: Fix kernel memory out of bounds write Revert "drm/amd/display: update DML2 policy EnhancedPrefetchScheduleAccelerationFinal DCN35" drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM drm/tegra: Fix NULL vs IS_ERR() check in probe() dt-bindings: display: mediatek: split: add subschema property constraints dt-bindings: display: mediatek: dpi: correct power-domains property drm/mediatek: Fix potential NULL dereference in mtk_crtc_destroy() ...
2 parents b1966a1 + f99c7cc commit 269ce3b

36 files changed

+409
-118
lines changed

Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ properties:
6363
- const: sleep
6464

6565
power-domains:
66+
description: |
67+
The MediaTek DPI module is typically associated with one of the
68+
following multimedia power domains:
69+
POWER_DOMAIN_DISPLAY
70+
POWER_DOMAIN_VDOSYS
71+
POWER_DOMAIN_MM
72+
The specific power domain used varies depending on the SoC design.
73+
74+
It is recommended to explicitly add the appropriate power domain
75+
property to the DPI node in the device tree.
6676
maxItems: 1
6777

6878
port:
@@ -79,20 +89,6 @@ required:
7989
- clock-names
8090
- port
8191

82-
allOf:
83-
- if:
84-
not:
85-
properties:
86-
compatible:
87-
contains:
88-
enum:
89-
- mediatek,mt6795-dpi
90-
- mediatek,mt8173-dpi
91-
- mediatek,mt8186-dpi
92-
then:
93-
properties:
94-
power-domains: false
95-
9692
additionalProperties: false
9793

9894
examples:

Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ properties:
3838
description: A phandle and PM domain specifier as defined by bindings of
3939
the power controller specified by phandle. See
4040
Documentation/devicetree/bindings/power/power-domain.yaml for details.
41+
maxItems: 1
4142

4243
mediatek,gce-client-reg:
4344
description:
@@ -57,6 +58,9 @@ properties:
5758
clocks:
5859
items:
5960
- description: SPLIT Clock
61+
- description: Used for interfacing with the HDMI RX signal source.
62+
- description: Paired with receiving HDMI RX metadata.
63+
minItems: 1
6064

6165
required:
6266
- compatible
@@ -72,9 +76,24 @@ allOf:
7276
const: mediatek,mt8195-mdp3-split
7377

7478
then:
79+
properties:
80+
clocks:
81+
minItems: 3
82+
7583
required:
7684
- mediatek,gce-client-reg
7785

86+
- if:
87+
properties:
88+
compatible:
89+
contains:
90+
const: mediatek,mt8173-disp-split
91+
92+
then:
93+
properties:
94+
clocks:
95+
maxItems: 1
96+
7897
additionalProperties: false
7998

8099
examples:

drivers/accel/ivpu/ivpu_debugfs.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ static int reset_pending_show(struct seq_file *s, void *v)
108108
return 0;
109109
}
110110

111+
static int firewall_irq_counter_show(struct seq_file *s, void *v)
112+
{
113+
struct ivpu_device *vdev = seq_to_ivpu(s);
114+
115+
seq_printf(s, "%d\n", atomic_read(&vdev->hw->firewall_irq_counter));
116+
return 0;
117+
}
118+
111119
static const struct drm_debugfs_info vdev_debugfs_list[] = {
112120
{"bo_list", bo_list_show, 0},
113121
{"fw_name", fw_name_show, 0},
@@ -116,6 +124,7 @@ static const struct drm_debugfs_info vdev_debugfs_list[] = {
116124
{"last_bootmode", last_bootmode_show, 0},
117125
{"reset_counter", reset_counter_show, 0},
118126
{"reset_pending", reset_pending_show, 0},
127+
{"firewall_irq_counter", firewall_irq_counter_show, 0},
119128
};
120129

121130
static ssize_t

drivers/accel/ivpu/ivpu_hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ int ivpu_hw_init(struct ivpu_device *vdev)
249249
platform_init(vdev);
250250
wa_init(vdev);
251251
timeouts_init(vdev);
252+
atomic_set(&vdev->hw->firewall_irq_counter, 0);
252253

253254
return 0;
254255
}

drivers/accel/ivpu/ivpu_hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct ivpu_hw_info {
5252
int dma_bits;
5353
ktime_t d0i3_entry_host_ts;
5454
u64 d0i3_entry_vpu_ts;
55+
atomic_t firewall_irq_counter;
5556
};
5657

5758
int ivpu_hw_init(struct ivpu_device *vdev);

drivers/accel/ivpu/ivpu_hw_ip.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,10 @@ static void irq_wdt_mss_handler(struct ivpu_device *vdev)
10621062

10631063
static void irq_noc_firewall_handler(struct ivpu_device *vdev)
10641064
{
1065-
ivpu_pm_trigger_recovery(vdev, "NOC Firewall IRQ");
1065+
atomic_inc(&vdev->hw->firewall_irq_counter);
1066+
1067+
ivpu_dbg(vdev, IRQ, "NOC Firewall interrupt detected, counter %d\n",
1068+
atomic_read(&vdev->hw->firewall_irq_counter));
10661069
}
10671070

10681071
/* Handler for IRQs from NPU core */

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ void build_unoptimized_policy_settings(enum dml_project_id project, struct dml_m
303303
if (project == dml_project_dcn35 ||
304304
project == dml_project_dcn351) {
305305
policy->DCCProgrammingAssumesScanDirectionUnknownFinal = false;
306+
policy->EnhancedPrefetchScheduleAccelerationFinal = 0;
306307
policy->AllowForPStateChangeOrStutterInVBlankFinal = dml_prefetch_support_uclk_fclk_and_stutter_if_possible; /*new*/
307308
policy->UseOnlyMaxPrefetchModes = 1;
308309
}

drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ static int vangogh_tables_init(struct smu_context *smu)
242242
goto err0_out;
243243
smu_table->metrics_time = 0;
244244

245-
smu_table->gpu_metrics_table_size = max(sizeof(struct gpu_metrics_v2_3), sizeof(struct gpu_metrics_v2_2));
245+
smu_table->gpu_metrics_table_size = sizeof(struct gpu_metrics_v2_2);
246+
smu_table->gpu_metrics_table_size = max(smu_table->gpu_metrics_table_size, sizeof(struct gpu_metrics_v2_3));
247+
smu_table->gpu_metrics_table_size = max(smu_table->gpu_metrics_table_size, sizeof(struct gpu_metrics_v2_4));
246248
smu_table->gpu_metrics_table = kzalloc(smu_table->gpu_metrics_table_size, GFP_KERNEL);
247249
if (!smu_table->gpu_metrics_table)
248250
goto err1_out;

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
24852485
DpmActivityMonitorCoeffInt_t *activity_monitor =
24862486
&(activity_monitor_external.DpmActivityMonitorCoeffInt);
24872487
int workload_type, ret = 0;
2488-
u32 workload_mask;
2488+
u32 workload_mask, selected_workload_mask;
24892489

24902490
smu->power_profile_mode = input[size];
24912491

@@ -2552,7 +2552,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
25522552
if (workload_type < 0)
25532553
return -EINVAL;
25542554

2555-
workload_mask = 1 << workload_type;
2555+
selected_workload_mask = workload_mask = 1 << workload_type;
25562556

25572557
/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */
25582558
if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
@@ -2572,7 +2572,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
25722572
workload_mask,
25732573
NULL);
25742574
if (!ret)
2575-
smu->workload_mask = workload_mask;
2575+
smu->workload_mask = selected_workload_mask;
25762576

25772577
return ret;
25782578
}

drivers/gpu/drm/mediatek/mtk_crtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ static void mtk_crtc_destroy(struct drm_crtc *crtc)
127127

128128
mtk_mutex_put(mtk_crtc->mutex);
129129
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
130-
cmdq_pkt_destroy(&mtk_crtc->cmdq_client, &mtk_crtc->cmdq_handle);
131-
132130
if (mtk_crtc->cmdq_client.chan) {
131+
cmdq_pkt_destroy(&mtk_crtc->cmdq_client, &mtk_crtc->cmdq_handle);
133132
mbox_free_channel(mtk_crtc->cmdq_client.chan);
134133
mtk_crtc->cmdq_client.chan = NULL;
135134
}
@@ -913,6 +912,7 @@ static int mtk_crtc_init_comp_planes(struct drm_device *drm_dev,
913912
BIT(pipe),
914913
mtk_crtc_plane_type(mtk_crtc->layer_nr, num_planes),
915914
mtk_ddp_comp_supported_rotations(comp),
915+
mtk_ddp_comp_get_blend_modes(comp),
916916
mtk_ddp_comp_get_formats(comp),
917917
mtk_ddp_comp_get_num_formats(comp), i);
918918
if (ret)

0 commit comments

Comments
 (0)