Message ID | 20180516101510.13215-26-peda@axentia.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6D59B60247 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 17 May 2018 07:17:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 539E728731 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 17 May 2018 07:17:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45E5D28791; Thu, 17 May 2018 07:17:56 +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=-5.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 941B428731 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 17 May 2018 07:17:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7833F6E63F; Thu, 17 May 2018 07:16:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0097.outbound.protection.outlook.com [104.47.2.97]) by gabe.freedesktop.org (Postfix) with ESMTPS id C39C66E3B4; Wed, 16 May 2018 10:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentia.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ThU+XKfLpARDAksGVFlK7fOZaHeOXTn/iuDA+60MBQ=; b=ZzNvnK3wnp/KOmPBIJxBuriGzc412m30pCrd9qsCgsbeGUo/ginJJtytoMThZ2jKcjOPU1vgP+XEbIiXjh/9aTFkYxXNZugF2GhTbBeTwo4T73/cvBSEQoFvGRWCLNNfUxNA5nfknrt3D2t6cAEKBbSXeo1EoY5mFoDvn0nbsLo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Received: from orc.pedanet (85.226.244.23) by AM4PR0202MB2772.eurprd02.prod.outlook.com (2603:10a6:200:8c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.11; Wed, 16 May 2018 10:16:47 +0000 From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Subject: [PATCH v3 25/26] drm/bridge: require the owner .odev to be filled in on drm_bridge_add/attach Date: Wed, 16 May 2018 12:15:09 +0200 Message-Id: <20180516101510.13215-26-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180516101510.13215-1-peda@axentia.se> References: <20180516101510.13215-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: HE1PR0102CA0013.eurprd01.prod.exchangelabs.com (2603:10a6:7:14::26) To AM4PR0202MB2772.eurprd02.prod.outlook.com (2603:10a6:200:8c::22) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:AM4PR0202MB2772; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 3:a+nKViyBCNdbfLARgrkxPoaIUsBDKj9V5CIPBPCiueDjHFcDfZNo2vs7fMHcEiQ5CyC9IOKZPoOVsbdCR2Uh8jl7p7e7JocP4q5X2sX/pC55J7ladRk5SWjmZaTmSobbDE0+5vzPXBrwxvp8EWJTn6S8+H2i8SWU98JMHDWDVnQmdA4eHAPPArEElDFv/S58jYzX28n2BFFxChFOAbpZ1R11AID1BLLHL2Re7BqU0HuwIkQbrPT3oOfSKWAAC2KS; 25:gbLMoN+oy2DGQNFnWaJySE/kjiHe136geaHZiz+8gNDHwLoKu2BY9lPf5C8bay9tZYTehpXd6fJIbzTbBCB1PADJRtrVUwIxhLJIjl+ZLLE78Zk/AzUR4mEsk9x1x6yA110XIdzPRYGjBtVCQ67ZaxCDhP+pX8NjEA/u0IzAZnSyqyC5ZPDJAjoOhsgOIYscOzinSP+R9Kv+VaZeuV76ZQO37of56fhTAHh4XikfZueej2/yPZ2Cixzmii34WGlcIXImcXTYuqIaKJRIvORLLPDfJIm48ug/8P68CmchM1rdv9pSJ8wEnVha11Wt89SW9QUT5/KhaYBvUWo77MiKUg==; 31:Cj2BrLGwNuLxFucDvzga/K3sp3OZScfIuBkp/QoCJBIcN5KRmGnPI5lxm0Sbs/uf4JDRARQny4xcZFIgokqTecBqNewD6FaMdmXjYrGjk4O8IgD3pqHNpqISBnLxRrlgE6hojxexR7i4FcAuHW27cWEzcsc0GfRFYbQgfih3bn2QHvhNkSSbBDybsehhwtS1Qa0BjiMsgeDgqEwY6/zaxJL8RbIJzfyKYhHgFZyxYzI= X-MS-TrafficTypeDiagnostic: AM4PR0202MB2772: X-Microsoft-Antispam-PRVS: <AM4PR0202MB27729A6CBAFE75DBBD8DE77CBC920@AM4PR0202MB2772.eurprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(7411616537696); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(6043046)(201708071742011); SRVR:AM4PR0202MB2772; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0202MB2772; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 4:bg4rxIQ4bRdctY1Q6Xj9cRVHMx5svWh9hQ2+nwR6NoRgSBy4hsU50Rl6tTpbk8liUvlhYdgKwoEUwmCG5uPrNP0BvYQhMdxEQuCNzQ7FiVrZLvtcd8AEPl6eHJxM9gUZwzSpgvmN+TMFH8jNnBznHMkK82Ul0p7LpnO72tjXH4eVM7oqyl77DF1SKyBC7r4itgvnkJB1MfkWrTItxzR4LDRPk1/JYGDFrPbMwGs2kJtuWke3pvOJI33vyR+Eb2gASlxIIFNN+cDYIXc0bSELKW4T+bF1QzDQF6EFK0XDTjfwa+gz3Fo19Ke762q4iyNz X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(346002)(376002)(39840400004)(366004)(189003)(199004)(86362001)(7416002)(25786009)(48376002)(50466002)(68736007)(36756003)(2906002)(105586002)(97736004)(6666003)(6916009)(74482002)(7406005)(2351001)(3846002)(6116002)(1076002)(478600001)(106356001)(316002)(16586007)(2361001)(7736002)(50226002)(53936002)(6512007)(305945005)(51416003)(8936002)(52116002)(8676002)(16526019)(76176011)(446003)(66066001)(5660300001)(39060400002)(5890100001)(54906003)(47776003)(81156014)(476003)(2616005)(956004)(81166006)(186003)(386003)(6506007)(26005)(59450400001)(4326008)(11346002)(486006)(6486002)(142923001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR0202MB2772; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics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wXHN7DEGaab093x2gv6/nTyFaRp+xx8N?= =?us-ascii?Q?GqqDkEwYykNXXtaXEZkfTlokcWjHDd9CR+bH3oDLp3eVEihLIhUH5wS615wX?= =?us-ascii?Q?GwjdaCS0PUkFhgH2vXQDxmbwXe8Y0klAmoMgRlYhpvxuM7m0yKU+29Q3zSUH?= =?us-ascii?Q?AIzJ23kXE/BP86l9kliyuePu8bNtpPLHsr67n4D37riPmI15JNmx2rCRcDnr?= =?us-ascii?Q?OlrsvY/GSNFpFAsC50KDBB28ycRPg2+TGX47lRQCFVeS32fzsgd1rKgzQUre?= =?us-ascii?Q?ttYTCQONnOzzhs51t+ua7D0mbyjh5+HFW4EZyFTdCfPmDdqX/rUASCqrh/hB?= =?us-ascii?Q?NMu5RU2bB/ai8y5qJ6Z1a0NwZtrvZJSP6fZEOg3YIzx2xmBf8KI+3KLWyE5i?= =?us-ascii?Q?dLVUEXvgOex6mbGLnTesLYYtduf52zkQab5/xojNXUTpcqniMMltiCnezTqH?= =?us-ascii?Q?hiHBAx4teA/MHxdHP8x4ykte7d2uct32dQj/uQuLxj27cpFSS5Mw9tcmwfEa?= =?us-ascii?Q?XlMgmh7EvmcNJ5H5MAE+lI8rn81igQAiQ5KfIRHgajlyPibjJqI2ul3oIDoM?= =?us-ascii?Q?UgSsdFLZcNxB4xt1rPvq6wkHxn/Ep6EQ=3D?= X-Microsoft-Antispam-Message-Info: 7/I9hlfkybuwTcT/id9+Tuqp7KX0e2xg8BIgyGzrm4gEtE4fiiUi0zZOXUhSUUBF0V2l5tezrI+KhgZ/3Yoq5bfEt0aTCu/vJl4ZFDZX8eOYggv+bTCSP8xnfCFneaC0BfI3zSmPO9gdyKnG2/B5Uk1jvW9B8k/oh8Cyk3WP27iqAFAF9GYtMY+22ObKOlBA X-Microsoft-Exchange-Diagnostics: 1; AM4PR0202MB2772; 6:M0GxP3b4ECAiZsAFigfixotvn25TAOqBEB+hkGjaq3rLI8306xMZAw7mYpznSQLBrFbwlTr05iS7EW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16235a X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 10:16:47.8898 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73e4dc1d-1dde-4ed4-4156-08d5bb16235a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0202MB2772 X-Mailman-Approved-At: Thu, 17 May 2018 07:15:35 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Martyn Welch <martyn.welch@collabora.co.uk>, David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, linux-samsung-soc@vger.kernel.org, Kyungmin Park <kyungmin.park@samsung.com>, Krzysztof Kozlowski <krzk@kernel.org>, linux-rockchip@lists.infradead.org, Kukjin Kim <kgene@kernel.org>, Martin Donnelly <martin.donnelly@ge.com>, linux-arm-msm@vger.kernel.org, Jyri Sarha <jsarha@ti.com>, Matthias Brugger <matthias.bgg@gmail.com>, Vincent Abriou <vincent.abriou@st.com>, linux-arm-kernel@lists.infradead.org, Seung-Woo Kim <sw0312.kim@samsung.com>, linux-renesas-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, freedreno@lists.freedesktop.org, Peter Rosin <peda@axentia.se> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index df084db33494..78d186b6831b 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -70,6 +70,9 @@ static LIST_HEAD(bridge_list); */ void drm_bridge_add(struct drm_bridge *bridge) { + if (WARN_ON(!bridge->odev)) + return; + mutex_lock(&bridge_lock); list_add_tail(&bridge->list, &bridge_list); mutex_unlock(&bridge_lock); @@ -115,6 +118,9 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge, if (!encoder || !bridge) return -EINVAL; + if (WARN_ON(!bridge->odev)) + return -EINVAL; + if (previous && (!previous->dev || previous->encoder != encoder)) return -EINVAL;