Skip to content

Commit fd14385

Browse files
committed
Merge tag 'drm-fixes-2024-10-25' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Weekly drm fixes, mostly amdgpu and xe, with minor bridge and an i915 Kconfig fix. Nothing too scary and it seems to be pretty quiet. amdgpu: - ACPI method handling fixes - SMU 14.x fixes - Display idle optimization fix - DP link layer compliance fix - SDMA 7.x fix - PSR-SU fix - SWSMU fix i915: - Fix DRM_I915_GVT_KVMGT dependencies in Kconfig xe: - Increase invalidation timeout to avoid errors in some hosts - Flush worker on timeout - Better handling for force wake failure - Improve argument check on user fence creation - Don't restart parallel queues multiple times on GT reset bridge: - aux: Fix assignment of OF node - tc358767: Add missing of_node_put() in error path" * tag 'drm-fixes-2024-10-25' of https://gitlab.freedesktop.org/drm/kernel: drm/xe: Don't restart parallel queues multiple times on GT reset drm/xe/ufence: Prefetch ufence addr to catch bogus address drm/xe: Handle unreliable MMIO reads during forcewake drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout drm/xe: Enlarge the invalidation timeout from 150 to 500 drm/amdgpu: handle default profile on on devices without fullscreen 3D drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too drm/amdgpu: fix random data corruption for sdma 7 drm/amd/display: temp w/a for DP Link Layer compliance drm/amd/display: temp w/a for dGPU to enter idle optimizations drm/amd/pm: update deep sleep status on smu v14.0.2/3 drm/amd/pm: update overdrive function on smu v14.0.2/3 drm/amd/pm: update the driver-fw interface file for smu v14.0.2/3 drm/amd: Guard against bad data for ATIF ACPI method drm/bridge: tc358767: fix missing of_node_put() in for_each_endpoint_of_node() drm/bridge: Fix assignment of the of_node of the parent to aux bridge i915: fix DRM_I915_GVT_KVMGT dependencies
2 parents 4dc1f31 + 4d95a12 commit fd14385

File tree

17 files changed

+202
-107
lines changed

17 files changed

+202
-107
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
147147
struct acpi_buffer *params)
148148
{
149149
acpi_status status;
150+
union acpi_object *obj;
150151
union acpi_object atif_arg_elements[2];
151152
struct acpi_object_list atif_arg;
152153
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -169,16 +170,24 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
169170

170171
status = acpi_evaluate_object(atif->handle, NULL, &atif_arg,
171172
&buffer);
173+
obj = (union acpi_object *)buffer.pointer;
172174

173-
/* Fail only if calling the method fails and ATIF is supported */
175+
/* Fail if calling the method fails and ATIF is supported */
174176
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
175177
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
176178
acpi_format_exception(status));
177-
kfree(buffer.pointer);
179+
kfree(obj);
178180
return NULL;
179181
}
180182

181-
return buffer.pointer;
183+
if (obj->type != ACPI_TYPE_BUFFER) {
184+
DRM_DEBUG_DRIVER("bad object returned from ATIF: %d\n",
185+
obj->type);
186+
kfree(obj);
187+
return NULL;
188+
}
189+
190+
return obj;
182191
}
183192

184193
/**

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ MODULE_FIRMWARE("amdgpu/sdma_7_0_1.bin");
5151
#define SDMA0_HYP_DEC_REG_END 0x589a
5252
#define SDMA1_HYP_DEC_REG_OFFSET 0x20
5353

54+
/*define for compression field for sdma7*/
55+
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_offset 0
56+
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_mask 0x00000001
57+
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_shift 16
58+
#define SDMA_PKT_CONSTANT_FILL_HEADER_COMPRESS(x) (((x) & SDMA_PKT_CONSTANT_FILL_HEADER_compress_mask) << SDMA_PKT_CONSTANT_FILL_HEADER_compress_shift)
59+
5460
static const struct amdgpu_hwip_reg_entry sdma_reg_list_7_0[] = {
5561
SOC15_REG_ENTRY_STR(GC, 0, regSDMA0_STATUS_REG),
5662
SOC15_REG_ENTRY_STR(GC, 0, regSDMA0_STATUS1_REG),
@@ -1724,7 +1730,8 @@ static void sdma_v7_0_emit_fill_buffer(struct amdgpu_ib *ib,
17241730
uint64_t dst_offset,
17251731
uint32_t byte_count)
17261732
{
1727-
ib->ptr[ib->length_dw++] = SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_CONST_FILL);
1733+
ib->ptr[ib->length_dw++] = SDMA_PKT_CONSTANT_FILL_HEADER_OP(SDMA_OP_CONST_FILL) |
1734+
SDMA_PKT_CONSTANT_FILL_HEADER_COMPRESS(1);
17281735
ib->ptr[ib->length_dw++] = lower_32_bits(dst_offset);
17291736
ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset);
17301737
ib->ptr[ib->length_dw++] = src_data;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8374,7 +8374,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
83748374
if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
83758375
IP_VERSION(3, 5, 0) ||
83768376
acrtc_state->stream->link->psr_settings.psr_version <
8377-
DC_PSR_VERSION_UNSUPPORTED) {
8377+
DC_PSR_VERSION_UNSUPPORTED ||
8378+
!(adev->flags & AMD_IS_APU)) {
83788379
timing = &acrtc_state->stream->timing;
83798380

83808381
/* at least 2 frames */

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
#include "dm_helpers.h"
4646
#include "ddc_service_types.h"
47+
#include "clk_mgr.h"
4748

4849
static u32 edid_extract_panel_id(struct edid *edid)
4950
{
@@ -1121,6 +1122,8 @@ bool dm_helpers_dp_handle_test_pattern_request(
11211122
struct pipe_ctx *pipe_ctx = NULL;
11221123
struct amdgpu_dm_connector *aconnector = link->priv;
11231124
struct drm_device *dev = aconnector->base.dev;
1125+
struct dc_state *dc_state = ctx->dc->current_state;
1126+
struct clk_mgr *clk_mgr = ctx->dc->clk_mgr;
11241127
int i;
11251128

11261129
for (i = 0; i < MAX_PIPES; i++) {
@@ -1221,6 +1224,16 @@ bool dm_helpers_dp_handle_test_pattern_request(
12211224
pipe_ctx->stream->test_pattern.type = test_pattern;
12221225
pipe_ctx->stream->test_pattern.color_space = test_pattern_color_space;
12231226

1227+
/* Temp W/A for compliance test failure */
1228+
dc_state->bw_ctx.bw.dcn.clk.p_state_change_support = false;
1229+
dc_state->bw_ctx.bw.dcn.clk.dramclk_khz = clk_mgr->dc_mode_softmax_enabled ?
1230+
clk_mgr->bw_params->dc_mode_softmax_memclk : clk_mgr->bw_params->max_memclk_mhz;
1231+
dc_state->bw_ctx.bw.dcn.clk.idle_dramclk_khz = dc_state->bw_ctx.bw.dcn.clk.dramclk_khz;
1232+
ctx->dc->clk_mgr->funcs->update_clocks(
1233+
ctx->dc->clk_mgr,
1234+
dc_state,
1235+
false);
1236+
12241237
dc_link_dp_set_test_pattern(
12251238
(struct dc_link *) link,
12261239
test_pattern,

drivers/gpu/drm/amd/display/modules/power/power_helpers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,8 @@ bool is_psr_su_specific_panel(struct dc_link *link)
841841
isPSRSUSupported = false;
842842
else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x03)
843843
isPSRSUSupported = false;
844+
else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x01)
845+
isPSRSUSupported = false;
844846
else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1)
845847
isPSRSUSupported = true;
846848
}

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,14 @@ static void smu_init_xgmi_plpd_mode(struct smu_context *smu)
12341234
}
12351235
}
12361236

1237+
static bool smu_is_workload_profile_available(struct smu_context *smu,
1238+
u32 profile)
1239+
{
1240+
if (profile >= PP_SMC_POWER_PROFILE_COUNT)
1241+
return false;
1242+
return smu->workload_map && smu->workload_map[profile].valid_mapping;
1243+
}
1244+
12371245
static int smu_sw_init(void *handle)
12381246
{
12391247
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1265,7 +1273,8 @@ static int smu_sw_init(void *handle)
12651273
smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE] = 5;
12661274
smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM] = 6;
12671275

1268-
if (smu->is_apu)
1276+
if (smu->is_apu ||
1277+
!smu_is_workload_profile_available(smu, PP_SMC_POWER_PROFILE_FULLSCREEN3D))
12691278
smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
12701279
else
12711280
smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];

0 commit comments

Comments
 (0)