Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1894544pxb; Wed, 9 Feb 2022 06:50:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGMCpa7KgxUHMSalvzHPhz7AIwv3Bq4yt/CgMKcv72rkS1WaT5e5z9OEDdIhu95WeIbICe X-Received: by 2002:a17:907:9802:: with SMTP id ji2mr2344402ejc.154.1644418249976; Wed, 09 Feb 2022 06:50:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644418249; cv=none; d=google.com; s=arc-20160816; b=wVixKg4Et7TNjURfONsPXA4vA0Pd2WvNL4HPkjdSpRBlNFUwnnbahm0+B5i+w7OhrT xFN4LDg9U58iyr31Q0j0sYcBL+KlkCqoaFGErEU60rykhY34dJTAp50wDF8NiyUGeGCs fDMBm0Q2SU8YwhDPr21d+Scw9wpx0LPbY4PJDD232K4M8u6+LWFqa5HyjVHUjflp+4ki g+QH2YXVOnwYy9eF/BIGm3NN56QsGL02ayOR3nuUe54I2EZBBcZq06uoaH6N56b58H6u Wmqzg85IkqVxwExlWVi4zotOYgumQN3dkshkvdIFxLxF8W7V309Gi3DwmAc9pw1Vy11y 9HkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=ATtT2xDQG8gPmz9+2sarcJ48T6dY1YrgfYOPvyRxSyU=; b=nMmkAjsJ5YKbNLPO3f2YAnI5uEgoVMHlxr51Im1mlCYsFvvJj4K/labq/5Bwr/zyln OqLnsU7DG+Ub2t4yJ2Aab46UHMX3K903hameQMInCly8N8RMgSCR1yuDXrY1/YiL6Ltt Fb6XFOhRjEpusV2FUKTLHaXnCWrShDdWLy91GvDogg8iug9RcM1dEDH2NvSX0PLg+i/O 7loQkKoJk6WaaMXQu2g71/GHPUJ94f3mYuJtBJr4LyC4mxc2NPHVP0GS4lwv1lxd3+jz dqDNPlVYA9OW1engaj8S7EnXCrgBNagw6k3ePDkO1T34gGGeA+vXWJYRq11+K2l/P1RR KIZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si14199179ejo.949.2022.02.09.06.50.22; Wed, 09 Feb 2022 06:50:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbiBIMRT convert rfc822-to-8bit (ORCPT + 99 others); Wed, 9 Feb 2022 07:17:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbiBIMPl (ORCPT ); Wed, 9 Feb 2022 07:15:41 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CC8DC05CB9D; Wed, 9 Feb 2022 04:01:29 -0800 (PST) Date: Wed, 09 Feb 2022 12:01:16 +0000 From: Paul Cercueil Subject: Re: [PATCH v13 5/9] drm/synopsys+ingenic: repair hot plug detection To: "H. Nikolaus Schaller" Cc: Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , Andrzej Hajda , Kieran Bingham , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org Message-Id: <4ED17R.TVHQS4U654LE@crapouillou.net> In-Reply-To: <08fb9549042d35c1904fd977e68aa52f74f755b0.1643819482.git.hns@goldelico.com> References: <08fb9549042d35c1904fd977e68aa52f74f755b0.1643819482.git.hns@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nikolaus, Le mer., f?vr. 2 2022 at 17:31:19 +0100, H. Nikolaus Schaller a ?crit : > so that it calls drm_kms_helper_hotplug_event(). > > We need to set .poll_enabled but that struct component > can only be accessed in the core code. Hence we add a public > setter function. > > Signed-off-by: H. Nikolaus Schaller > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 +++++++++ > drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c | 2 ++ > include/drm/bridge/dw_hdmi.h | 1 + > 3 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 54d8fdad395f5..52e7cd2e020d3 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -3216,6 +3216,15 @@ static int dw_hdmi_parse_dt(struct dw_hdmi > *hdmi) > return 0; > } > > +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable) > +{ > + if (hdmi->bridge.dev) > + hdmi->bridge.dev->mode_config.poll_enabled = enable; > + else > + dev_warn(hdmi->dev, "no hdmi->bridge.dev"); > +} > +EXPORT_SYMBOL_GPL(dw_hdmi_enable_poll); > + > struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, > const struct dw_hdmi_plat_data *plat_data) > { > diff --git a/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c > b/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c > index 34e986dd606cf..90547a28dc5c7 100644 > --- a/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c > +++ b/drivers/gpu/drm/ingenic/ingenic-dw-hdmi.c > @@ -55,6 +55,8 @@ ingenic_dw_hdmi_mode_valid(struct dw_hdmi *hdmi, > void *data, > if (mode->clock > 216000) > return MODE_CLOCK_HIGH; > > + dw_hdmi_enable_poll(hdmi, true); > + It would be a better idea to move this patch before the patch that creates ingenic-dw-hdmi.c. Then you wouldn't have to patch a file that was just introduced. As for the patch itself, I guess it's fine, but is that really needed? My understanding is that it's the hdmi-connector's job to poll. Cheers, -Paul > return MODE_OK; > } > > diff --git a/include/drm/bridge/dw_hdmi.h > b/include/drm/bridge/dw_hdmi.h > index 2a1f85f9a8a3f..963960794b40e 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -196,5 +196,6 @@ enum drm_connector_status > dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi, > void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, > bool force, bool disabled, bool rxsense); > void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data); > +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable); > > #endif /* __IMX_HDMI_H__ */ > -- > 2.33.0 >