Received: by 10.213.65.68 with SMTP id h4csp420151imn; Tue, 13 Mar 2018 08:30:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELudWyaWeacbJPf4N+XtX3qRYQKVnTcISKOcYvHHThEgfEd2YOpgPb3IP1lk98bhEOcWJbiu X-Received: by 2002:a17:902:5303:: with SMTP id b3-v6mr929935pli.19.1520955031325; Tue, 13 Mar 2018 08:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520955031; cv=none; d=google.com; s=arc-20160816; b=d57K1fC/q8t9xk849InYdr0xYH1sQkSwd1UEg/QPGmpAvY+ZRpWoQCfoLZUV7F4EX3 eueD8S2xClWe1vk1DjQMcl5hXMozKJ7J8eFyXYsBjiodyDHT/HJnae8yQplDN/c27LSd +AqXmA2mNrM3cBzsbDVEupYj36loAH8sS8wcSiWLYpMMhheQtx2rPEc2a80zqAoEGoht GfytJ7hMaK/4cOEkZo9vHvcVY1t8OH4mSLe3l8X2CxZVUTDhZ1o8QiqDhHuCG+qkqNmK v0GNj3CBL8VhW7I5lWvUy18UAGZVfQg8d48Q9H6CSeyE4pMqRbUkbcJzL/F4k2RkTfFU ILuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=R5HgvYStK97cq6mt11JgmlWUK1jqByRrqlw3s7XYy3E=; b=atPMy7nhgOrLDxreBEEGGW/bqgU/pWL+yH6bYxJ5pLpsPl3uELLAOzHAQhSSaPNYhM KKUgBlAnAY4lg9KjSBoiqA7UO7W41JuQ3rpJU5kT46Ko7wzEFY/YG+JozY28xY2KgM+1 /LHwOxtMPcKmB58PdwYXKnykI7bpVsGZWP/ljscFU8H/V2QeJDIS2Zt9WMl/Cbjiof/M uEvPN8jZJNGYCRh2TM5/kwCMPB0ZJlUKmQAeqRobQUDo/XfA5R3NXwN4RV4h5gy+nIqx qCn4Mv9lDUfGKrEaJ3yDsaoyas1uoO0J0+JCq0r7ifedKzPf87vq5j1S6u7nBGKvVpbU Leag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22si288060pfm.357.2018.03.13.08.30.16; Tue, 13 Mar 2018 08:30:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbeCMP26 (ORCPT + 99 others); Tue, 13 Mar 2018 11:28:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58194 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbeCMP2y (ORCPT ); Tue, 13 Mar 2018 11:28:54 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B7D26D27; Tue, 13 Mar 2018 15:28:53 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Harry Wentland , Roman Li , Tony Cheng , Alex Deucher Subject: [PATCH 4.15 032/146] drm/amd/display: Default HDMI6G support to true. Log VBIOS table error. Date: Tue, 13 Mar 2018 16:23:19 +0100 Message-Id: <20180313152323.002850685@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Harry Wentland commit caf0a9030d75509f3cacefe466d6d69d26e3dee6 upstream. There have been many reports of Ellesmere and Baffin systems not being able to drive HDMI 4k60 due to the fact that we check the HDMI_6GB_EN bit from VBIOS table. Windows seems to not have this issue. On some systems we fail to the encoder cap info from VBIOS. In that case we should default to enabling HDMI6G support. This was tested by dwagner on https://bugs.freedesktop.org/show_bug.cgi?id=102820 Signed-off-by: Harry Wentland Reviewed-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -683,6 +683,7 @@ void dce110_link_encoder_construct( { struct bp_encoder_cap_info bp_cap_info = {0}; const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs; + enum bp_result result = BP_RESULT_OK; enc110->base.funcs = &dce110_lnk_enc_funcs; enc110->base.ctx = init_data->ctx; @@ -757,15 +758,24 @@ void dce110_link_encoder_construct( enc110->base.preferred_engine = ENGINE_ID_UNKNOWN; } + /* default to one to mirror Windows behavior */ + enc110->base.features.flags.bits.HDMI_6GB_EN = 1; + + result = bp_funcs->get_encoder_cap_info(enc110->base.ctx->dc_bios, + enc110->base.id, &bp_cap_info); + /* Override features with DCE-specific values */ - if (BP_RESULT_OK == bp_funcs->get_encoder_cap_info( - enc110->base.ctx->dc_bios, enc110->base.id, - &bp_cap_info)) { + if (BP_RESULT_OK == result) { enc110->base.features.flags.bits.IS_HBR2_CAPABLE = bp_cap_info.DP_HBR2_EN; enc110->base.features.flags.bits.IS_HBR3_CAPABLE = bp_cap_info.DP_HBR3_EN; enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN; + } else { + dm_logger_write(enc110->base.ctx->logger, LOG_WARNING, + "%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n", + __func__, + result); } }