Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp142862ybi; Fri, 26 Jul 2019 07:25:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv1D8X/ch4oNBJ7WeHX8jUPCC3CvTyLpxpY6B9BUmVLU1AyuEv3X8o+/vEsM0PDVIbbgue X-Received: by 2002:a17:902:3103:: with SMTP id w3mr98397298plb.84.1564151114677; Fri, 26 Jul 2019 07:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564151114; cv=none; d=google.com; s=arc-20160816; b=Ct1hJX1iDuVmbZi2XIftSB5ixI6zUMns2vQB+1WczpohzTQou4v6E0doXyb1dOrWbF eleDkhr89Ux75sx9sTFXdnA897jHswyg4NOSgj9lyxcua8VdcGoWx4rNsqIkcph61Jm3 IVxZ23lN0HvNrTqdERNV3T5w56j87sIJ2dYVHHkSt1YPfpxiW33iU5vC0k7jmjL+SJhH Kk8IqetUmgq+i4/NNYA9/oJYP3GshDKwntCbZnDz1fnJuD0wr1IrwvGyoPGflE/eT0Zz 4oOmT6CTgilqtsKDSkrAqAdyUBD0eZ9a3McwiXXnME55x8IYVMGEEugU7efWVYYKWoRV gRHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=E5FMo6ELzebhiWgFCcrTDqmf5tKgwdevClIfhESEF3U=; b=Ef+jXvcVL1JVxxUzUlM85LOZiIgIdDFy+aiB8WTX/5AZnVuYVcwe7k/qE34MkoEgb/ +1rijNgXzdRU8XfAkd+cMvtVl2aEXcSM76Q4kvGubuhkz+F9LhsViYj9ieaxSPeS3hPU O779jVtX5S4FWXiihLBcDsOtEsG8QH9nyLhPkcf+Lj1PJvoA/YbGSEs0aQO8jYfbhylL +9H+ioUTqQJGwQE5d0gLsOBf2aaB3ieLnrcwz3vh8NMEesn9hTZGGMObEIK8S6EGdNJL cROrFd0FwIffxV9W5a8O8ptb4mGWBForSP5N6/0UywJbBHdGRKcbfXgLUWjpcZCa8lKd 6Jdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=dBEi8+80; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si19988526pgh.190.2019.07.26.07.24.59; Fri, 26 Jul 2019 07:25:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=dBEi8+80; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387500AbfGZOXP (ORCPT + 99 others); Fri, 26 Jul 2019 10:23:15 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:55318 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfGZOXP (ORCPT ); Fri, 26 Jul 2019 10:23:15 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id EDCF55C0CE3; Fri, 26 Jul 2019 16:23:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1564150992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E5FMo6ELzebhiWgFCcrTDqmf5tKgwdevClIfhESEF3U=; b=dBEi8+80uL2lmGFpZLhKcS/qTHioGXH64pG245YbHH/YbMEnmAV73uL3DEIAadPCBHMWuO /ZwAOsLPL8o5h0X9GBieEvdd1/37Fcs2DRufDOTpkszqw+v/GpzzOkpJvYvMcl7BRiZuQP AhTCzMn0TNTO2I8rN5auX6bflp6YhFc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Fri, 26 Jul 2019 16:23:12 +0200 From: Stefan Agner To: thierry.reding@gmail.com, airlied@linux.ie Cc: jonathanh@nvidia.com, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready In-Reply-To: References: <20180726133606.14587-1-stefan@agner.ch> Message-ID: X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thierry, Hi Dave, On 2018-09-07 01:31, Stefan Agner wrote: > On 26.07.2018 06:36, Stefan Agner wrote: >> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER >> instead of silently continuing without HPD. >> >> Reported-by: Marcel Ziswiler >> Signed-off-by: Stefan Agner > > I think this did not get merged yet, any chance to get it in? Any chance to get this in in the next merge window? -- Stefan > > -- > Stefan > >> --- >> drivers/gpu/drm/tegra/output.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c >> index ffe34bd0bb9d..4bcefe455afd 100644 >> --- a/drivers/gpu/drm/tegra/output.c >> +++ b/drivers/gpu/drm/tegra/output.c >> @@ -133,7 +133,9 @@ int tegra_output_probe(struct tegra_output *output) >> output->hpd_gpio = of_get_named_gpio_flags(output->of_node, >> "nvidia,hpd-gpio", 0, >> &output->hpd_gpio_flags); >> - if (gpio_is_valid(output->hpd_gpio)) { >> + if (output->hpd_gpio == -EPROBE_DEFER) { >> + return -EPROBE_DEFER; >> + } else if (gpio_is_valid(output->hpd_gpio)) { >> unsigned long flags; >> >> err = gpio_request_one(output->hpd_gpio, GPIOF_DIR_IN,