From patchwork Tue Mar 19 10:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160557 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3712129jad; Tue, 19 Mar 2019 03:42:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUpEkr9UZ/sLG0G0ESbYMvFzTMl4WwRd8AxdPWF0neqp+QHjXk+Bc4y7hcthBbPN5dQW9m X-Received: by 2002:a62:e411:: with SMTP id r17mr13524627pfh.127.1552992178747; Tue, 19 Mar 2019 03:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552992178; cv=none; d=google.com; s=arc-20160816; b=ESHTo/KKh2R0AmQE0ZGsx4120TswwBqrjX4NFT7bDKfC6iBXOyfZtJ5dEDLcm3PVgp UdnB7/0j9PWOcQxKD+1yyNGensr4zB5idEx9+dAyQynZQ5lW0+MnAffXLTAupLn4FQQW /G87qs9m+pWAJ/EyUOIpXMTsFN1CuhZeO+CNUsOtVOwOmmTDdtZUUt1fHaOlZe4a7OS3 MHGL+wJ4r7FCZbn8GC67FX1F58ETPzT6qomnAsYVJsb7LbtnOipZHA2v1iA2VI4ITZ3M hDm5DvoW3aS32N7oNqBYHCw/ZcvVzSXHFErv+VUjlhnzaLydeuDaw8mDe2S2762xFmlX AIhg== 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=bJ4OUkcSDcFfzXON0LYbow2ttCZ1+yYxadKhc/LTlRTOp9/FoaNr8pRZvBGAJnJeYT ZJ1TVWuNry9UqeuJclIXMTs95djhC4c1UhAJGCoBk41pdJdro1cBgOaSa99uLXYSCva+ lPRq+TlOLmtyawhk82yArb9sheZVi2RwGZqbeuKZuo/L5SqPQ81KwktJRBQ/JWQLYZRM u8LTQT4utNL96u6fB8CzfQfxmPGEhzIzij0kFa5ELb7uJp/i2tx+gLIj6qYD1NMax9NL 7DxosYwCWzxnZ6cV7JHMXOG3DnT8D38ot6lcYoYmKOw+Na089YVhst7DO5MD2n4ufNBN NXjg== 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 l7si12887921plg.320.2019.03.19.03.42.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 03:42:58 -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 77E7F89ACC; Tue, 19 Mar 2019 10:42:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E19489AB9 for ; Tue, 19 Mar 2019 10:42:45 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2JAggdU013745; Tue, 19 Mar 2019 05:42:42 -0500 Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2JAggnk023907 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2019 05:42:42 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 19 Mar 2019 05:42:41 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Tue, 19 Mar 2019 05:42:41 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2JAfxla019091; Tue, 19 Mar 2019 05:42:39 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , , Lucas Stach , Andrey Gusakov , Philipp Zabel , Jyri Sarha , Peter Ujfalusi , Benoit Parrot Subject: [PATCH 17/21] drm/bridge: tc358767: use bridge mode_valid Date: Tue, 19 Mar 2019 12:41:10 +0200 Message-ID: <20190319104114.12077-18-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190319104114.12077-1-tomi.valkeinen@ti.com> References: <20190319104114.12077-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=1552992162; bh=eRDO7BsvS+SWC7QajffwZCvmk91Hw+V09z6Gp9ugOE4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jHnxr7QQvjnUfahK4iWpGkrFAAr/z0/R3sLRAy4xY55ZEfP5RVVuCPyZeOS8BGeOF tZ8oiiJI0kaAycTP7tSUoOjJlypXJOgIfQgaNm56rDL9R7nIUkIZ+7Hfo/Q8qWukc7 4+Fqj1IGufNkJN7C3+Wdc0NlJI36S/6gkZLAZnJM= 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 --- 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,