Skip to content

Commit 0ba9b15

Browse files
committed
Merge tag 'drm-next-2024-07-26' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Fixes for rc1, mostly amdgpu, i915 and xe, with some other misc ones, doesn't seem to be anything too serious. amdgpu: - Bump driver version for GFX12 DCC - DC documention warning fixes - VCN unified queue power fix - SMU fix - RAS fix - Display corruption fix - SDMA 5.2 workaround - GFX12 fixes - Uninitialized variable fix - VCN/JPEG 4.0.3 fixes - Misc display fixes - RAS fixes - VCN4/5 harvest fix - GPU reset fix i915: - Reset intel_dp->link_trained before retraining the link - Don't switch the LTTPR mode on an active link - Do not consider preemption during execlists_dequeue for gen8 - Allow NULL memory region xe: - xe_exec ioctl minor fix on sync entry cleanup upon error - SRIOV: limit VF LMEM provisioning - Wedge mode fixes v3d: - fix indirect dispatch on newer v3d revs panel: - fix panel backlight bindings" * tag 'drm-next-2024-07-26' of https://gitlab.freedesktop.org/drm/kernel: (39 commits) drm/amdgpu: reset vm state machine after gpu reset(vram lost) drm/amdgpu: add missed harvest check for VCN IP v4/v5 drm/amdgpu: Fix eeprom max record count drm/amdgpu: fix ras UE error injection failure issue drm/amd/display: Remove ASSERT if significance is zero in math_ceil2 drm/amd/display: Check for NULL pointer drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF drm/amdgpu: Add empty HDP flush function to VCN v4.0.3 drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3 drm/amd/amdgpu: Fix uninitialized variable warnings drm/amdgpu: Fix atomics on GFX12 drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell drm/i915: Allow NULL memory region drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8 dt-bindings: display: panel: samsung,atna33xc20: Document ATNA45AF01 drm/xe: Don't suspend device upon wedge drm/xe: Wedge the entire device drm/xe/pf: Limit fair VF LMEM provisioning drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup drm/amd/display: fix corruption with high refresh rates on DCN 3.0 ...
2 parents 65ad409 + d4ef5d2 commit 0ba9b15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+690
-197
lines changed

Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ allOf:
1414

1515
properties:
1616
compatible:
17-
const: samsung,atna33xc20
17+
oneOf:
18+
# Samsung 13.3" FHD (1920x1080 pixels) eDP AMOLED panel
19+
- const: samsung,atna33xc20
20+
# Samsung 14.5" WQXGA+ (2880x1800 pixels) eDP AMOLED panel
21+
- items:
22+
- const: samsung,atna45af01
23+
- const: samsung,atna33xc20
1824

1925
enable-gpios: true
2026
port: true

Documentation/gpu/amdgpu/display/dcn-blocks.rst

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,22 @@ and the code documentation when it is automatically generated.
88
DCHUBBUB
99
--------
1010

11-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
11+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
1212
:doc: overview
1313

14-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
15-
:export:
16-
17-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
18-
:internal:
19-
2014
HUBP
2115
----
2216

2317
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
2418
:doc: overview
2519

26-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
27-
:export:
28-
29-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
30-
:internal:
31-
3220
DPP
3321
---
3422

35-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
23+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
3624
:doc: overview
3725

38-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
39-
:export:
40-
41-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
26+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
4227
:internal:
4328

4429
MPC
@@ -47,32 +32,24 @@ MPC
4732
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
4833
:doc: overview
4934

50-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
51-
:export:
52-
5335
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
5436
:internal:
37+
:no-identifiers: mpcc_blnd_cfg mpcc_alpha_blend_mode
5538

5639
OPP
5740
---
5841

5942
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
6043
:doc: overview
6144

62-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
63-
:export:
64-
6545
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
6646
:internal:
6747

6848
DIO
6949
---
7050

71-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
51+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c
7252
:doc: overview
7353

74-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
75-
:export:
76-
77-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
54+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c
7855
:internal:

Documentation/gpu/amdgpu/display/display-manager.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The DRM blend mode and its elements are then mapped by AMDGPU display manager
132132
(MPC), as follows:
133133

134134
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
135-
:functions: mpcc_blnd_cfg
135+
:identifiers: mpcc_blnd_cfg
136136

137137
Therefore, the blending configuration for a single MPCC instance on the MPC
138138
tree is defined by :c:type:`mpcc_blnd_cfg`, where
@@ -144,7 +144,7 @@ alpha and plane alpha values. It sets one of the three modes for
144144
:c:type:`MPCC_ALPHA_BLND_MODE`, as described below.
145145

146146
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
147-
:functions: mpcc_alpha_blend_mode
147+
:identifiers: mpcc_alpha_blend_mode
148148

149149
DM then maps the elements of `enum mpcc_alpha_blend_mode` to those in the DRM
150150
blend formula, as follows:

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ amdgpu-y += \
106106
df_v1_7.o \
107107
df_v3_6.o \
108108
df_v4_3.o \
109-
df_v4_6_2.o
109+
df_v4_6_2.o \
110+
df_v4_15.o
110111

111112
# add GMC block
112113
amdgpu-y += \

drivers/gpu/drm/amd/amdgpu/amdgpu_df.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct amdgpu_df_hash_status {
3333
struct amdgpu_df_funcs {
3434
void (*sw_init)(struct amdgpu_device *adev);
3535
void (*sw_fini)(struct amdgpu_device *adev);
36+
void (*hw_init)(struct amdgpu_device *adev);
3637
void (*enable_broadcast_mode)(struct amdgpu_device *adev,
3738
bool enable);
3839
u32 (*get_fb_channel_number)(struct amdgpu_device *adev);

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "df_v3_6.h"
3838
#include "df_v4_3.h"
3939
#include "df_v4_6_2.h"
40+
#include "df_v4_15.h"
4041
#include "nbio_v6_1.h"
4142
#include "nbio_v7_0.h"
4243
#include "nbio_v7_4.h"
@@ -2803,6 +2804,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
28032804
case IP_VERSION(4, 6, 2):
28042805
adev->df.funcs = &df_v4_6_2_funcs;
28052806
break;
2807+
case IP_VERSION(4, 15, 0):
2808+
case IP_VERSION(4, 15, 1):
2809+
adev->df.funcs = &df_v4_15_funcs;
2810+
break;
28062811
default:
28072812
break;
28082813
}

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@
116116
* - 3.55.0 - Add AMDGPU_INFO_GPUVM_FAULT query
117117
* - 3.56.0 - Update IB start address and size alignment for decode and encode
118118
* - 3.57.0 - Compute tunneling on GFX10+
119+
* - 3.58.0 - Add GFX12 DCC support
119120
*/
120121
#define KMS_DRIVER_MAJOR 3
121-
#define KMS_DRIVER_MINOR 57
122+
#define KMS_DRIVER_MINOR 58
122123
#define KMS_DRIVER_PATCHLEVEL 0
123124

124125
/*

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 81 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,66 @@ static void psp_ras_ta_check_status(struct psp_context *psp)
15911591
}
15921592
}
15931593

1594+
static int psp_ras_send_cmd(struct psp_context *psp,
1595+
enum ras_command cmd_id, void *in, void *out)
1596+
{
1597+
struct ta_ras_shared_memory *ras_cmd;
1598+
uint32_t cmd = cmd_id;
1599+
int ret = 0;
1600+
1601+
if (!in)
1602+
return -EINVAL;
1603+
1604+
mutex_lock(&psp->ras_context.mutex);
1605+
ras_cmd = (struct ta_ras_shared_memory *)psp->ras_context.context.mem_context.shared_buf;
1606+
memset(ras_cmd, 0, sizeof(struct ta_ras_shared_memory));
1607+
1608+
switch (cmd) {
1609+
case TA_RAS_COMMAND__ENABLE_FEATURES:
1610+
case TA_RAS_COMMAND__DISABLE_FEATURES:
1611+
memcpy(&ras_cmd->ras_in_message,
1612+
in, sizeof(ras_cmd->ras_in_message));
1613+
break;
1614+
case TA_RAS_COMMAND__TRIGGER_ERROR:
1615+
memcpy(&ras_cmd->ras_in_message.trigger_error,
1616+
in, sizeof(ras_cmd->ras_in_message.trigger_error));
1617+
break;
1618+
case TA_RAS_COMMAND__QUERY_ADDRESS:
1619+
memcpy(&ras_cmd->ras_in_message.address,
1620+
in, sizeof(ras_cmd->ras_in_message.address));
1621+
break;
1622+
default:
1623+
dev_err(psp->adev->dev, "Invalid ras cmd id: %u\n", cmd);
1624+
ret = -EINVAL;
1625+
goto err_out;
1626+
}
1627+
1628+
ras_cmd->cmd_id = cmd;
1629+
ret = psp_ras_invoke(psp, ras_cmd->cmd_id);
1630+
1631+
switch (cmd) {
1632+
case TA_RAS_COMMAND__TRIGGER_ERROR:
1633+
if (!ret && out)
1634+
memcpy(out, &ras_cmd->ras_status, sizeof(ras_cmd->ras_status));
1635+
break;
1636+
case TA_RAS_COMMAND__QUERY_ADDRESS:
1637+
if (ret || ras_cmd->ras_status || psp->cmd_buf_mem->resp.status)
1638+
ret = -EINVAL;
1639+
else if (out)
1640+
memcpy(out,
1641+
&ras_cmd->ras_out_message.address,
1642+
sizeof(ras_cmd->ras_out_message.address));
1643+
break;
1644+
default:
1645+
break;
1646+
}
1647+
1648+
err_out:
1649+
mutex_unlock(&psp->ras_context.mutex);
1650+
1651+
return ret;
1652+
}
1653+
15941654
int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
15951655
{
15961656
struct ta_ras_shared_memory *ras_cmd;
@@ -1632,23 +1692,15 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
16321692
int psp_ras_enable_features(struct psp_context *psp,
16331693
union ta_ras_cmd_input *info, bool enable)
16341694
{
1635-
struct ta_ras_shared_memory *ras_cmd;
1695+
enum ras_command cmd_id;
16361696
int ret;
16371697

1638-
if (!psp->ras_context.context.initialized)
1698+
if (!psp->ras_context.context.initialized || !info)
16391699
return -EINVAL;
16401700

1641-
ras_cmd = (struct ta_ras_shared_memory *)psp->ras_context.context.mem_context.shared_buf;
1642-
memset(ras_cmd, 0, sizeof(struct ta_ras_shared_memory));
1643-
1644-
if (enable)
1645-
ras_cmd->cmd_id = TA_RAS_COMMAND__ENABLE_FEATURES;
1646-
else
1647-
ras_cmd->cmd_id = TA_RAS_COMMAND__DISABLE_FEATURES;
1648-
1649-
ras_cmd->ras_in_message = *info;
1650-
1651-
ret = psp_ras_invoke(psp, ras_cmd->cmd_id);
1701+
cmd_id = enable ?
1702+
TA_RAS_COMMAND__ENABLE_FEATURES : TA_RAS_COMMAND__DISABLE_FEATURES;
1703+
ret = psp_ras_send_cmd(psp, cmd_id, info, NULL);
16521704
if (ret)
16531705
return -EINVAL;
16541706

@@ -1672,6 +1724,8 @@ int psp_ras_terminate(struct psp_context *psp)
16721724

16731725
psp->ras_context.context.initialized = false;
16741726

1727+
mutex_destroy(&psp->ras_context.mutex);
1728+
16751729
return ret;
16761730
}
16771731

@@ -1756,9 +1810,10 @@ int psp_ras_initialize(struct psp_context *psp)
17561810

17571811
ret = psp_ta_load(psp, &psp->ras_context.context);
17581812

1759-
if (!ret && !ras_cmd->ras_status)
1813+
if (!ret && !ras_cmd->ras_status) {
17601814
psp->ras_context.context.initialized = true;
1761-
else {
1815+
mutex_init(&psp->ras_context.mutex);
1816+
} else {
17621817
if (ras_cmd->ras_status)
17631818
dev_warn(adev->dev, "RAS Init Status: 0x%X\n", ras_cmd->ras_status);
17641819

@@ -1772,12 +1827,12 @@ int psp_ras_initialize(struct psp_context *psp)
17721827
int psp_ras_trigger_error(struct psp_context *psp,
17731828
struct ta_ras_trigger_error_input *info, uint32_t instance_mask)
17741829
{
1775-
struct ta_ras_shared_memory *ras_cmd;
17761830
struct amdgpu_device *adev = psp->adev;
17771831
int ret;
17781832
uint32_t dev_mask;
1833+
uint32_t ras_status = 0;
17791834

1780-
if (!psp->ras_context.context.initialized)
1835+
if (!psp->ras_context.context.initialized || !info)
17811836
return -EINVAL;
17821837

17831838
switch (info->block_id) {
@@ -1801,13 +1856,8 @@ int psp_ras_trigger_error(struct psp_context *psp,
18011856
dev_mask &= AMDGPU_RAS_INST_MASK;
18021857
info->sub_block_index |= dev_mask;
18031858

1804-
ras_cmd = (struct ta_ras_shared_memory *)psp->ras_context.context.mem_context.shared_buf;
1805-
memset(ras_cmd, 0, sizeof(struct ta_ras_shared_memory));
1806-
1807-
ras_cmd->cmd_id = TA_RAS_COMMAND__TRIGGER_ERROR;
1808-
ras_cmd->ras_in_message.trigger_error = *info;
1809-
1810-
ret = psp_ras_invoke(psp, ras_cmd->cmd_id);
1859+
ret = psp_ras_send_cmd(psp,
1860+
TA_RAS_COMMAND__TRIGGER_ERROR, info, &ras_status);
18111861
if (ret)
18121862
return -EINVAL;
18131863

@@ -1817,9 +1867,9 @@ int psp_ras_trigger_error(struct psp_context *psp,
18171867
if (amdgpu_ras_intr_triggered())
18181868
return 0;
18191869

1820-
if (ras_cmd->ras_status == TA_RAS_STATUS__TEE_ERROR_ACCESS_DENIED)
1870+
if (ras_status == TA_RAS_STATUS__TEE_ERROR_ACCESS_DENIED)
18211871
return -EACCES;
1822-
else if (ras_cmd->ras_status)
1872+
else if (ras_status)
18231873
return -EINVAL;
18241874

18251875
return 0;
@@ -1829,25 +1879,16 @@ int psp_ras_query_address(struct psp_context *psp,
18291879
struct ta_ras_query_address_input *addr_in,
18301880
struct ta_ras_query_address_output *addr_out)
18311881
{
1832-
struct ta_ras_shared_memory *ras_cmd;
18331882
int ret;
18341883

1835-
if (!psp->ras_context.context.initialized)
1836-
return -EINVAL;
1837-
1838-
ras_cmd = (struct ta_ras_shared_memory *)psp->ras_context.context.mem_context.shared_buf;
1839-
memset(ras_cmd, 0, sizeof(struct ta_ras_shared_memory));
1840-
1841-
ras_cmd->cmd_id = TA_RAS_COMMAND__QUERY_ADDRESS;
1842-
ras_cmd->ras_in_message.address = *addr_in;
1843-
1844-
ret = psp_ras_invoke(psp, ras_cmd->cmd_id);
1845-
if (ret || ras_cmd->ras_status || psp->cmd_buf_mem->resp.status)
1884+
if (!psp->ras_context.context.initialized ||
1885+
!addr_in || !addr_out)
18461886
return -EINVAL;
18471887

1848-
*addr_out = ras_cmd->ras_out_message.address;
1888+
ret = psp_ras_send_cmd(psp,
1889+
TA_RAS_COMMAND__QUERY_ADDRESS, addr_in, addr_out);
18491890

1850-
return 0;
1891+
return ret;
18511892
}
18521893
// ras end
18531894

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ struct psp_xgmi_context {
200200
struct psp_ras_context {
201201
struct ta_context context;
202202
struct amdgpu_ras *ras;
203+
struct mutex mutex;
203204
};
204205

205206
#define MEM_TRAIN_SYSTEM_SIGNATURE 0x54534942

drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ static ssize_t ta_if_invoke_debugfs_write(struct file *fp, const char *buf, size
348348

349349
context->session_id = ta_id;
350350

351+
mutex_lock(&psp->ras_context.mutex);
351352
ret = prep_ta_mem_context(&context->mem_context, shared_buf, shared_buf_len);
352353
if (ret)
353354
goto err_free_shared_buf;
@@ -366,6 +367,7 @@ static ssize_t ta_if_invoke_debugfs_write(struct file *fp, const char *buf, size
366367
ret = -EFAULT;
367368

368369
err_free_shared_buf:
370+
mutex_unlock(&psp->ras_context.mutex);
369371
kfree(shared_buf);
370372

371373
return ret;

0 commit comments

Comments
 (0)