Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3809413ybi; Mon, 29 Jul 2019 13:03:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqznxrAyXsLL1Vh1vDAYo/uQtGwPcFCp+yhMpwzgGU0a8ry9Ve6ctIGorqmUrAUCMGzgZfDz X-Received: by 2002:a62:1616:: with SMTP id 22mr38997020pfw.120.1564430629994; Mon, 29 Jul 2019 13:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430629; cv=none; d=google.com; s=arc-20160816; b=njPwocier9ngCICqWoL6e0oOXEsrFZfZvgKTs0fCHWx50rIgvfziSWa7Y/iTsZ0kpn /IeVo21F77wX0d810Pq+gElMmIg4UuYT7/J23XL8qNMrBMxNRFjDD292FuslwPnejTTs 3FIc/C6MsE5Wc5pMEOTeFsosNvb0pDGkkbmqWyqrWARWgjRFgJX5nVfLOeXJJmPlGnsF XdtjELU0BUFzVf/qBtVf4vS/ys9ywvJ30jRykNVWW4wO0bvqcosHySuuDOwTekMbTGrl wFMPTLK8OfEajNH+mTbqBY3/s4UuROeyXAVfmIOv8XQmQhgTU3WbRj0wvccOcyFg6Yxq baOA== 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=MQVbWFCKRJb1VYIp3Ub3NlG9YZnO8MbfQfBwvWN83L0=; b=EVR6vUCQcee64qAQJPYX1sAEoupF7Zj35pFBXvsE99VdwLsofyGd8ZFB5HrFGbz6fe tRyG3pUtsRYhmSkn83Vx8aT/1d5zKYDJXQ4jur4nyEsZUVR9P4YWCvGjOorcjgZrKIBM 2RRovFhV+eNbIWhxVvXy6d+WbXUybXwYeLEnV5mo9YqA76vWk6apoEYYzZ/h7jbO/AXz KYo9n29syEa13ttczJ5WzCYuiDtJjWrAhRWboq5x1hHY13uBSYc4HfgzXBDnWB1ZVXLf IDU135cIlPCcqVGsYZe4FHhOSCey6gaKqJ2/2lsgj2QaILqviqM2unswl6nrnFRZC21h aUqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H4Y6j2Xx; 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 e1si24231510plt.276.2019.07.29.13.03.35; Mon, 29 Jul 2019 13:03:49 -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=H4Y6j2Xx; 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 S2390429AbfG2Tsr (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390422AbfG2Tsn (ORCPT ); Mon, 29 Jul 2019 15:48:43 -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 C50932054F; Mon, 29 Jul 2019 19:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429722; bh=kmaBY2dSCDGI0h4yZEVJbMGEAJASyHHrcCdpv1ArV0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H4Y6j2XxZURQeWQEygBIT0M6EnbQtDXb0JQGYuMGPWsRuxrxT+BbuCNmB9y0ue9Wx u3VJ7QvLiwvJ9j/uSlxDgDpF52Gnbz7Pa9Ei3eZ/J0TY8+DsWgrt6lg4verPutOeJk 6VSz/AKn9c5U5LtC5X7O/e7exzQERe08ZUfHq+jg= 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 5.2 035/215] drm/bridge: tc358767: read display_props in get_modes() Date: Mon, 29 Jul 2019 21:20:31 +0200 Message-Id: <20190729190746.409416708@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 4655bb1eb88f..f59a51e19dab 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1141,6 +1141,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