From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90394C43334 for ; Thu, 16 Jun 2022 06:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358707AbiFPGhZ (ORCPT ); Thu, 16 Jun 2022 02:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359203AbiFPGhY (ORCPT ); Thu, 16 Jun 2022 02:37:24 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA6456F81 for ; Wed, 15 Jun 2022 23:37:22 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id s10so424947ljh.12 for ; Wed, 15 Jun 2022 23:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=Fj5okI0OHrTUL7u0PrVtz/qzUyxfkepK38a37myhwyc=; b=aTyyr4VKiJKH9w58xGNjupT0b/Lpr30fhhgRJH9+kUuKwIiMjjQeOSG6AYnJveLS7f oDF0edb6MfIs5YoC2CWDX01cWww6laAge4ohmVCqzvQbwthKVfFEf15eNTiYBSB+fMPs Ya16w31vG9XIYFo0QZhmFeUzyg8TbrnTbezcOJgBWzvAqqZ4DEWqwjsN6rrhdTZG/sdc lsn62CtbqfbbPKMtTj1rqlAoN8ybv4wq0tBkPfSIKGBm7wdCRW+TF5nwEx6BFSTpKVrm biCfSElD/javNfglf2DV2nur026xsEJnAPa+xvhXHllcR6E6/pjuMuBnMbc/jyXjcDUG BCPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=Fj5okI0OHrTUL7u0PrVtz/qzUyxfkepK38a37myhwyc=; b=gwleW83sKE3ZwTKYhGH2eKhhQUXyYWx7wWwUSUg92VshW2xQkHdi+q9FSFv7bE2e37 qum5SkU1VyL2LvUqtAoDyesE38KyYP8NaFiNrpWJwJBFDvikE0HexEu1NtjGekfOYwc/ I/ohfWytgJbsorWonviA32l5CeUPN83hwESME7BeKlaH4QcITxfsvQKGkiMx6iFbsEZd hyxNIfyYZbSu52hXKE035SIcnON3UgP864sM1oteK8BYyPJJl8lfcCy1XZJElDpTfPoz 17cnPsl1u9Bw5il9kyyLa3sf4YqDpNdne6Gw+/om+HFjawEr6t5FsK5IiIEE+Tdsbbzp HuPQ== X-Gm-Message-State: AJIora8ilFXbtoEoNFoFJrSam9r3z/QPSie1vx0cjvR0RG4hWi6DYOff s6tphjczne+Z6sQcKPRsXoLwJQ== X-Google-Smtp-Source: AGRyM1soQk1JX8qiRdMNy0XE89vDn++uDALWeQbt+IbFR4FqlwAjVbSPM5Vxp4wAzGxwiCkBe0EAKw== X-Received: by 2002:a2e:8404:0:b0:250:cde7:e9e3 with SMTP id z4-20020a2e8404000000b00250cde7e9e3mr1759936ljg.289.1655361440862; Wed, 15 Jun 2022 23:37:20 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id y9-20020a199149000000b0047db8b30670sm110207lfj.136.2022.06.15.23.37.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 23:37:20 -0700 (PDT) Message-ID: <532dcb6a-db67-947b-3260-ac801b07f349@linaro.org> Date: Thu, 16 Jun 2022 09:37:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v3 06/14] drm/msm/hdmi: drop unused GPIO support Content-Language: en-GB From: Dmitry Baryshkov To: Stephen Boyd , Abhinav Kumar , Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Rob Clark , Rob Herring , Sean Paul Cc: David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, kernel test robot References: <20220609122350.3157529-1-dmitry.baryshkov@linaro.org> <20220609122350.3157529-7-dmitry.baryshkov@linaro.org> <492bbe98-e395-3adb-34e3-eadccd59d849@linaro.org> In-Reply-To: <492bbe98-e395-3adb-34e3-eadccd59d849@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 10/06/2022 23:47, Dmitry Baryshkov wrote: > On 10/06/2022 23:46, Stephen Boyd wrote: >> Quoting Dmitry Baryshkov (2022-06-09 05:23:42) >>> The HDMI driver has code to configure extra GPIOs, which predates >>> pinctrl support. Nowadays all platforms should use pinctrl instead. >>> Neither of upstreamed Qualcomm platforms uses these properties, so it's >>> safe to drop them. >>> >>> Reported-by: kernel test robot >>> Signed-off-by: Dmitry Baryshkov >>> --- >> >> One question >> >> Reviewed-by: Stephen Boyd >> >>> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c >>> b/drivers/gpu/drm/msm/hdmi/hdmi.c >>> index 7267167d5ef1..6d79f1b910a5 100644 >>> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c >>> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c >>> @@ -233,6 +233,20 @@ static struct hdmi *msm_hdmi_init(struct >>> platform_device *pdev) >>>                  hdmi->pwr_clks[i] = clk; >>>          } >>> >>> +       hdmi->hpd_gpiod = devm_gpiod_get_optional(&pdev->dev, "hpd", >>> GPIOD_IN); >>> +       /* This will catch e.g. -EPROBE_DEFER */ >>> +       if (IS_ERR(hdmi->hpd_gpiod)) { >>> +               ret = PTR_ERR(hdmi->hpd_gpiod); >>> +               DRM_DEV_ERROR(&pdev->dev, "failed to get hpd gpio: >>> (%d)\n", ret); >> >> Did you want to print an error with eprobe defer in it? > > True. We should use dev_err_probe here. I'll fix it in the next revision. As a second thought, I think I'll merge it as is for now and fix all error messages while moving the resource allocation to the _probe() function. There are few other places where we are printing the EPROBE_DEFER error code. > >> >>> +               goto fail; >>> +       } >>> + >>> +       if (!hdmi->hpd_gpiod) >>> +               DBG("failed to get HPD gpio"); >>> + >>> +       if (hdmi->hpd_gpiod) >>> +               gpiod_set_consumer_name(hdmi->hpd_gpiod, "HDMI_HPD"); >>> + >>>          pm_runtime_enable(&pdev->dev); >>> >>>          hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0); > > -- With best wishes Dmitry