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: 170497 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3531444vqx; Mon, 27 Nov 2023 15:11:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBei/v6h4D0svxjS/NPUC/TpxHnKsAjVCzQvAJVqSjV2KQO9L7Ip087NP5D0mQk/m1dasJ X-Received: by 2002:a17:902:dad0:b0:1cf:da41:7294 with SMTP id q16-20020a170902dad000b001cfda417294mr3053025plx.25.1701126679203; Mon, 27 Nov 2023 15:11:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701126679; cv=none; d=google.com; s=arc-20160816; b=Julck103VzwZbWDXV9blkDDFtLyN1PzWwfpcg1Bqk3zdXysCkY92d9wzvIhHGaFC4j YRyrw/rzAg8VUpGbiwsdsyftTTAezGcZKPhdSk6nflYAoM7gm95KrzGy6IeLbMXQuIF+ A2ineVTVMnWao4XzEajAlRoSnMRApUHkWubNLlNhEhLPOH39g5Gj1ohRfRlUpdLMt9nG PM1DV8/KCoHbcPm9LUXy5t5Ys0aI8NX5PJIp0A5jOPIbvko3Gd4a1tdP/2dhSx2p6VRQ ODijLbiGdGmBitNRiMV5Cv8DlQgfw/LC/eeAil/4AfNM4cs/bCXNk6LXl5trBtgqmEBy pZOw== 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=bFBvRvbyeQkmeHFtf4FwobIxdNGDTFW8Ona6LFco3UY=; fh=+YLsS4/XZSIZ0J2i1OPQBvVnWXXKWaGfe4EoWIBKM/g=; b=X92fS3MMq8awbjVlpXZvquiu4zxu8SCpuv3oy111aPO1I1/XrWMBiXDZ5HD1DE2kYo Fd2BxLo4tQEwNU0ERsRlwkfZYfTctuxaTJ8EwNsH3RFKZfdwHNMAWt7PbOo1V+MKxzcf pei91PK5kY/z3XuF2gG1hGnb/o+i/J21yJIuSs0eRRx/QK3jW7HLSod9r1iadN63xyuk 02IPX8vFR3Pq7rATvwQLLYI8PKLciGDC9lWfnaOY35yo2YSKMTjHMIyea9b0b/MuQscz +oi4VNJnqG8bdDfLgpwwBgFEu057qsGmzLSPh+WTRnYKCVaSFMK5ZdOG4LiIK6cwBJMF BwzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nU5H/ph8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id v10-20020a1709029a0a00b001c60c109ce7si10231229plp.295.2023.11.27.15.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:11:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nU5H/ph8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 72CCA809728C; Mon, 27 Nov 2023 15:11:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233721AbjK0XK2 (ORCPT + 99 others); Mon, 27 Nov 2023 18:10:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233685AbjK0XKY (ORCPT ); Mon, 27 Nov 2023 18:10:24 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9C1B1AE for ; Mon, 27 Nov 2023 15:10:27 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5079f6efd64so6525718e87.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=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=bFBvRvbyeQkmeHFtf4FwobIxdNGDTFW8Ona6LFco3UY=; b=nU5H/ph8MkQV9JN/z8U1h9yOSYA7SgXiTcX2mw1bGs4Pg61e2cRAztpjoh0jLNyfe4 Z2InicKR/HYeZZni2J2M4k/7Qui7zbElke6g766JaI9nufYVj2Nh0AspFeBEDgbvn8AI lqPjq3aUdKiZKx+EwrGGoMXNZfWIDLicnrqS/8h058K9SfVjekvNZlX9Nrox8oueQK9Z 4oKsYUc0Wle+eiAFIU0VBaAwVT4RofFc5N3fjM9RdVvNJ729J417h6o6NGQTYrJB5TED VhMvf6C+z6RX7ByKLhBoeZn9vAqmsMvOhHV2Cy3yGB4scUXmn2Bdq6l0RmH/yP2J9K8M SQzg== 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=raBPNcKNq4ssZorkqR2A1qI4n0HU9k9YIpjfWahs04xqkZpoCwNvPkIo1e9q/FDcn9 w8YuvaCpWg9fE2uFFu7n9yRf/ugvXyHSA840jgYwGxlP41ZC3ihlokfwbwFqnGeV90BR o/CwvuQScepOwCQeUek4IuyNzgwYU/kM70VkKTarVTHBeuLYTmnTQCj4tSGmq5ST6S6E vJv/sF3ga30BOUytdsd7PCyimrlv4/Hj+ByPLL7reEfG1byfWS5klUULR5zEcCMnDNcL x4g78wDBQF5G/OjaXB/Q8CLNLPq0rqWbC/PRge5i+DLd4yvvlIT4dKmljzMfm0pjhSH4 t/8w== X-Gm-Message-State: AOJu0Yzb0JETBGdEeQXL2vTiaT4Pgg0Lphs81ZKP9HkxR+RA/4le0/f0 6LR8T98gq6dt8OqGAq0VMayv6A== 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 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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 15:11:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783760608612230847 X-GMAIL-MSGID: 1783760608612230847 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: 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. 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: 170498 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3531731vqx; Mon, 27 Nov 2023 15:11:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR+jziHXzQg4CnfJA+97dIr7aJYxX8w61ly4hVK5oGyhbpwUfulK5jeTuH0QCvoZE5Oggb X-Received: by 2002:a05:6e02:106:b0:35c:8140:1f7a with SMTP id t6-20020a056e02010600b0035c81401f7amr12160404ilm.1.1701126704374; Mon, 27 Nov 2023 15:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701126704; cv=none; d=google.com; s=arc-20160816; b=GtIIBXeP9xGBMIC4RIxd4BjSaVeUo9f3jWJchxlvc5uGwfZGHHUtSzHaFYXZSCQgb3 U2EW3aT0n2Tvxol+U5hqWlkxv7iaamthwXwaEEwmnkAzukK7moHDfiVx9WKhPPA1dUba 5uKXLK71I3uRfiOYD0cl1Zhtk9qrLtXNC1JmYEAgS0NDNzYdH5q9gxlggUM/Le/1J6Eb 8BzEKKTXhdHVY5uUSkIPgsdGGFQ0CTmXziajaJhJWltxlmPLGfk9FRbPW6aF8uOLbawy 5V6NVYx45M9wQg7iXj/UwvjGAAp6VUPvM2IqeLtHeXq4DivcjbFRRn4rZfssOT/MQjoy +u+g== 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=ebCaCeD18lScqs91J6GhqRptQIZNUU3CWEgjdYQG/5k=; fh=+YLsS4/XZSIZ0J2i1OPQBvVnWXXKWaGfe4EoWIBKM/g=; b=ZE0BkeYF9t7w2pz2CcpxX5nTy0DsOXPPTTHofFEqTIYoaYlAGQlv+eLSlxFzf3c1Bz tz+nT6dqLLYx0zcuFVa7kXv3Q6EOtVrK//HaAzqHaI7RlRgm2qvcc9xab/D0P+07B4kD LKa1wV3S+vEKeg3HHwUiTrZvk++lelIx1xbIDudVUrO7AT1GpCinTF+h5LZukR1FqJcg UzfOjzToM+1ee24FY4zbBx+uye9Zm3o8w364ebntdPN37rrqi73ex6zo8ozZQ/5p+YoR 5oTqZ6zcFw+h3844KJFo4JBPGC/rThf1ryPYqSfngrIOe3wzJC1Wlz8wBCYducbknu6V Jtjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=haLFDG3Y; 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 be14-20020a656e4e000000b005a9fde46f98si12347251pgb.52.2023.11.27.15.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:11:44 -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=haLFDG3Y; 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 5CB688097A63; Mon, 27 Nov 2023 15:11:05 -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 S233697AbjK0XKZ (ORCPT + 99 others); Mon, 27 Nov 2023 18:10:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbjK0XKX (ORCPT ); Mon, 27 Nov 2023 18:10:23 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C008A19D for ; Mon, 27 Nov 2023 15:10:29 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50a6ff9881fso7338006e87.1 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=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=ebCaCeD18lScqs91J6GhqRptQIZNUU3CWEgjdYQG/5k=; b=haLFDG3Yt4ZKSIPCuOg9Hg7I/tOWsH79/YORRhHBOnjYbDmg3VRJRLSYy8G5Dl5Mr8 GynyVbIOyCMfEXyGvatXCD8uZbApbgtHq063T31ie345K1DWClC6rKjP8tDaygChUm5J cN2sTezIf6gW5NILEc81kL6x2Lqv2Clkr6HZ6QfS36J26KJp5jlc0+r54u13YE8wlKNm prCzF8aSJXCBa7iKQE1sri6GaFdFA9i7J34nHzuod8Qdfk0ky/ZkWoBsK1R4FHJjfqFH Z44Kxs6coXGn20Qf3YhTk6DKj6X3dww3ZutXUSG9tab3G2aDBGN/q8YfKBwDREIAZZc/ Rn+g== 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=CE9ExALtUR30GGoapUJu6DO+s04cD04I/FuR01NISP6GW+zBLSsh87zgNHsgrQ5MPz amahKB2XjbrucWHkA1vAOMeba5M59NvISU8I5PvTF/u6P5/r/7b1P8W01gRdL1Sd64U6 YFbAbmxuf57TQuX3Wlg72DVa/XTDcGQIOAHncow3JS/3tsndgHJeRmXW0CSX3OtkmR41 YxcHQQuCBykBXGbKWY9Id2yP2W4C/TIadUbbaZ9Ge+X5uSPwB5c2mCL9j+MT9vzNE0d1 yodikrdewJhEPjEgkH04p/4nuRFoDOCO47qvVExg+jeawkgtfUHzWKjht69naKEVCdtI jAvw== X-Gm-Message-State: AOJu0YwKpYuxMHnuSukgHHI4mj3lAvsn5HNTAX6C6vWmsAb7EZUwN+aX j0m2zgTECTj50HrwrWOk6uEmzQ== 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 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:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783760635170790596 X-GMAIL-MSGID: 1783760635170790596 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. *