Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2235098imm; Mon, 28 May 2018 04:29:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpBredQ8gs/8ZfI9nSdeL+SR1gaTafzNcNqpLSwtoa0CLcMHqLdQmw+eNiwzkfrvvS50Y94 X-Received: by 2002:a65:644f:: with SMTP id s15-v6mr10314313pgv.228.1527506959990; Mon, 28 May 2018 04:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527506959; cv=none; d=google.com; s=arc-20160816; b=S0XxB9WB547JctJw+6xNx/BSjQeR0uGvS43JS0S9VMb5eN+RCa6d8wMKAv5cnuNfh2 P5ka5HQ1dN3ijW36Ks/ExIyzrR0nG5G10hvs9EUXKsSt83TgxPkh8UvC15ERnszaEXbo /peevAmT+/pffVyuoG204TIpy2FFpzBtDKL4u4q3JICWoPLAPYqH3gX1txLGc4r4lryV U/v2cF6d5NxIGKuTY/4wJCdXpXQlOShUqYBXXr6pysqOaC7lNy83OJ1Z13fduHj6YL4g tJxAXFWCAQRTSvqiAT+EHgi1L2smKFs/eIqmB6fgYIp8VoKu+bJAZgR7n9Dx7a8sx9Zh Md1w== 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:dkim-signature :arc-authentication-results; bh=rWYJpC9SgFxItKYALB1XOH/stQO15HgQfW+wOYcEZ+M=; b=pdr1dKtbJcGGjNwsiFkWiPc8sel+FofY4KuaxatWUVXrI0pLC31E7AC8rUCtSCbtvw 5SJKr2Q7PDmTPYgRQrdM9c1f9taHbWSG19tXLJZHcw+5UJHJsh/KFO7thsQL60lfSu7f zc/FKdgE9Xx200pws7I5J9W0+ozJngdItmL2fYXj7BvC/Y4iYnod2lQ1Bsvhk0CCfCBe 3PY+oHiLg6mgXgRKBzeLAiMLcjEKM4Ja6fYFtnhOdHYiDV6EEtNfbbvacvZXiY0nLi7W TnGixGLMvSSzUIVzPs/2rjrcr30CmZzGgX2elA3yZm1cG71mDx50k0nUynEFNa0rsQ5A pk2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0HNYG3OO; 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 e9-v6si30082488pln.72.2018.05.28.04.29.05; Mon, 28 May 2018 04:29:19 -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; dkim=pass header.i=@kernel.org header.s=default header.b=0HNYG3OO; 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 S938219AbeE1L1R (ORCPT + 99 others); Mon, 28 May 2018 07:27:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424474AbeE1LPK (ORCPT ); Mon, 28 May 2018 07:15:10 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F24F206B7; Mon, 28 May 2018 11:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527506110; bh=c/QUUkyD9D++fW6viiRdHLnSnqvFB6FFpNt2NwW8x+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0HNYG3OOPCgR6ZBrP+s+MxJ+7LXik0F1pMPgKWc54BoIL4O6tPEI3B03qwuiAKPM1 eatCMeu/U+Fxu5lhK7hYhf45YzvGH9ZUcAcv4DrCZP8lDaBL5SyENE9jk6Cx/02+/2 Bo7UMxK2pL9+TfzVLM35k8cre0lU50uom57MN0IE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tao , Tony Cheng , Harry Wentland , Alex Deucher , Sasha Levin Subject: [PATCH 4.16 244/272] drm/amd/display: Set vsc pack revision when DPCD revision is >= 1.2 Date: Mon, 28 May 2018 12:04:37 +0200 Message-Id: <20180528100300.807929884@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100240.256525891@linuxfoundation.org> References: <20180528100240.256525891@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tao [ Upstream commit 3b94a4007dcfd4ac5780cd3d8a2d99979c966073 ] Brightness couldn't change when booting up in DC mode. It was because "psr_enabled" flag was not set to true before setting vsc packet revision, causing packet rev setup was skipped. Now instead of checking the psr flag, it checks if the DPCD_REV >= 1.2 and set the vsc packet revision. Signed-off-by: Tao Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -35,6 +35,7 @@ #include "core_types.h" #include "set_mode_types.h" #include "virtual/virtual_stream_encoder.h" +#include "dpcd_defs.h" #include "dce80/dce80_resource.h" #include "dce100/dce100_resource.h" @@ -2428,7 +2429,8 @@ static void set_vsc_info_packet( unsigned int vscPacketRevision = 0; unsigned int i; - if (stream->sink->link->psr_enabled) { + /*VSC packet set to 2 when DP revision >= 1.2*/ + if (stream->sink->link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_12) { vscPacketRevision = 2; }