From patchwork Sun Aug 4 20:16:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11074859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A661617E5 for ; Sun, 4 Aug 2019 20:17:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 981A8287A0 for ; Sun, 4 Aug 2019 20:17:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 896C7287E2; Sun, 4 Aug 2019 20:17:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E93F28827 for ; Sun, 4 Aug 2019 20:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfHDURD (ORCPT ); Sun, 4 Aug 2019 16:17:03 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46078 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbfHDURD (ORCPT ); Sun, 4 Aug 2019 16:17:03 -0400 Received: by mail-lf1-f66.google.com with SMTP id u10so17589880lfm.12; Sun, 04 Aug 2019 13:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XKQ+KJdp8Wv4Lgd7meexm5skjc2BjgchimNFn7JqqdA=; b=EMDl7m7xtcbiDX6T4zT9T9Oup48SB92u6hjZvbuUDysrvQ2LKT045bww+uGPRJ/wGS Xx9dvfCti+h8c3UbT9/vPUIBcFzKt/YnuegL1QMuENQBV1IDlbyEjCcBPVarMC4LPjqX 2wJ/ko+exxrT8tGNbUyBXLEa3NdBap2PBiUUsZszcYc1q4mfZqrxZ1V3oXBda0LvlPu1 nAk6RBnwnq/4JPkevOBldmHhgFYKce/qePV0wDsZ4RcHAs8Kx/0/yWesR12likoYCkG7 qN1LiIhpYBG1MXL6JIwlhuDKzdtU9xdeprPv16WXN39mw2pQ6uz/KDJoZ0lPydP2x26B eZMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XKQ+KJdp8Wv4Lgd7meexm5skjc2BjgchimNFn7JqqdA=; b=JJC1+G7SHWkIgtYaDNu+ORoXr+6fSbPhAZ1uajPgWJaxMugHAYrmo7ru79Gz5yUejl mIqQbAsV9NddA4cikmgxEu5k0iwQlVJhU0lvJtp1Hd612VLvsXsVOSXHpHgxsmbY9UBg RRiES3cGralzk/WAakVK41At9+yDlVtAi6hhObkTfPvI3OscX1wtV8Nj/GKtdnvQFdi2 +eSXZ1sqgcNU56dgcPTKb/BWr5gR3uRbh3CwHzWsrd1J+7KkdCsxpTsECyV/39bPeoSu PL1fVIO9BEYG6VccLIa390nIXyfYxpSEUyK0bg/OmfGzl3QCdt985jyoUDmUA883wR0V Mkew== X-Gm-Message-State: APjAAAW3vZI/94BE12xao6eNcyzmNohytCx8GORI8/jY2im/Riz7i3jc fIJLBwODYLbFybslKBAI8WA= X-Google-Smtp-Source: APXvYqyao7EZANem5EL9cjm0IVmoUZr8fWYB9FLYhw/F/m5O3hktZo8Fs57Jvrx6gfI76gcjrnUKZw== X-Received: by 2002:a19:c711:: with SMTP id x17mr69469503lff.147.1564949821600; Sun, 04 Aug 2019 13:17:01 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id p87sm16540794ljp.50.2019.08.04.13.16.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 13:17:01 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Thierry Reding Cc: Alexios Zavras , Alison Wang , Allison Randal , Andrzej Hajda , Benjamin Gaignard , Daniel Vetter , David Airlie , Enrico Weigelt , Fabio Estevam , Gwan-gyeong Mun , Inki Dae , Jernej Skrabec , Jonas Karlman , Jonathan Hunter , Joonyoung Shim , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Laurent Pinchart , Laurent Pinchart , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Maarten Lankhorst , Marek Vasut , Maxime Ripard , Neil Armstrong , NXP Linux Team , Pengutronix Kernel Team , Philipp Zabel , Sam Ravnborg , Sascha Hauer , Sean Paul , Seung-Woo Kim , Shawn Guo , Stefan Agner , Thomas Gleixner , Vincent Abriou Subject: [PATCH v1 01/16] drm/bridge: tc358767: fix opencoded use of drm_panel_* Date: Sun, 4 Aug 2019 22:16:22 +0200 Message-Id: <20190804201637.1240-2-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190804201637.1240-1-sam@ravnborg.org> References: <20190804201637.1240-1-sam@ravnborg.org> MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace open coded version with call to drm_panel_get_modes(). Signed-off-by: Sam Ravnborg Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Reviewed-by: Philipp Zabel --- drivers/gpu/drm/bridge/tc358767.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 42f03a985ac0..cebc8e620820 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1312,7 +1312,7 @@ 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 count; int ret; ret = tc_get_display_props(tc); @@ -1321,11 +1321,9 @@ static int tc_connector_get_modes(struct drm_connector *connector) return 0; } - if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) { - count = tc->panel->funcs->get_modes(tc->panel); - if (count > 0) - return count; - } + count = drm_panel_get_modes(tc->panel); + if (count > 0) + return count; edid = drm_get_edid(connector, &tc->aux.ddc);