Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1155077imm; Thu, 6 Sep 2018 16:46:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbalSoAXZaT6KkCe0SUg+JN0u/WpXM6+Ctq2pgPocO5Q+jhAaXjTBBxBICNAeMF+v6Cb+ym X-Received: by 2002:a17:902:6b05:: with SMTP id o5-v6mr5237040plk.338.1536277615932; Thu, 06 Sep 2018 16:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536277615; cv=none; d=google.com; s=arc-20160816; b=yD6CUhxVAMoNQhJbKVPH2graKoZND9VUAyAjI4KtONBmKHi39HNxyVOrE0NEL7RbFI D9tnc+7HkkrksTR8jgIyOPd9yRmpI3h5nXSVBkDuGtAjpPivcosR3csRKLvOIYWSnlkc /zk2L+jhpcaDFGncRcB24Bxz9NBDiEZ2wfsnlJAQ53HEC+vGMthl/DaK9opmlQwRbAed 5AE+sQQf621tQmQiuqhQggQm2KzvQMFnusjdXxEZGBrBgrSGQu0Q7ZjKE1BVsFTFCTMt YwizeBrs+vRQyl/PnXxtM6aoe1aOPUR9kwAKxFL7CSeBp7gFdmJHAVQ2hMfBMM3uoEsI h70w== 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=8AFx999YG4x9nzEIiS2ow9h7MmRRuB2TWyq5UQa+9Po=; b=qEzZLCoT/CEB2Lr9LF6lQThYSOiB/GX368S8ylbk4XRmWCccjFG4hRMoboM9g/1Lpe Ohu2uNJjPhoTAcHYWTEhlqIeEpkyTjNZ5YWrGahUJxLai5SFqzRMoqXPMZ3Q1Za1iz8U gVQGR6RKnHoaesLvzc5pC6CgctJZY8+NhVUmTbA9MEbGXGTkhU511f8tAhyVpCYny8pJ Yoe5B7q4X8pmECHZvVEB8pKHPJ1PUzj33tHyJ9NSSxxbGiMkazj94Jx+fWZe2LP+vzlp pzcKcc1U0JvSTZhnMkAsfYzHFPfAbpoIVvXET/RI5JzpbLUIBFwVFAo8BFpVaYX3mHF9 j26g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=N2JZZeJv; 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 m141-v6si6619645pfd.310.2018.09.06.16.46.40; Thu, 06 Sep 2018 16:46:55 -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=N2JZZeJv; 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 S1727289AbeIGEJg (ORCPT + 99 others); Fri, 7 Sep 2018 00:09:36 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:50430 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725745AbeIGEJg (ORCPT ); Fri, 7 Sep 2018 00:09:36 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 853415C00FA; Fri, 7 Sep 2018 01:31:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1536276703; 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=8AFx999YG4x9nzEIiS2ow9h7MmRRuB2TWyq5UQa+9Po=; b=N2JZZeJv11r7VpZERLmj5IlEr5kddgoBiPU/3Mr6fLv3ZZ4+7azk0Kp9oztHH5VXhgbM8h VMk0VQXXo7HHBrSQ55fUfusbuJRJrHxtG1LGlDOXQtlypkm8E8Z8Rfpf5IaGwT5hgfR5CN gQ8s6R1KZHCZDOLsZJgqCUERLafruTo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Thu, 06 Sep 2018 16:31:42 -0700 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: <20180726133606.14587-1-stefan@agner.ch> References: <20180726133606.14587-1-stefan@agner.ch> Message-ID: X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- 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,