From patchwork Mon Feb 7 07:53:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12737010 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 07832C433F5 for ; Mon, 7 Feb 2022 07:53:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3970E10F2B8; Mon, 7 Feb 2022 07:53:39 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 954D410F2B9 for ; Mon, 7 Feb 2022 07:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644220417; x=1675756417; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8tNcGqTA9NJY3U02NWeIXjX+4/ME8GMu6a+ysHONpb4=; b=PthaB0kT51bA4GVjsyOwIrSC0lU63gppL+bVcVbqBKii6f3pPSiVjlfO 25D6hXFLpHGhb3MwH7JJZChEGfln/IdYi+pcWc0Ix/si9ONRqnNPAo1xO KpRN9RhtkLB+VebX/FKvwUkyqz7rbEvgcFn8l9QhwVyxV5QLX+0fqNxEM Jjw8A2H9ZmkycS9RimD3MHko2yNJ4SBzz6BhOVJ8hUxfaRttiRgtpvjrU EfplJg7FhZiZj0h1mg6K0d+QQFDbQfkkq7jvazb8yThGrBvSLr2UbT0Ph Vy2BLXVOxko2M67vO3lpuXE2LnS1aXjY1YIChzEZfub/VXAbOSFeehV++ Q==; X-IronPort-AV: E=Sophos;i="5.88,349,1635199200"; d="scan'208";a="21922574" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Feb 2022 08:53:35 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 07 Feb 2022 08:53:35 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 07 Feb 2022 08:53:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644220415; x=1675756415; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8tNcGqTA9NJY3U02NWeIXjX+4/ME8GMu6a+ysHONpb4=; b=HAvsgjddvMsMepw5pP3QDuh86Dqyh2voAruCWzfrep3BsxEEpfzVlH0w HZGogrcUjS8T3m/IUEjhFrmsDAyQUUHSLFP1ioYQG72bIdvzKoZco7gYI BJ2TkaVbz9wziQQChGkfOpPTbFhm3T5Ij732HYtDnXeLjEedWmnUYQJxc LLVUaigFP2BRQ4jUXGs17L/BnhKLZvKumwVPSS0Wj3FOWp+6hjtubRjrC zTy6IDZ1ooqQdX6MdfyWzWrHmEuqexg+F0oW8L66RpEbPNHIanECRJAyh 7zcRYkb/2wjjkqOrr7w290iF/XWDqcuQLMkcWOqP+JSOppzuicO8nxBZm w==; X-IronPort-AV: E=Sophos;i="5.88,349,1635199200"; d="scan'208";a="21922573" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Feb 2022 08:53:34 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id AAE73280065; Mon, 7 Feb 2022 08:53:34 +0100 (CET) From: Alexander Stein To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter Subject: [PATCH 1/2] drm/bridge: ti-sn65dsi83: use dev_err_probe Date: Mon, 7 Feb 2022 08:53:24 +0100 Message-Id: <20220207075325.285179-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: Alexander Stein , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" sn65dsi83_host_attach is called from probe, so silence message upon deferred probe. This can happen, e.g. if the bridge driver is built-in, but the host is built as module. Signed-off-by: Alexander Stein --- This might look a bit weird in the first place, but the real benefit is usage of device_set_deferred_probe_reason() inside dev_err_probe(). Having /sys/kernel/debug/devices_deferred providing more information actually helped me tracking down an issue. drivers/gpu/drm/bridge/ti-sn65dsi83.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index a88d90f928ce..1f02596d6db4 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -644,8 +644,7 @@ static int sn65dsi83_host_attach(struct sn65dsi83 *ctx) host = of_find_mipi_dsi_host_by_node(ctx->host_node); if (!host) { - dev_err(dev, "failed to find dsi host\n"); - return -EPROBE_DEFER; + return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n"); } dsi = devm_mipi_dsi_device_register_full(dev, host, &info); From patchwork Mon Feb 7 07:53:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12737011 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 CEAF2C433F5 for ; Mon, 7 Feb 2022 07:53:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61BE810F2CA; Mon, 7 Feb 2022 07:53:40 +0000 (UTC) Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A59810F2B8 for ; Mon, 7 Feb 2022 07:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644220418; x=1675756418; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PLdPDLywrxWexnul+G8OpwDVmHBqyL7KeEVS03R8byg=; b=mvliWePuRtmtLBgC607A9zzyENcTw2D1BQfVc37AFkekMNMTs7nRF3/L I0vssWmhHY5Ksu/KbpCAi1JCb4nTLqPtfjr1zE19LjjBu0nufVc0DXZwb WNVp6+IoC/0jguM/Op2WGnNZSpsVcwhmLbc+4n24Yn0KgotXqhvzRFwur 7i1JAL9u8F7pBYkwM7U1vMn9Brmx2sGLymQG3TosVQ/mLsuVk0yE5LDm1 O4Epu2hQ8UwJCm6mfCpUOF9bmxk8vi2+1O2c79Y1OIdCyw5HMMwt/ygF+ ON7Xmn7N5b93gd7RpSbEdBTil4JKAisQezD/iHSj7qMqbIRF0Kxl9Mdc0 A==; X-IronPort-AV: E=Sophos;i="5.88,349,1635199200"; d="scan'208";a="21922577" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 07 Feb 2022 08:53:35 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 07 Feb 2022 08:53:35 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 07 Feb 2022 08:53:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644220415; x=1675756415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PLdPDLywrxWexnul+G8OpwDVmHBqyL7KeEVS03R8byg=; b=m4mGjM+H+jdqPCb4EkRmlUfySjSRlGRhrXT9yDQEoPp+gA/5+21KcfFG CRb5IFmDmB4CKBZxH4H40Qkn8j/5ybwCMX6Ku/SWWM0o2IPZW99thanTR ScfMe0g1dakqSZrK0f6d2vQ50WCD/T/Ss/zHXF+JgzKYXxbbSdQxu0z29 y9f8/bvDnhu3ys64jBueWBUx9pH6WO0yFMDeQ40wfMdorlKwsKbgGGsqc zHX9YhMhVhVokfpxYVPSP9X5geTwtrTA5vNY84p+c40KmOPK1iYvOV0qD k7v7pqZJbj5iLbAX1tA0Pvfy01c6GmvPe8P275dhVh4Feuc020SPEZ6WK g==; X-IronPort-AV: E=Sophos;i="5.88,349,1635199200"; d="scan'208";a="21922576" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 07 Feb 2022 08:53:35 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id E1341280075; Mon, 7 Feb 2022 08:53:34 +0100 (CET) From: Alexander Stein To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter Subject: [PATCH 2/2] drm/bridge: ti-sn65dsi83: Allow GPIO operations to sleep Date: Mon, 7 Feb 2022 08:53:25 +0100 Message-Id: <20220207075325.285179-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220207075325.285179-1-alexander.stein@ew.tq-group.com> References: <20220207075325.285179-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 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: Alexander Stein , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There is no need to require non-sleeping GPIO access. Silence the WARN_ON() if GPIO is using e.g. I2C expanders. Signed-off-by: Alexander Stein --- If the GPIO is from an expander on I2C, this warning will rise obviously. Straight forward fix. drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index 1f02596d6db4..2927fa2abd3d 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c @@ -346,7 +346,7 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge, } /* Deassert reset */ - gpiod_set_value(ctx->enable_gpio, 1); + gpiod_set_value_cansleep(ctx->enable_gpio, 1); usleep_range(1000, 1100); /* Get the LVDS format from the bridge state. */ @@ -497,7 +497,7 @@ static void sn65dsi83_atomic_disable(struct drm_bridge *bridge, int ret; /* Put the chip in reset, pull EN line low, and assure 10ms reset low timing. */ - gpiod_set_value(ctx->enable_gpio, 0); + gpiod_set_value_cansleep(ctx->enable_gpio, 0); usleep_range(10000, 11000); ret = regulator_disable(ctx->vcc);