Skip to content

Commit 6fc547a

Browse files
committed
drm/amd/display: Properly handle additional cases where DCN is not supported
There could be boards with DCN listed in IP discovery, but no display hardware actually wired up. In this case the vbios display table will not be populated. Detect this case and skip loading DM when we detect it. v2: Mark DCN as harvested as well so other display checks elsewhere in the driver are handled properly. Cc: Aurabindo Pillai <[email protected]> Reviewed-by: Aurabindo Pillai <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ac71700 commit 6fc547a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,6 +4501,17 @@ DEVICE_ATTR_WO(s3_debug);
45014501
static int dm_early_init(void *handle)
45024502
{
45034503
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
4504+
struct amdgpu_mode_info *mode_info = &adev->mode_info;
4505+
struct atom_context *ctx = mode_info->atom_context;
4506+
int index = GetIndexIntoMasterTable(DATA, Object_Header);
4507+
u16 data_offset;
4508+
4509+
/* if there is no object header, skip DM */
4510+
if (!amdgpu_atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) {
4511+
adev->harvest_ip_mask |= AMD_HARVEST_IP_DMU_MASK;
4512+
dev_info(adev->dev, "No object header, skipping DM\n");
4513+
return -ENOENT;
4514+
}
45044515

45054516
switch (adev->asic_type) {
45064517
#if defined(CONFIG_DRM_AMD_DC_SI)

0 commit comments

Comments
 (0)