From patchwork Fri May 3 12:29:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 163317 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp547025ill; Fri, 3 May 2019 05:31:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWlnmVAuojw7YDqVfbxmCNcr3iiLiQozN1XrhRy1Z9/GoD5K69DaB1Wp42wPTn55MbgIAq X-Received: by 2002:aa7:93a7:: with SMTP id x7mr10437972pff.196.1556886690218; Fri, 03 May 2019 05:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556886690; cv=none; d=google.com; s=arc-20160816; b=yiSrStcPVGG2yAxbMXoqRhGdp6ILtCes4EMCcQ3+st9Lz9VvTc6+ll3wh0yc04O/vh d/7PM7OsiktTX35H4YWT/drc5/UrsvxYB/sihDwyHPoTyhFO9Eoz+bpzVYyBIMUyHnEM t63JgAgfoUJxFCQHKxuxuzc4yveuUnYMkLnHjc2hzFM6jL7ufY5n78e59c3hXeYCXGSC ImhrL6T+00gCzbUXAmFWseIidOppiS7Q/cGlQFkvyzNgHB22FxTJnc/ZIC7yT2ThCOpH Di0DbfvRQyw2H6og82+EsacO2aLN/jWKlwNBwudwJY0gnUi4TxpOk3cc4ZMQWFo0rm/7 bD0w== 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=dEnZ0bOkj9BirdI7MYnGV6pcWPoQmv/XFBErwMtM3M0=; b=xf1IyUy/As4sXI+av5S/IYnEQxGr+EEo7ogPDixaq14kvT2cZ5OGeqEechYw81pghr vd18PuLghrDm2Yua/pgFYvMHExktMnn704lO1fUmzAuuli3OdVhQRX9qODlJKpJIvflX 2RG/PGj+akjXfnq4JQJctNmph6uMsxZLtPO/vo8oEt226Ht+i8oQT2yn1RPFAJAclgtg neGtKUECqFj5ngtoO2xMydKHF78eKT+QspGiivPA/xQx/K9pMQJzPgxoGKJc6Tileadq dWaJti6mFkdAiathu2hx9SJWG9CUJsAAj32ff2GWoVOAYZBuxM720Idwu/3AUN6lnO/v MY8g== 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 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id q86si2041008pfi.197.2019.05.03.05.31.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2019 05:31:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 2004089F35; Fri, 3 May 2019 12:31:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id C915D89F31 for ; Fri, 3 May 2019 12:31:27 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x43CVPs9017408; Fri, 3 May 2019 07:31:25 -0500 Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x43CVOLq122183 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 May 2019 07:31:24 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 3 May 2019 07:31:23 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) 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; Fri, 3 May 2019 07:31:23 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x43CUYu2002029; Fri, 3 May 2019 07:31:21 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , Lucas Stach , Andrey Gusakov , Philipp Zabel , Andrey Smirnov , Peter Ujfalusi , Jyri Sarha , Benoit Parrot , Subject: [PATCHv3 18/23] drm/bridge: tc358767: use bridge mode_valid Date: Fri, 3 May 2019 15:29:44 +0300 Message-ID: <20190503122949.12266-19-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190503122949.12266-1-tomi.valkeinen@ti.com> References: <20190503122949.12266-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=1556886685; bh=zj8Fi4Y2vpeyzsQ3IvOFyXwcjt2ofoSu2anFZdJE7cg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rZSRUJoGn4aI3VClkM55fUrga6+TfRZCKnmWLI71VoSzrK64L8xkH03lwwYLmy5AR bACM0ZFVGg569kbWEQ9I2Qhtjuplqodaxrm/EDH7G4J8LDrUG57C6Oo4QZ6u34zB6S 2hd8UAMXt7jw/Cl4mGzklM/6cAE8tYTjYseEUaZs= 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 81e12f17b162..f39528dbde22 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1154,10 +1154,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; @@ -1226,7 +1226,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, }; @@ -1269,6 +1268,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,