From patchwork Tue Mar 26 10:31:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 161198 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5039363jan; Tue, 26 Mar 2019 03:33:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGNFY8h5WW+C9QJkHE66dqq1lT/kosjQNDF/GJg7Q1VwwvbLsbtXbBi5PvNRieDo1/WVZT X-Received: by 2002:aa7:83ce:: with SMTP id j14mr1278976pfn.57.1553596417242; Tue, 26 Mar 2019 03:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553596417; cv=none; d=google.com; s=arc-20160816; b=eRkhMllpE3RQnaZMINrjtY6Z4CLq5ThCNEDQpvKi1VUrE+V9IYtwqbzPQfwibSv3qW WlczTLZhcn6B5msrVxYeKSki/eSiY6QHZfRCAYP+e6D9lGXFlR6YsXd6S4AVoX2AiIW8 RvCLzuj0iYGwHLUVck2q5DleuVqkGjp7Qk9hL4Lsae94z9H9ykURZkg3djD2rQcxjqyW db2tEc0pit+A/qiYb3mpE9t/r8FBKNtcU3t5TQU0xdtURu2/pMR6rZo7YzuiaCLBBLmC pNC5sIhVaFFR6sCXaC4dLQgQ88bNylQTSmu5dF5E07/aysC7H3ml8D7blEC+D6JQsOJG TpmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=XdOwPncEar7NpSG2Flb1fihtyQVf6EpFGFB6UlbUKeU=; b=aado4aN3iowQZWqmL5yZyewBaBBstIwpjVhGGfJQfzqEYah1j0YdzHBXr23pRNf6mX PZJNgi1dKUwbWQ7WcfMDwOYHGwuE4hUx86XcChjTE3Oi2CLgT+NDUK48eRWkuyY//oWC 8XZQJ7sksigYsxH9EeXW4bkDvNYR7I3+O0F4zwX8nNvf3LJBeYJkWo1FyL0hyZo7riKD Iv5d9wPq4RmK3rQalEnDHJSYePd9QHn6GwFrNL5k7Zoq5KptjkJWitT/PEtM5u+r343l PlMDopUQ/qNsCCI1kphzx/iznbQWbdiz429V8aMZtFc5grZ1a58PntjGUdHx3R97G/7G UEeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id f191si4524644pgc.570.2019.03.26.03.33.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 03:33:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D18426E7F8; Tue, 26 Mar 2019 10:33:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D7426E7F0 for ; Tue, 26 Mar 2019 10:33:14 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2QAXB2a043954; Tue, 26 Mar 2019 05:33:11 -0500 Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2QAXBOf022340 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 26 Mar 2019 05:33:11 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 26 Mar 2019 05:33:10 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 26 Mar 2019 05:33:10 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x2QAWN2J071249; Tue, 26 Mar 2019 05:33:08 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , , Lucas Stach , Andrey Gusakov , Philipp Zabel , Andrey Smirnov , Jyri Sarha , Peter Ujfalusi , Benoit Parrot Subject: [PATCHv2 17/22] drm/bridge: tc358767: use bridge mode_valid Date: Tue, 26 Mar 2019 12:31:41 +0200 Message-ID: <20190326103146.24795-18-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190326103146.24795-1-tomi.valkeinen@ti.com> References: <20190326103146.24795-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553596391; bh=eRDO7BsvS+SWC7QajffwZCvmk91Hw+V09z6Gp9ugOE4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Qg0vCWZ3jYAXIMlQN8p4ZR0FDgV+oRGsU2dvLFIoyOJbtU/qZuE3LQy9Xw+nO7LQV kJbtCBS0RMPHagwIpybhIiKTiyA4+1UKNA+AtoNvCBtdYnwHEGd7wypRhlgsHTD913 YuGXGXvsj+ue1bCC2qtsdTCI4hdRefEY5jbyJahU= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We have tc_connector_mode_valid() to filter out videomdoes that the tc358767 cannot support. As it is a bridge limitation, change the code to use drm_bridge_funcs's mode_valid instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/tc358767.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ece330c05b9f..9fbda370a4c2 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1140,10 +1140,10 @@ static bool tc_bridge_mode_fixup(struct drm_bridge *bridge, return true; } -static enum drm_mode_status tc_connector_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode) +static enum drm_mode_status tc_mode_valid(struct drm_bridge *bridge, + const struct drm_display_mode *mode) { - struct tc_data *tc = connector_to_tc(connector); + struct tc_data *tc = bridge_to_tc(bridge); u32 req, avail; u32 bits_per_pixel = 24; @@ -1212,7 +1212,6 @@ tc_connector_best_encoder(struct drm_connector *connector) static const struct drm_connector_helper_funcs tc_connector_helper_funcs = { .get_modes = tc_connector_get_modes, - .mode_valid = tc_connector_mode_valid, .best_encoder = tc_connector_best_encoder, }; @@ -1255,6 +1254,7 @@ static int tc_bridge_attach(struct drm_bridge *bridge) static const struct drm_bridge_funcs tc_bridge_funcs = { .attach = tc_bridge_attach, + .mode_valid = tc_mode_valid, .mode_set = tc_bridge_mode_set, .pre_enable = tc_bridge_pre_enable, .enable = tc_bridge_enable,