Commit 19c6890c authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.12-2024-10-23' of...

Merge tag 'amd-drm-fixes-6.12-2024-10-23' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-6.12-2024-10-23:

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

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241023180208.452636-1-alexander.deucher@amd.com
parents 42f7652d 7c210ca5
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
					   struct acpi_buffer *params)
{
	acpi_status status;
	union acpi_object *obj;
	union acpi_object atif_arg_elements[2];
	struct acpi_object_list atif_arg;
	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -169,16 +170,24 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,

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

	/* Fail only if calling the method fails and ATIF is supported */
	/* Fail if calling the method fails and ATIF is supported */
	if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
		DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
				 acpi_format_exception(status));
		kfree(buffer.pointer);
		kfree(obj);
		return NULL;
	}

	return buffer.pointer;
	if (obj->type != ACPI_TYPE_BUFFER) {
		DRM_DEBUG_DRIVER("bad object returned from ATIF: %d\n",
				 obj->type);
		kfree(obj);
		return NULL;
	}

	return obj;
}

/**
+8 −1
Original line number Diff line number Diff line
@@ -51,6 +51,12 @@ MODULE_FIRMWARE("amdgpu/sdma_7_0_1.bin");
#define SDMA0_HYP_DEC_REG_END 0x589a
#define SDMA1_HYP_DEC_REG_OFFSET 0x20

/*define for compression field for sdma7*/
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_offset 0
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_mask   0x00000001
#define SDMA_PKT_CONSTANT_FILL_HEADER_compress_shift  16
#define SDMA_PKT_CONSTANT_FILL_HEADER_COMPRESS(x) (((x) & SDMA_PKT_CONSTANT_FILL_HEADER_compress_mask) << SDMA_PKT_CONSTANT_FILL_HEADER_compress_shift)

static const struct amdgpu_hwip_reg_entry sdma_reg_list_7_0[] = {
	SOC15_REG_ENTRY_STR(GC, 0, regSDMA0_STATUS_REG),
	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,
				       uint64_t dst_offset,
				       uint32_t byte_count)
{
	ib->ptr[ib->length_dw++] = SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_CONST_FILL);
	ib->ptr[ib->length_dw++] = SDMA_PKT_CONSTANT_FILL_HEADER_OP(SDMA_OP_CONST_FILL) |
		SDMA_PKT_CONSTANT_FILL_HEADER_COMPRESS(1);
	ib->ptr[ib->length_dw++] = lower_32_bits(dst_offset);
	ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset);
	ib->ptr[ib->length_dw++] = src_data;
+2 −1
Original line number Diff line number Diff line
@@ -8374,7 +8374,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
		if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
		    IP_VERSION(3, 5, 0) ||
		    acrtc_state->stream->link->psr_settings.psr_version <
		    DC_PSR_VERSION_UNSUPPORTED) {
		    DC_PSR_VERSION_UNSUPPORTED ||
		    !(adev->flags & AMD_IS_APU)) {
			timing = &acrtc_state->stream->timing;

			/* at least 2 frames */
+13 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@

#include "dm_helpers.h"
#include "ddc_service_types.h"
#include "clk_mgr.h"

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

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

	/* Temp W/A for compliance test failure */
	dc_state->bw_ctx.bw.dcn.clk.p_state_change_support = false;
	dc_state->bw_ctx.bw.dcn.clk.dramclk_khz = clk_mgr->dc_mode_softmax_enabled ?
		clk_mgr->bw_params->dc_mode_softmax_memclk : clk_mgr->bw_params->max_memclk_mhz;
	dc_state->bw_ctx.bw.dcn.clk.idle_dramclk_khz = dc_state->bw_ctx.bw.dcn.clk.dramclk_khz;
	ctx->dc->clk_mgr->funcs->update_clocks(
			ctx->dc->clk_mgr,
			dc_state,
			false);

	dc_link_dp_set_test_pattern(
		(struct dc_link *) link,
		test_pattern,
+2 −0
Original line number Diff line number Diff line
@@ -841,6 +841,8 @@ bool is_psr_su_specific_panel(struct dc_link *link)
				isPSRSUSupported = false;
			else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x03)
				isPSRSUSupported = false;
			else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x01)
				isPSRSUSupported = false;
			else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1)
				isPSRSUSupported = true;
		}
Loading