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: 170499 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3531759vqx; Mon, 27 Nov 2023 15:11:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyEpxVioEKn02N1ih5m9Tc6L8OQFv9KWiGQm0Rb0Ds/hwTR/DM0Pq9Z5bl9NS5UN/JAPHr X-Received: by 2002:a05:6870:4989:b0:1f9:e7f0:7e84 with SMTP id ho9-20020a056870498900b001f9e7f07e84mr16292281oab.58.1701126706202; Mon, 27 Nov 2023 15:11:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701126706; cv=none; d=google.com; s=arc-20160816; b=QyEBxYFqBVYkqsjlYCX3ii23tQgZYCqpiWC5ZX1UoLfFRcc1bynBBwoFdS3B1J0cTq 1tX1qa8Tndb/PAe/uTXl4eE4gV8qBdoVIjuo3ktzTAabyPdNjfCVvRVd10kXLaS4eRQR 97+FAxUwFctaAvsTKma5suqirNRDwJtK5ezj2QT5K1FZ+pXLcwf/SI0F9FgQ6wyhxEXw pvPpON/QHb4coHqVWLwaGgwIeNFz735M+ZkzajnqnhG4dWsjGZXTL9mdDso4uoBK3A0u M8603kImZNIIpDS0EcrbV5feCE21ZT15MG/7PMSpJ0mfk7ySO6J/6UTDdvoue0u37C7/ QiRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=wSqQHdm2tAnngdZ4T3GO4w4i+AkvfcnW67KysvUoiKg=; fh=+YLsS4/XZSIZ0J2i1OPQBvVnWXXKWaGfe4EoWIBKM/g=; b=FaDVC4DU5YC8mEmeTNxQIqNXsFFN04Qm/o7swBRR4cMkCiloUVm8N/u0i2yd677QWP 2iyQlZyTWkYix24zWcfo2NJXnMpX/0Cp2ukSW4QP3sX6V0HqDm6WrxSviDHFv3mmAaDq cqgRs/N3//f0mEqSq/x82QV6yGDqfC2A7Wfw9RCCv1HnsL1DF/WIDCZ1T9eqEpK0NAVP Mui3mmI7yEDQWFRAJQ/o0hAw5kma45GDbHDffABXvdHGw2E9mBgBnrtMFoPi8CDQnVne 3/ievyEYNM2zTKBALbrzj93p9oz8KyRxplyL9/OyO1gxpO7yEOWy6qyWrMmoKzarsqH+ NAmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHD7bPBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y20-20020a056870b49400b001fa1c4fa052si2644533oap.76.2023.11.27.15.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:11:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHD7bPBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 8F5DD801B836; Mon, 27 Nov 2023 15:11:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjK0XKc (ORCPT + 99 others); Mon, 27 Nov 2023 18:10:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233687AbjK0XKZ (ORCPT ); Mon, 27 Nov 2023 18:10:25 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F881B6 for ; Mon, 27 Nov 2023 15:10:28 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50aab0ca90aso6963417e87.0 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=vger.kernel.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=dHD7bPBaH7NU+fOpaDm8oUT6sq5ZpHWqDkpNa1MpYPYt653Vzv7IYc8uHutaqdBeOc 80KxxgCCrMzuAp5cx8aULqNFPMpbKuQ/ffR9MHrTOzApAen9qU4FooCIKNSrljEl6G9A Z277H8IAoTgn6IwDKaEVqiL2qGlP+NmVGpJ2L3PrhqC0IZYkq7Izlc+aXnssZ3piosng YGmqLz4QqJoHANkUw1+XPMBEHwAwZsH+lXWuzHP1dNd9lDZ4DToTG6RMcZP9io0AkGr8 xO/ErFRnV5ojxYLrAbCeEjGxyVFUH8fCkVxUSEVQsQqGoQnKcA2EkZKXtrQhGT7nrpnC RVIA== 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=ZM4iaG5EyMg0Y6pXKSrgZRwqK3LXlbmRuEfO9Yts9hIC2SGmdS26gX9wPdieQ+4mNe iZ/zVpcDfTnRlItl8PkdTWxzLzKAOl3uydGVowNKKV9XT12PfiJK++sItipLhpM5S97A AQ9niSr+7zfX1cTR0mwW5gwpg3noaz99XL8HOSTqikU2GwERbbq5tvJynF+0aUrt2sqE Fz6AE6c3afO3NfLz6xPiYz9ysz5eoFbuIhKjwDqwp+938kzjidDrzU3N6SsVYCA5aGmb r1ILUiUUIbYg9KBSJZgeBqQE+xCqea86r8tGGzOeHsmh8S/CdodqgqivlboDdxEqMQJT mKiQ== X-Gm-Message-State: AOJu0YxvcCUWFFEntpQFZlTeApq3TH0IvPIiMr/6eg2IucNtuFtqNtnG dGj6Tm8GC7OB06Pxzi+YoBTjpQ== 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 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Linus Walleij X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 15:11:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783760637400066531 X-GMAIL-MSGID: 1783760637400066531 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.