From patchwork Mon Nov 27 23:10:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13470397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7C5CC4167B for ; Mon, 27 Nov 2023 23:10:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92FF710E316; Mon, 27 Nov 2023 23:10:33 +0000 (UTC) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9ED210E0BF for ; Mon, 27 Nov 2023 23:10:27 +0000 (UTC) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5079f6efd64so6525717e87.2 for ; Mon, 27 Nov 2023 15:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701126626; x=1701731426; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bFBvRvbyeQkmeHFtf4FwobIxdNGDTFW8Ona6LFco3UY=; b=gUEFmHtfXzCYVVQB3G3ZRxyq1L88w8GyaeJ8iRT3lLYzeDHDyOYRLfrAZZbOUB0rP4 lzBIHRD2tg/8M8ahr+P1vg8f0G1yXOa9D+z2uyQbvO/XClwfZQ1M1Y/X59RAGJnhFNhM haN1sOTI9rwq7k7o5DzVnrH3prj7nxJi9eL9k5djiYgvXKvdEMU7XtWWG5QhuACCiMRw c8rI/TKuqdR3329dWMr3StRMZPjnRrjPFOF/Ac3wP8DgVdvDY+Bqjo5MEZilSZqm9Erm rFBPvGzk02nqtJDG0L1pE8YUv4PCg9uyFLPoiMYw0AtsPjVnWn0iaLrrfWP+U11zeviS xAmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701126626; x=1701731426; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bFBvRvbyeQkmeHFtf4FwobIxdNGDTFW8Ona6LFco3UY=; b=uiqXU12HkBdYozSAWOZNxHucLkKpJHzCK302S7JL9nf8v0KMbuBqL3HTKOst5Yk3SN VDfh757GvPl3GU0vQSWjq75zmMe8BxjiQeVg6SmJH8COVNA8uJ/JBsWhutPt5wG4BFkx zLr5ovYup1xoFxwPZvmaC8AOPuaBswJ/4z++giSSf6JS9R36PiWZhVvK6lPJ8bABSzZD 3LjWVh+4iAnodEcVEOi7hhYnlISeYatMYDce03J3wSydsWnVHuiGrf8rzGIIl1yRto65 dFvmzqgO9tmc3y/hKeF6BOKBXC79558gJim5wQxL6JTpuNk0bl1zdPpdiDg2IIa2RbD9 3Kzg== X-Gm-Message-State: AOJu0YxM5NnFXzrsyWqbASmIdUgWsRWBp8ricnBT+Jpciut/8PBOWycW ghTV0lU39AYjBLJ7D4q+/5tCLQ== X-Google-Smtp-Source: AGHT+IHDs7LKiVDhWcgD84ekXWzD2vRIoLMzcp8biogd3dgjxvKbFxjvr8a4CKDapNHrkGy1i8V05g== X-Received: by 2002:ac2:4a6d:0:b0:50a:a9bf:a61e with SMTP id q13-20020ac24a6d000000b0050aa9bfa61emr8378429lfp.67.1701126625970; Mon, 27 Nov 2023 15:10:25 -0800 (PST) Received: from [192.168.1.2] (c-21d3225c.014-348-6c756e10.bbcust.telenor.se. [92.34.211.33]) by smtp.gmail.com with ESMTPSA id cf17-20020a056512281100b0050aa94e6d15sm1636877lfb.9.2023.11.27.15.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:10:25 -0800 (PST) From: Linus Walleij Date: Tue, 28 Nov 2023 00:10:19 +0100 Subject: [PATCH 1/3] Revert "driver core: Export device_is_dependent() to modules" MIME-Version: 1.0 Message-Id: <20231128-revert-panel-fix-v1-1-69bb05048dae@linaro.org> References: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> In-Reply-To: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> To: Liu Ying , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter X-Mailer: b4 0.12.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 1d5e8f4bf06da86b71cc9169110d1a0e1e7af337. Greg says: "why exactly is this needed? Nothing outside of the driver core should be needing this function, it shouldn't be public at all (I missed that before.) So please, revert it for now, let's figure out why DRM thinks this is needed for it's devices, and yet no other bus/subsystem does." Link: https://lore.kernel.org/dri-devel/2023112739-willing-sighing-6bdd@gregkh/ Signed-off-by: Linus Walleij Acked-by: Neil Armstrong --- drivers/base/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index bfd2bf0364b7..67ba592afc77 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -328,7 +328,6 @@ int device_is_dependent(struct device *dev, void *target) } return ret; } -EXPORT_SYMBOL_GPL(device_is_dependent); static void device_link_init_status(struct device_link *link, struct device *consumer, From patchwork Mon Nov 27 23:10:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13470398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90348C4167B for ; Mon, 27 Nov 2023 23:10:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E839D10E31B; Mon, 27 Nov 2023 23:10:41 +0000 (UTC) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C60F10E0BF for ; Mon, 27 Nov 2023 23:10:28 +0000 (UTC) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5098e423ba2so6953291e87.2 for ; Mon, 27 Nov 2023 15:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701126627; x=1701731427; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wSqQHdm2tAnngdZ4T3GO4w4i+AkvfcnW67KysvUoiKg=; b=who62fcI6R38kKaKzCmMQ3duGPDuvNu6Nz96n5J7xBl5P+ukF7gR9hi35PNx03F0No 2FMk4DN1SZRozGIXQE/50TJW9HnGykKkQ0PS+M1M4yDT+i2YpeANepilqDnRdcKDgTWL Mx3PH4llPn2G4HxqJ0xXKLrGfhLfm6SNctQWajpLRoQ206MXfzVPUyZuZZ1cvqPLFn/3 +3SAtiyEVuXQBHuMtypCMlLb2EyUNNb7uytSmwYgpe4+VIygd5VFjvYGVvgKcCs48AUn pRrg3oYcAGCT5kwDNrn87aSH/HEYBP3x+ClNb3WZjS3PwmHrLI5jvHf+Z4j4FnI8Y/Ph iJ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701126627; x=1701731427; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wSqQHdm2tAnngdZ4T3GO4w4i+AkvfcnW67KysvUoiKg=; b=O7CNMfX5SE9g9XTNyu8KmDeriighGJPX4Jpwj5Rdhd2gb7bvKoRsIdBEj5LFTWAkY1 SK2aGg7vW0MzNiM8FUfLYrwdnRc4xyX46BEP2H30LfQdEGNuarH2Wt0zO4pZcg5lJOPT /1wPmnifL7H7MrIjyb/2cQbi/7EWQomXhxZZhINuRGTsiOSKOFPF4BZVwgHvczrnmRXg YDozmc7/1ryt317oqC92nnDcCSQenQHexOtM0zblFvcrkucU/VqQ7PAp1crQ1r3JEuSK gCZrPDUUSG8/jjPtyOwLf43fIYz/AbBOSbOQDiu+uadvJx6LGlWN4JgdsxaRufuGrmhI 1VKg== X-Gm-Message-State: AOJu0YwbDywF7kZVvZuO1IM9pEBR8Lq6zerJ/i9FJyoxPXfBogVK2TRU 649D1q+oV00jgKHZxXXLEIy74w== X-Google-Smtp-Source: AGHT+IEIaVbkz/Qqn3PYVmMWBo7MTr0rs45ISGfiLxrUqq0lGxY5f9yvJf3revevuWpDGFC2mqL8pg== X-Received: by 2002:a05:6512:20c2:b0:507:b911:6706 with SMTP id u2-20020a05651220c200b00507b9116706mr6914486lfr.25.1701126627002; Mon, 27 Nov 2023 15:10:27 -0800 (PST) Received: from [192.168.1.2] (c-21d3225c.014-348-6c756e10.bbcust.telenor.se. [92.34.211.33]) by smtp.gmail.com with ESMTPSA id cf17-20020a056512281100b0050aa94e6d15sm1636877lfb.9.2023.11.27.15.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:10:26 -0800 (PST) From: Linus Walleij Date: Tue, 28 Nov 2023 00:10:20 +0100 Subject: [PATCH 2/3] Revert "drm/bridge: panel: Check device dependency before managing device link" MIME-Version: 1.0 Message-Id: <20231128-revert-panel-fix-v1-2-69bb05048dae@linaro.org> References: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> In-Reply-To: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> To: Liu Ying , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter X-Mailer: b4 0.12.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 39d5b6a64ace77d0c11c398d272218df5f939abb. This patch was causing build errors by using an unexported function from the device core, which Greg questions the saneness in exporting. Link: https://lore.kernel.org/lkml/CACRpkdaGzXD6HbiX7mVUNJAJtMEPG00Pp6+nJ1P0JrfJ-ArMvQ@mail.gmail.com/T/ Signed-off-by: Linus Walleij Acked-by: Neil Armstrong --- drivers/gpu/drm/bridge/panel.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index 5e8980023407..e48823a4f1ed 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -23,7 +23,6 @@ struct panel_bridge { struct drm_panel *panel; struct device_link *link; u32 connector_type; - bool is_independent; }; static inline struct panel_bridge * @@ -68,17 +67,12 @@ static int panel_bridge_attach(struct drm_bridge *bridge, struct drm_device *drm_dev = bridge->dev; int ret; - panel_bridge->is_independent = !device_is_dependent(drm_dev->dev, - panel->dev); - - if (panel_bridge->is_independent) { - panel_bridge->link = device_link_add(drm_dev->dev, panel->dev, - DL_FLAG_STATELESS); - if (!panel_bridge->link) { - DRM_ERROR("Failed to add device link between %s and %s\n", - dev_name(drm_dev->dev), dev_name(panel->dev)); - return -EINVAL; - } + panel_bridge->link = device_link_add(drm_dev->dev, panel->dev, + DL_FLAG_STATELESS); + if (!panel_bridge->link) { + DRM_ERROR("Failed to add device link between %s and %s\n", + dev_name(drm_dev->dev), dev_name(panel->dev)); + return -EINVAL; } if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) @@ -86,8 +80,7 @@ static int panel_bridge_attach(struct drm_bridge *bridge, if (!bridge->encoder) { DRM_ERROR("Missing encoder\n"); - if (panel_bridge->is_independent) - device_link_del(panel_bridge->link); + device_link_del(panel_bridge->link); return -ENODEV; } @@ -99,8 +92,7 @@ static int panel_bridge_attach(struct drm_bridge *bridge, panel_bridge->connector_type); if (ret) { DRM_ERROR("Failed to initialize connector\n"); - if (panel_bridge->is_independent) - device_link_del(panel_bridge->link); + device_link_del(panel_bridge->link); return ret; } @@ -123,8 +115,7 @@ static void panel_bridge_detach(struct drm_bridge *bridge) struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); struct drm_connector *connector = &panel_bridge->connector; - if (panel_bridge->is_independent) - device_link_del(panel_bridge->link); + device_link_del(panel_bridge->link); /* * Cleanup the connector if we know it was initialized. From patchwork Mon Nov 27 23:10:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13470396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0AC8C4167B for ; Mon, 27 Nov 2023 23:10:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 64AB110E0E3; Mon, 27 Nov 2023 23:10:33 +0000 (UTC) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC4C210E0E3 for ; Mon, 27 Nov 2023 23:10:29 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-507c5249d55so7312132e87.3 for ; Mon, 27 Nov 2023 15:10:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701126628; x=1701731428; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ebCaCeD18lScqs91J6GhqRptQIZNUU3CWEgjdYQG/5k=; b=hjMDJqt16N1aRE0d9kHeKQbIrW918ruaxETviE5KYh6DpKNUuvUXMTjrMfIXjC0DSV IjGQFw3iri3GDQ4EqNPYhzeFlEcTLW91dRG1KOMbZE9wglsf+RymvYTF0a2HpwXqx/5K nrlOT6s1uuVbPuoNR+fzwAnm0KX7gQIkHBaI56g/7ab/FBUNQXk0nFzqw9QVDLXBnW/m D+kRzC7R0vDiVlKhpQzraXWhlgMpCdIfADpukfkAx1/AQssySUn79t2eonMOH0lZH8nq jNsdo7GQBjQaCOBcjfjr+8GF0bJiKnsiOGpRxv+RFjwIk9udRuJekhvkaTiS05KiT5A9 3j1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701126628; x=1701731428; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ebCaCeD18lScqs91J6GhqRptQIZNUU3CWEgjdYQG/5k=; b=Om8Bn9+d2mggOkcFhDgxfXwxEQ81I4bAQkZpKZcVeK66aesR+Gnre9qLxytYcxg4Nf qxS/0loW2tRHm3aSsPjh/Qdtq9S7gnOtOk4D6VDQxiEk8lqpKbiFT5AiYeN77q/+7oKE fN6PfVDL1SxYUeXyMDau2eipaCROrdu+ljZycKl4ykLaCcb5UIIzgnXsyVLAvIflFKjq XHpWuFUVBZK7xNaQ9gKzbTZb2vPilcfHxsajAi77f/uVrFINSAmpKSwvmjG+KkPBwLQa n/c4IezdIpMCu3zFMJFYCUF6X7k9TYyXvs6avPLzBgNjBD25u6qtjKunHv4XhXNATqvs 134w== X-Gm-Message-State: AOJu0YzzTeqgZqkRw/UQ0ubQiQfzRe9PtcS6aPx5R1jQym6/zyDbU0+w fEaxm6nxCleiQVlkQonCgZcQAg== X-Google-Smtp-Source: AGHT+IEhEPXemDbkIJhSLCv5/GH5cwpEPdzf5GSgTd+fUOw58GlymZwfd+AJ0UkTPtPIdrnHM/VP5Q== X-Received: by 2002:a05:6512:4883:b0:509:8fbf:7af0 with SMTP id eq3-20020a056512488300b005098fbf7af0mr7163748lfb.69.1701126628030; Mon, 27 Nov 2023 15:10:28 -0800 (PST) Received: from [192.168.1.2] (c-21d3225c.014-348-6c756e10.bbcust.telenor.se. [92.34.211.33]) by smtp.gmail.com with ESMTPSA id cf17-20020a056512281100b0050aa94e6d15sm1636877lfb.9.2023.11.27.15.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:10:27 -0800 (PST) From: Linus Walleij Date: Tue, 28 Nov 2023 00:10:21 +0100 Subject: [PATCH 3/3] Revert "drm/bridge: panel: Add a device link between drm device and panel device" MIME-Version: 1.0 Message-Id: <20231128-revert-panel-fix-v1-3-69bb05048dae@linaro.org> References: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> In-Reply-To: <20231128-revert-panel-fix-v1-0-69bb05048dae@linaro.org> To: Liu Ying , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter X-Mailer: b4 0.12.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 199cf07ebd2b0d41185ac79b895547d45610b681. This patch creates bugs on devices where the DRM device is the ancestor of the panel devices. Attempts to fix this have failed because it leads to using device core functionality which is questionable. Reported-by: Linus Walleij Link: https://lore.kernel.org/lkml/CACRpkdaGzXD6HbiX7mVUNJAJtMEPG00Pp6+nJ1P0JrfJ-ArMvQ@mail.gmail.com/T/ Signed-off-by: Linus Walleij Acked-by: Neil Armstrong --- drivers/gpu/drm/bridge/panel.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index e48823a4f1ed..7f41525f7a6e 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -4,8 +4,6 @@ * Copyright (C) 2017 Broadcom */ -#include - #include #include #include @@ -21,7 +19,6 @@ struct panel_bridge { struct drm_bridge bridge; struct drm_connector connector; struct drm_panel *panel; - struct device_link *link; u32 connector_type; }; @@ -63,24 +60,13 @@ static int panel_bridge_attach(struct drm_bridge *bridge, { struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); struct drm_connector *connector = &panel_bridge->connector; - struct drm_panel *panel = panel_bridge->panel; - struct drm_device *drm_dev = bridge->dev; int ret; - panel_bridge->link = device_link_add(drm_dev->dev, panel->dev, - DL_FLAG_STATELESS); - if (!panel_bridge->link) { - DRM_ERROR("Failed to add device link between %s and %s\n", - dev_name(drm_dev->dev), dev_name(panel->dev)); - return -EINVAL; - } - if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) return 0; if (!bridge->encoder) { DRM_ERROR("Missing encoder\n"); - device_link_del(panel_bridge->link); return -ENODEV; } @@ -92,7 +78,6 @@ static int panel_bridge_attach(struct drm_bridge *bridge, panel_bridge->connector_type); if (ret) { DRM_ERROR("Failed to initialize connector\n"); - device_link_del(panel_bridge->link); return ret; } @@ -115,8 +100,6 @@ static void panel_bridge_detach(struct drm_bridge *bridge) struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); struct drm_connector *connector = &panel_bridge->connector; - device_link_del(panel_bridge->link); - /* * Cleanup the connector if we know it was initialized. *