Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp877063pxb; Tue, 1 Feb 2022 12:15:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8rlLrlYOKxCvYxhMtEe9HP2kdOp2BN3uEEstJSUsnMzpP+mYeIKUQTXASVOsQmIwabKD7 X-Received: by 2002:a17:902:b215:: with SMTP id t21mr27775276plr.73.1643746529904; Tue, 01 Feb 2022 12:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643746529; cv=none; d=google.com; s=arc-20160816; b=aZK3rusA0YUvEBY1VvYba6ybvUK59wo++YLy2nP4uE2s9dMQLlQZPJCuIiH9cMzuJj xnf53rkmReQ+dDFksbtbdbVbGYYJGKxiEGebh8ibDAtNyq921j+x+4nlvBGkISwepLfH KimSUaOtd4TuETWs0XzbY1unrsvm+CEPmYL18LBQ9Jg4AvbMm5D3tkm5L+Wnlw5ouvGh DIPdk3/7Ri/y5H/z2TTgKtW19/ydBN8409JyRoz7+w8AwsrUjkDt4A+jp+UeEWz3d4l0 EJgOTkAsBLSGFStetivgDNeTzV4pEt3Mi14H0xrUV/dLs8YXSs8j/zJ4hMwh22As2C4i BA8w== 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:date:subject:cc:to:from :dkim-signature; bh=LBxmbz4TfETrZ47YuEqnDes+Hpmtix3LD7VI+Fg8uyQ=; b=JoGD16MAHPYiuJSSYfH3st+hynTCxBDCQDuZ93qSY8hTLXL4oPm5t7Q/DXE8bA9At9 pFDH3tFPKbRQvdVJN+fXd8q4dra0KgaxelFx/CJznmTrLM4rfioHThwMjz2ptYiePJ2W SoSngUYDfLcKIEy1LTUejNhgiezKmCZfuFDHqBDG94oPMNih3340essnw9hZxi2dBuFD oT3p5lKiUWFfcHY0sl28YzqmRdBGzYjbawavtJdALvLbSXtG+v2Dr3q7R4p7YW7Y7Rck o/V1UaKST5HGZJf6SCgdjH4vVeFE9sTKj9w57r1PCzeGaQrznPVQGz3f+gt71RgsIVkK gvaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=T4l6tmcz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si17591697pgs.248.2022.02.01.12.15.17; Tue, 01 Feb 2022 12:15:29 -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; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=T4l6tmcz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377551AbiAaM2M (ORCPT + 99 others); Mon, 31 Jan 2022 07:28:12 -0500 Received: from mo4-p04-ob.smtp.rzone.de ([85.215.255.120]:35567 "EHLO mo4-p04-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377176AbiAaM1d (ORCPT ); Mon, 31 Jan 2022 07:27:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1643632022; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=LBxmbz4TfETrZ47YuEqnDes+Hpmtix3LD7VI+Fg8uyQ=; b=T4l6tmczthGnzYhoJNNv20D6yFNZs4UMZAAZchQLl+EclWN8cNPeMJxHXX8/mzBXIV FFhhmta6JixL+4djByCGCSVYR6hppHjJ1ZJtxdXmFRf2S/AZLwLLpuRvGnkoaswiuugF xfDUdzWMUiJ5xuh6+XIY/BtJzsNbA8btiGmbFHMeLgf599uRrgctTEL5vgOqcaCho5hX lQd7Y0/0cwae8/PtJNQX4PDz8BXxmPYIcaKf1URaz5R7UZ5RfFUzKBSX4X7x+kNpjoW3 5eOv1/BRkl8xHiHlfe2S0mHATyVSnFF/EPdB7pn6F9Q4ccwmEkNrUmtmedn0SqmIExa7 ruSw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o12DNOsPj0lByOdcK1L0" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.38.0 DYNA|AUTH) with ESMTPSA id j5fc80y0VCR1u8n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 31 Jan 2022 13:27:01 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , 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 Cc: 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 Subject: [PATCH v12 5/9] drm/synopsys+ingenic: repair hot plug detection Date: Mon, 31 Jan 2022 13:26:51 +0100 Message-Id: <4b695fa750b1086bcafe1f23c7896270c2d02580.1643632014.git.hns@goldelico.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); + 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