From patchwork Fri Sep 29 12:59:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 114516 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp798073edb; Fri, 29 Sep 2017 05:59:33 -0700 (PDT) X-Received: by 10.84.133.6 with SMTP id 6mr6713444plf.61.1506689973751; Fri, 29 Sep 2017 05:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506689973; cv=none; d=google.com; s=arc-20160816; b=xPyogiCB21zZIPGr9UetbCrTG2lw/V8bb2My9pOwjc0MkWhV5bgDP+ACXLsf3JyV8n RD+0Ne8jhOdGhzlV9VNjUa/1CFe+DQah+pNhCbcFY6l+nguuQ4gnHLDk2XKovwN8BXNX Hsn7xPZMjAWJJwHRaI/alGFwkApGgYazgLeEpsfm2sUjgdYSBxZSvdA/Nd/3YyyyVQBb j4qkKs3iA+DbStuF8sMNW+FW4OCw0oHuL1qir9wAAPmUSqxhUxvlh40IoTkPg5OSZCAh M7cKyovlTgFFEAn05KyCcb96nTt5xiv1GJgUZ3QIOWi5JPxoouLabecTv5bePPvfymNA rarg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=dlNNO3xEd3Sx1fVKvpmFj13Bp8GjYGHWs8AgUCEMg4Y=; b=diU+Q4Q6icKMASoO6Y2BrM3qcU9U0UFuLiWbpERcdd/vtZHkEKV9lT3yi7eCZXMvj2 CbUBBcy6g7WL/qo/tOisodjWrOAmTK0uZSxli3fn2KVhEWoV6MPlb64FGYiJsFBGvY6n BdjBB6W2v7uUEH5RsiZRDSgIhYZ7Y+E6Wfu8CyTRb7VhTr00Y+UzsX59/hLF1fDsFd3w Oo9q0jCMoeOVQ6pSaZRKkOLell81fL8ZkFBx7Wjgyv1W3gLHc5bGAmlsZ2pvZv2/pbMs 3WF47l77kgwednYenJncA4KlKFif1ypY+wJLPPiXm7wRdvqeRpzVPF6NGU/5e8a6Gkxg pV1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QwkotqLn; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id z123si3287042pgb.224.2017.09.29.05.59.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2017 05:59:33 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QwkotqLn; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 969AD6EB47; Fri, 29 Sep 2017 12:59:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2C146EB47 for ; Fri, 29 Sep 2017 12:59:31 +0000 (UTC) Received: by mail-wr0-x234.google.com with SMTP id v109so2242405wrc.1 for ; Fri, 29 Sep 2017 05:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tJH+rZozbQl4UscFwjbhcCbMrM3CY0/CPrEgPzLMIt4=; b=QwkotqLncMiyHdj3F9Sd/OoTl4KrFTywPKoeV6LeA/fEY/eN/cLalEhtwAmkhvoMWq mZJW/cZ8tLF68dbJtjHfQPwGU/fCJe452Mmf1Rp+A6lbNwhCFDdAZd7PK8MiieYBVGzJ yybyNBfthAYjgUyvqCxF9LFhvuR2OuOvBlH3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tJH+rZozbQl4UscFwjbhcCbMrM3CY0/CPrEgPzLMIt4=; b=Yx3EMV2NK6aTRVUMNJDjJE0DD+BFW5yerS3KdzTcwx6lz+lXBqlIUKOzRihIDajd9s D6GiBLZe1maR1X4NDUd8hhV/1ZwRLG1/3brVCBmiRpnrvnHZDWV9Wk51bLwYuwbzf3YY cUN3rxjkfRt33AsG+9whKQlvPOQTnvaCv9s/gQ25mU0Se8/IX86ZA/2NaONwGO8t9qfl rCMKkqP6vmV9KDN4P2QynTtOgXlfabixkPmN5kUNZ6f90Ymq03u/SqCHBMhH4J30A46o vThNcpFRiqQLNV7cMud3fCAlsWMoO28fKpzJ9yx/7VFhVTU8bQJTl6T+rPQATOcDUP3R BWJQ== X-Gm-Message-State: AHPjjUgxgE6Zd1RmIq61gMkFGywbhvjyLVdJSC+72SHpNxQDpHcT0HYQ knHUgskYJSNMQAq8svwPEO0Szw== X-Google-Smtp-Source: AOwi7QDaz4QybhglFxi+Z2djPJufiwN5V0kkMLBiP7D/ERz+TkVl9l1nYLIO3Mg04XS/unFdSjnh/A== X-Received: by 10.223.134.25 with SMTP id 25mr8203433wrv.186.1506689970069; Fri, 29 Sep 2017 05:59:30 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.91.35]) by smtp.gmail.com with ESMTPSA id k11sm3269667wrc.90.2017.09.29.05.59.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Sep 2017 05:59:29 -0700 (PDT) From: Benjamin Gaignard To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, yannick.fertre@st.com, philippe.cornu@st.com Subject: [PATCH 0/3] Simplify panel bridge cleanup Date: Fri, 29 Sep 2017 14:59:16 +0200 Message-Id: <1506689959-7858-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The goal of this series is to simplify driver code when they need to clean up a previously allocated panel bridge. Few drivers have "is_panel_bridge" flag to be able to distinguish a drm_panel_bridge from "simple" drm_bridge. To remove this flag I propose to - let drm_panel_bridge_remove() check if the bridge provided in parameter is really a drm_panel_bridge. - add drm_of_panel_bridge_remove() to remove a bridge given DT port and endpoint Finally that allow to remove drm_bridge structure and "is_panel_bridge" flag from stm driver internal structure. Benjamin Gaignard (3): drm/bridge: make drm_panel_bridge_remove more robust drm/drm_of: add drm_of_panel_bridge_remove function drm/stm: ltdc: remove bridge from driver internal structure drivers/gpu/drm/bridge/panel.c | 10 +++++++++- drivers/gpu/drm/drm_of.c | 33 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/stm/ltdc.c | 16 +++++----------- drivers/gpu/drm/stm/ltdc.h | 2 -- include/drm/drm_of.h | 8 ++++++++ 5 files changed, 55 insertions(+), 14 deletions(-)