Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3789466ybi; Mon, 29 Jul 2019 12:39:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCJZEiZQagUboSmv9Sx+W0DpkI6hKTm+z1VFit1BfoITnC1ibL/ND0DvBbxg+plDEh0GMy X-Received: by 2002:a63:1765:: with SMTP id 37mr37072660pgx.447.1564429173373; Mon, 29 Jul 2019 12:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429173; cv=none; d=google.com; s=arc-20160816; b=A0ueVAa+v2eYYrCCuEX4cJbn3zVshHa+lp4gA7A+AUYYVxOSTSgmzv7u8sZTkRI4j4 iQqO4DsvaYXMgw4dekVMbYiVF1HepksSw9LKsx+bJ4DS7n/rw6/jGfS2wFsg+G81Dygz CPTCvypsnQQzr5OHD8S9TbcmEvvbB8cS673jdvEHSmz8J8MDdbH6/Sbs9jAsIJIai01J HjGwpfjfklTBmCbIuNydacYHXJ4vN9opARJFgJ5E0lV+592EvXycQgeF5QgHRZD3zWC6 LK9OzodXgr2AJhjz2IDnjYCCd90q/Zn8Tsd6BZzlKayHokAYbbeNYjg5KSci/MHex5eY 3ugg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0tSnYR3A3gUP0KEhVcpKkKWEghutBpXGQKc6Zbnx1DM=; b=l0Er19drla4A6XmQjp6eqW0G9KjGszeCuN3sANlfim2h+wkgCJQxvpMcwR/WXZZNdV n/JRLYceLhQzr1DuhMg0Ael4uu7UxYoqJ1CTs3A1TgfL0qAGQ0lRaINLcHNfD6UoXqqY JrmCiN0e0GnwbZnNEC8SRex8VcvjuhJwQk+TWKNrmXoBbk+9PhD7Iis+aER61cAXGoiY ZNZGaw2Hb+w6g05Zm/w9yw4Hr+oqYVo6eKjUTbwBcZUpgq3/iNLc/gCJWQDjPM8BKdGG LpeK0G9DwE7xw6taxozjZB1anKP3mzTdjkZmdYlzMKYtNocqRllFW21u1C3uDqVviudu mQEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YD5IWqkr; 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 cp2si27451902plb.437.2019.07.29.12.39.18; Mon, 29 Jul 2019 12:39:33 -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=YD5IWqkr; 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 S2388445AbfG2Tgw (ORCPT + 99 others); Mon, 29 Jul 2019 15:36:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:51296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387811AbfG2Tgu (ORCPT ); Mon, 29 Jul 2019 15:36:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 9238821773; Mon, 29 Jul 2019 19:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429010; bh=OVOKJyv6QtcV37+WUdXfe4juPmtnXSGZ4gM307qlKR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YD5IWqkr1s4MVMXVy51M1CLAMeQopOmndK2BR2K+dGXlymFP2AXpcQ6462qWlPUAt plTOoQhZ0enGzxAwCwul3Y3Gbpd0oSGUSA53VvFkFPKVUU/VdTubJyJT8XZibNPDIG qDWtt6HabWZDXbX7A6L+hYdWhT1AD1PAw2qAlvjg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Andrzej Hajda , Sasha Levin Subject: [PATCH 4.14 229/293] drm/bridge: tc358767: read display_props in get_modes() Date: Mon, 29 Jul 2019 21:22:00 +0200 Message-Id: <20190729190842.028671075@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 3231573065ad4f4ecc5c9147b24f29f846dc0c2f ] We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props() in the beginning of tc_connector_get_modes(). Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-22-tomi.valkeinen@ti.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/tc358767.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 6eebd8ad0c52..9705ca197b90 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1147,6 +1147,13 @@ static int tc_connector_get_modes(struct drm_connector *connector) struct tc_data *tc = connector_to_tc(connector); struct edid *edid; unsigned int count; + int ret; + + ret = tc_get_display_props(tc); + if (ret < 0) { + dev_err(tc->dev, "failed to read display props: %d\n", ret); + return 0; + } if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) { count = tc->panel->funcs->get_modes(tc->panel); -- 2.20.1