Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1188758ybi; Fri, 2 Aug 2019 10:48:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaEO44ZxvpoxE6Z0heTp477SPOOSr2Ho1gsas/dosZBlsMNkiO44WwyxwkfCyZFxOCdv67 X-Received: by 2002:a65:63c4:: with SMTP id n4mr123902107pgv.44.1564768093242; Fri, 02 Aug 2019 10:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564768093; cv=none; d=google.com; s=arc-20160816; b=pxs4R1MDBAUvfqRkuJRSMAK7yG1ghh9m8s1Nz+G9tLBO1KC0+qscFn4vBThMCj+Taa lynZlsxrOQX3ugasUucSPEZq4ZFsXTzZX+RcsT/YhoubeGo7DVVvKhwf9JdJ1DTaOgkW HAm4w4xhQpyduiPP2FExUwyffqJaWFzsQvD2tP0GNks62kWVP+DszKNwkjcLz895uoZi ojgrpMefKNtMAtg4hdrww7/1RVbdQg+5NSRizMK/RyM95Tqo6L7Ct6Fs1Q1I77+Bimpc 8gNOqkFA/RcNIyfv0cBooi+Qw/Fbm4dmw8CO6pVieYT6L4bJ4KcplrLkoDMUI9+FspT+ EHvQ== 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=gUHE20vgYau9jerGVUfXw1uQkB6tpgi4G065FXSFgCQ=; b=yctrCf8cCKa33Hm+fMsD+l22UCcapA2YcAP5rCvqE/wH2pFA+zutS579xbLyMq8/UV D2/Ryjw9d2sR9XHf/FsYlzNOF2YlZ6QL9JBV8ymjv1Fu2OJY3sxv26yVhQR8snyZXp8u gMmwdjiFTqjwKiGxk7Z0NOTrEk5gnKszPi1wA+06tMGcby0VSIo5ar5CUf7dD01TJyyK kBJBkCfQF2eFR0TtfIPrrmZJ6VUZL1AafZE4T1AY07FgSidP7maUJkuNJuTpPtkH0vnk aYv0EgWy4B83hMrvzm/Ra4eB3zdbeih2c4aCY50XTkSFrIx4nVpx5QnWmclEVLVwrnOi roTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sFf5zQb9; 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 33si38948509pla.44.2019.08.02.10.47.57; Fri, 02 Aug 2019 10:48:13 -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=sFf5zQb9; 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 S2405969AbfHBJtO (ORCPT + 99 others); Fri, 2 Aug 2019 05:49:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:54020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405831AbfHBJsg (ORCPT ); Fri, 2 Aug 2019 05:48:36 -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 056FE206A2; Fri, 2 Aug 2019 09:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564739315; bh=kloS8dWPjjHpT26GjxbcGPstQz99iXmU91eP0LAEW+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sFf5zQb9Etdi/MpT4eeqSNtZKzdfztHe2ztnqVMiPY4KIM1IGNNyfps7DuBHXV7Fv ZCt1yjDwT6yFiNxIT00HNeRGUghpb20EodUhU/tqixagWUW1CnTF7wypty+U5+sbeU ZsMJuG/ja1wPWgTFcdhpOLsGfEAYQmJ3Y5KLpNbA= 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.9 164/223] drm/bridge: tc358767: read display_props in get_modes() Date: Fri, 2 Aug 2019 11:36:29 +0200 Message-Id: <20190802092248.740167989@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@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 fa3f2f039a74..80993a8734e0 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1153,6 +1153,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