Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3133931ybi; Thu, 18 Jul 2019 21:41:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3uuvb2dIx1HCA9GPtR5vtPaTEVlqlMciDFvpa9L/9VPYrGDDS59j5JuuO+1qfi/lGocbv X-Received: by 2002:a17:90a:ad89:: with SMTP id s9mr55877516pjq.41.1563511299516; Thu, 18 Jul 2019 21:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511299; cv=none; d=google.com; s=arc-20160816; b=sU3ZSz8AelzWkU6JYVMsUchx8rhgXNo1aTpLLv7qvbnj3qRwLYzV7vjrw/8EnDii0/ HuPL1eyMsb5pG3sIVzXPEukU3l4fqigs8mycaG/iZy0aJjzxRyuR172PXMOwa2etl4aM 85YMwGVQWqC7wc0p91S5YNLvgaj72oIznwgnFLkYD2Q7LpsupwSO3rh4Avab4nAJ99N3 I+wb+fNi4xqCI43e5WWrrvO3cE3UfGPL7WFtiOFZAvqlKQAGDWyupwglTTrxtg4zhTDy JWexEky6QaHQMbe0utpC0l4FEoDdEm48GNpLB8QYVgmRpMOFPYXEmteYQPir2+wwtWsY KKPA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VhFHEkuvr7Z7gqPwbe5TqYPwC80QPC1KPEWbwZjI5/w=; b=d1ZV9KVPQGHQ1uZWXQknd/7NxKfDOastPNuttWJOwiKbCbHqFBEcbM9HNAwWOHWbG0 gMeaE8fxRZBm4OhbGBnfU2VZDG+AlJm4UzK/W55XBanHlOiSgJ+WVG7XGS+B4P35qiW+ F+Jg0/EomKxa71rmEFO9DWbK4lqOPlUK70YuClfaMpixFbWi5KAH1fWwIVQIayJCevyw M97QAhVaBkmJCaxJhk/5rOzH463SXMe5FGAccd4Mo7hFhhB1oqQy2HiqT76Lo0oIQ/8Y IIn69evizc8m7+sA+h6pqvH7Y2KMtNy8CdYtA/R24X9gphw5vE3n8RXk1Gvc7vxtr/r8 fT1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ClLXNebR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si1807926pgg.28.2019.07.18.21.41.24; Thu, 18 Jul 2019 21:41:39 -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=ClLXNebR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728786AbfGSEkU (ORCPT + 99 others); Fri, 19 Jul 2019 00:40:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbfGSD6H (ORCPT ); Thu, 18 Jul 2019 23:58:07 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA07321850; Fri, 19 Jul 2019 03:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508686; bh=TFKb7L3vrfeNkHgHBmeJyuZQOo0A6mq5LY1Bu6ok2pA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ClLXNebRD8si7efi+sbkNoU/MhvXtk8LPz+BS4zleqyPUueUsPG65AGd9pa/J4L5A dflNJIB23xW9c8lhXA2rHKKvLZs9QGZMrVxcwSxLz6f7Ks1VYbZgRbBuiFaLMOPqxD ctOpXDws3dexDcYlAvPXWXSZLe4FLnKfUT3Lf7I4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Andrzej Hajda , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 033/171] drm/bridge: tc358767: read display_props in get_modes() Date: Thu, 18 Jul 2019 23:54:24 -0400 Message-Id: <20190719035643.14300-33-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen [ 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