Re: linux-next: manual merge of the amdgpu tree with the drm-misc,drm-fixes tree

From: Mark Brown

Date: Fri Sep 11 2026 - 11:26:49 EST


On Fri, Sep 11, 2026 at 02:25:38PM +0100, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the amdgpu tree got conflicts in:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
> drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c

*sigh* This isn't the right fixup in a similar way to what happened
earlier this week. In this case it looks like whatever you are doing
has massively confused git too, there's horrible messes in files that
didn't show up as needing merge resolutions. I've done something that
builds but I'm confident it doesn't work, especially given that it's
layered on top of the cleanup of the earlier fallout which I'm also
confident didn't work.

Please, could you have a look at your processes so that you are not
continually introducing noisy conflicts with your own work so that when
there is an actual conflict like seems to be happening here it's
actually visible when doing the resolution rather than showing up as
build failures like this.

One thing that would be very helpful if you have a super invasive change
would be to actively merge up branches that conflict so they're not so
visible externally, this looks a lot like something we went through the
entire last release cycle with *huge* conflicts caused by splitting up a
big file needing to be redone every time either your fixes or new work
touched that file, when there's a change in a conflict I have to redo
the whole merge.

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 2db5fd0e72d16..0c19188df3755 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2941,7 +2941,7 @@ STATIC_IFN_KUNIT bool modereset_required(struct drm_crtc_state *crtc_state)
EXPORT_IF_KUNIT(modereset_required);

STATIC_IFN_KUNIT int
-fill_plane_color_attributes(struct drm_atomic_commit *state,
+fill_plane_color_attributes(const struct drm_atomic_commit *state,
const struct drm_plane_state *plane_state,
const enum surface_pixel_format format,
enum dc_color_space *color_space)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
index 27753bf50b706..256d2c0e5fba3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -1242,7 +1242,8 @@ bool update_planes_and_stream_adapter(struct dc *dc,
struct dc_stream_state *stream,
struct dc_stream_update *stream_update,
struct dc_surface_update *array_of_surface_update);
-int fill_plane_color_attributes(const struct drm_plane_state *plane_state,
+int fill_plane_color_attributes(const struct drm_atomic_commit *state,
+ const struct drm_plane_state *plane_state,
const enum surface_pixel_format format,
enum dc_color_space *color_space);
bool modereset_required(struct drm_crtc_state *crtc_state);
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
index d3d362a99674e..d76ebf145dfc3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
@@ -3666,42 +3666,6 @@ STATIC_IFN_KUNIT bool parse_edid_cea_dmcu(struct amdgpu_display_manager *dm,
u8 *edid_ext, int len,
struct amdgpu_hdmi_vsdb_info *vsdb_info)
{
- int i;
-
- /* send extension block to DMCU for parsing */
- for (i = 0; i < len; i += 8) {
- bool res;
- int offset;
-
- /* send 8 bytes a time */
- if (!dc_edid_parser_send_cea(dm->dc, i, len, &edid_ext[i], 8))
- return false;
-
- if (i+8 == len) {
- /* EDID block sent completed, expect result */
- int version, min_rate, max_rate;
-
- res = dc_edid_parser_recv_amd_vsdb(dm->dc, &version, &min_rate, &max_rate);
- if (res) {
- /* amd vsdb found */
- vsdb_info->freesync_supported = 1;
- vsdb_info->amd_vsdb_version = version;
- vsdb_info->min_refresh_rate_hz = min_rate;
- vsdb_info->max_refresh_rate_hz = max_rate;
- /* Not enabled on DMCU*/
- vsdb_info->freesync_mccs_vcp_code = 0;
- return true;
- }
- /* not amd vsdb */
- return false;
- }
-
- /* check for ack*/
- res = dc_edid_parser_recv_cea_ack(dm->dc, &offset);
- if (!res)
- return false;
- }
-
return false;
}
EXPORT_IF_KUNIT(parse_edid_cea_dmcu);
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
index 8107be27d324e..19ead11b5e73c 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
@@ -6140,57 +6140,16 @@ static bool dm_test_dmcu_is_init(struct dmcu *dmcu)
return true;
}

-static bool dm_test_dmcu_send_cea(struct dmcu *dmcu, int offset,
- int total_length, u8 *data, int length)
-{
- return true;
-}
-
-static bool dm_test_dmcu_recv_ack_ok(struct dmcu *dmcu, int *offset)
-{
- *offset = 0;
- return true;
-}
-
-static bool dm_test_dmcu_recv_ack_fail(struct dmcu *dmcu, int *offset)
-{
- return false;
-}
-
-static bool dm_test_dmcu_recv_vsdb_found(struct dmcu *dmcu, int *version,
- int *min_frame_rate, int *max_frame_rate)
-{
- *version = 2;
- *min_frame_rate = 24;
- *max_frame_rate = 60;
- return true;
-}
-
-static bool dm_test_dmcu_recv_vsdb_none(struct dmcu *dmcu, int *version,
- int *min_frame_rate, int *max_frame_rate)
-{
- return false;
-}
-
static const struct dmcu_funcs dm_test_dmcu_funcs_vsdb = {
.is_dmcu_initialized = dm_test_dmcu_is_init,
- .send_edid_cea = dm_test_dmcu_send_cea,
- .recv_edid_cea_ack = dm_test_dmcu_recv_ack_ok,
- .recv_amd_vsdb = dm_test_dmcu_recv_vsdb_found,
};

static const struct dmcu_funcs dm_test_dmcu_funcs_novsdb = {
.is_dmcu_initialized = dm_test_dmcu_is_init,
- .send_edid_cea = dm_test_dmcu_send_cea,
- .recv_edid_cea_ack = dm_test_dmcu_recv_ack_ok,
- .recv_amd_vsdb = dm_test_dmcu_recv_vsdb_none,
};

static const struct dmcu_funcs dm_test_dmcu_funcs_ackfail = {
.is_dmcu_initialized = dm_test_dmcu_is_init,
- .send_edid_cea = dm_test_dmcu_send_cea,
- .recv_edid_cea_ack = dm_test_dmcu_recv_ack_fail,
- .recv_amd_vsdb = dm_test_dmcu_recv_vsdb_none,
};

/*
@@ -6295,37 +6254,6 @@ static void dm_test_parse_cea_dmcu_empty(struct kunit *test)
*/
static void dm_test_parse_cea_dmcu_no_dmcu(struct kunit *test)
{
- struct amdgpu_display_manager *dm = dm_test_alloc_dm_dmcu(test, NULL);
- struct amdgpu_hdmi_vsdb_info vsdb = {0};
- u8 ext[DMUB_EDID_CEA_DATA_CHUNK_BYTES] = {0};
- bool ret;
-
- /* res_pool->dmcu is NULL, so the CEA send returns false. */
- ret = parse_edid_cea_dmcu(dm, ext, DMUB_EDID_CEA_DATA_CHUNK_BYTES,
- &vsdb);
- KUNIT_EXPECT_FALSE(test, ret);
-}
-
-/**
- * dm_test_parse_cea_dmcu_vsdb_found - Test the DMCU reports an AMD VSDB
- * @test: KUnit test context
- */
-static void dm_test_parse_cea_dmcu_vsdb_found(struct kunit *test)
-{
- struct amdgpu_display_manager *dm =
- dm_test_alloc_dm_dmcu(test, &dm_test_dmcu_funcs_vsdb);
- struct amdgpu_hdmi_vsdb_info vsdb = {0};
- u8 ext[DMUB_EDID_CEA_DATA_CHUNK_BYTES] = {0};
- bool ret;
-
- ret = parse_edid_cea_dmcu(dm, ext, DMUB_EDID_CEA_DATA_CHUNK_BYTES,
- &vsdb);
- KUNIT_EXPECT_TRUE(test, ret);
- KUNIT_EXPECT_TRUE(test, vsdb.freesync_supported);
- KUNIT_EXPECT_EQ(test, vsdb.amd_vsdb_version, 2);
- KUNIT_EXPECT_EQ(test, vsdb.min_refresh_rate_hz, 24);
- KUNIT_EXPECT_EQ(test, vsdb.max_refresh_rate_hz, 60);
- KUNIT_EXPECT_EQ(test, vsdb.freesync_mccs_vcp_code, 0);
}

/**
@@ -9159,7 +9087,6 @@ static struct kunit_case amdgpu_dm_connector_tests[] = {
KUNIT_CASE(dm_test_send_cea_dmub_unavailable),
KUNIT_CASE(dm_test_parse_cea_dmcu_empty),
KUNIT_CASE(dm_test_parse_cea_dmcu_no_dmcu),
- KUNIT_CASE(dm_test_parse_cea_dmcu_vsdb_found),
KUNIT_CASE(dm_test_parse_cea_dmcu_vsdb_none),
KUNIT_CASE(dm_test_parse_cea_dmcu_multi_chunk),
KUNIT_CASE(dm_test_parse_cea_dmcu_ack_fail),
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index 45385f9eb8932..58826291827b1 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -1957,6 +1957,10 @@ enum dmub_cmd_type {
* Command type used for interfacing with DPIA.
*/
DMUB_CMD__DPIA = 77,
+ /**
+ * Command type used for EDID CEA parsing
+ */
+ DMUB_CMD__EDID_CEA = 79,
/**
* Command type used for getting usbc cable ID
*/
@@ -6926,6 +6930,72 @@ struct dmub_rb_cmd_transmitter_set_phy_fsm {
struct dmub_rb_cmd_transmitter_set_phy_fsm_data data; /**< payload */
};

+/**
+ * Maximum number of bytes a chunk sent to DMUB for parsing
+ */
+#define DMUB_EDID_CEA_DATA_CHUNK_BYTES 8
+
+/**
+ * Represent a chunk of CEA blocks sent to DMUB for parsing
+ */
+struct dmub_cmd_send_edid_cea {
+ uint16_t offset; /**< offset into the CEA block */
+ uint8_t length; /**< number of bytes in payload to copy as part of CEA block */
+ uint16_t cea_total_length; /**< total length of the CEA block */
+ uint8_t payload[DMUB_EDID_CEA_DATA_CHUNK_BYTES]; /**< data chunk of the CEA block */
+ uint8_t pad[3]; /**< padding and for future expansion */
+};
+
+/**
+ * Result of VSDB parsing from CEA block
+ */
+struct dmub_cmd_edid_cea_amd_vsdb {
+ uint8_t vsdb_found; /**< 1 if parsing has found valid AMD VS
+DB */
+ uint8_t freesync_supported; /**< 1 if Freesync is supported */
+ uint16_t amd_vsdb_version; /**< AMD VSDB version */
+ uint16_t min_frame_rate; /**< Maximum frame rate */
+ uint16_t max_frame_rate; /**< Minimum frame rate */
+ uint8_t freesync_mccs_vcp_code; /**< Freesync MCCS VCP code */
+};
+
+/**
+ * Result of sending a CEA chunk
+ */
+struct dmub_cmd_edid_cea_ack {
+ uint16_t offset; /**< offset of the chunk into the CEA block */
+ uint8_t success; /**< 1 if this sending of chunk succeeded */
+ uint8_t pad; /**< padding and for future expansion */
+};
+
+/**
+ * Specify whether the result is an ACK/NACK or the parsing has finished
+ */
+enum dmub_cmd_edid_cea_reply_type {
+ DMUB_CMD__EDID_CEA_AMD_VSDB = 1, /**< VSDB parsing has finished */
+ DMUB_CMD__EDID_CEA_ACK = 2, /**< acknowledges the CEA sending i
+s OK or failing */
+};
+
+/**
+ * Definition of a DMUB_CMD__EDID_CEA command.
+ */
+struct dmub_rb_cmd_edid_cea {
+ struct dmub_cmd_header header; /**< Command header */
+ union dmub_cmd_edid_cea_data {
+ struct dmub_cmd_send_edid_cea input; /**< input to send CEA chun
+ks */
+ struct dmub_cmd_edid_cea_output { /**< output with results */
+ uint8_t type; /**< dmub_cmd_edid_cea_reply_type */
+ union {
+ struct dmub_cmd_edid_cea_amd_vsdb amd_vsdb;
+ struct dmub_cmd_edid_cea_ack ack;
+ };
+ } output; /**< output to retrieve ACK/NACK or VSDB parsing results */
+ } data; /**< Command data */
+
+};
+
/**
* struct dmub_cmd_cable_id_input - Defines the input of DMUB_CMD_GET_USBC_CABLE_ID command.
*/
@@ -7797,6 +7867,12 @@ union dmub_rb_cmd {
* Definition of a DMUB_CMD__DPIA_SET_TPS_NOTIFICATION command.
*/
struct dmub_rb_cmd_set_tps_notification set_tps_notification;
+
+ /**
+ * Definition of a DMUB_CMD__EDID_CEA command.
+ */
+ struct dmub_rb_cmd_edid_cea edid_cea;
+
/**
* Definition of a DMUB_CMD_GET_USBC_CABLE_ID command.
*/

Attachment: signature.asc
Description: PGP signature