From patchwork Sun Sep 1 16:14:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11125473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DB6214DE for ; Sun, 1 Sep 2019 16:14:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2417121872 for ; Sun, 1 Sep 2019 16:14:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2417121872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F8E58954A; Sun, 1 Sep 2019 16:14:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072028.outbound.protection.outlook.com [40.92.72.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABDF08954A for ; Sun, 1 Sep 2019 16:14:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vfq5qrgvJcB0AIw9xKECdaU0bgm2dOOph9PzcmPLMx12yjf4nVe2CCOCAvuF4YXIkiRL1vh1RqTvW5tiKaKvzoqFQ19qxVG1mdV3/3yJyJmfjdGJQ9bulfYL0gNUlJHUNMYwQBQx1fPTSmF4BhB9DfxIx+NmM5acgXa2AegVYAb3PtMh6jaU+vVErHW/S+Wn9YxWZA8kcEk0gs8QQ9DsSAq8woIWUoU+MnzIpvTjzSRgJDn+Ashg+zwOIomLLcl8iaI+Gz/oNp7omaNa+mYLMXsPIBvIgREqzxuuVxDPm52CcvhyckqCPtvB/xegDIBtbZX74ziwNwyZOyvL7RIm4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DsXKj14BbN3yO6ooEs4gfQiqF04TtDyDFlyX3vv8+Ig=; b=Rp3MzqbxhI3KugmQ8GVBdxXiY+h4hflFNKdEkVAvyzoMFH7pe5jbw4K/rTouRauz2HejCZSKFOeeFis2VRjhMWUJ+yCdN8MAGAUHPOj3Gh7kstfcL6XGQzBEgc0WorjFqUvyHfV0MCmiK7bnalsA4UfkDronV5zo4QQlugxbpvws+zL1uUVnH5E0mshU4GE7VEfJfnhwpZ7dv+c5N78k/2gm7u5oVqX4L8WtANvczO1xNONjqMmJ/47riT0s9R52PAAaJWNdXSR0qfCMMlshpuO/ysPSVKdFllXMT7JHFcBNf2nuWN2F/jlLnYX7wkKQn7WZ+gpBhhPzQ2JjbYXHiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (10.152.16.51) by AM5EUR03HT063.eop-EUR03.prod.protection.outlook.com (10.152.17.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Sun, 1 Sep 2019 16:14:38 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Sun, 1 Sep 2019 16:14:38 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87]) by AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87%5]) with mapi id 15.20.2220.021; Sun, 1 Sep 2019 16:14:38 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH 1/5] drm: dw-hdmi: extract dw_hdmi_connector_update_edid() Thread-Topic: [PATCH 1/5] drm: dw-hdmi: extract dw_hdmi_connector_update_edid() Thread-Index: AQHVYOBa+gt+lOgjFEWqXGzvKljODQ== Date: Sun, 1 Sep 2019 16:14:38 +0000 Message-ID: References: In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0022.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::32) To AM0PR06MB4004.eurprd06.prod.outlook.com (2603:10a6:208:b9::12) x-incomingtopheadermarker: OriginalChecksum:F1ECB234EA06E1118480C8CA772F9979C2A14A33673757250464D489195B8BE6; UpperCasedChecksum:2F23F3DFF9C32C165CF49CEFCB7187F12D2B02DAC863E49B7FBB9671E8B71B94; SizeAsReceived:7995; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [AWGFRvZjHhoglXqlRsFM3Re0vav0xUWH] x-microsoft-original-message-id: <20190901161426.1606-1-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR03HT063; x-ms-traffictypediagnostic: AM5EUR03HT063: x-microsoft-antispam-message-info: I6au+WBFuYG8wZbNlYp+TaLC3oNMojTwaMU+Jcs7jiszbPqKRs16mEHK4rtIePgx7Tsyx8cv4BG/vBF2IfgH9Lvn3u6TypJ5yrsE6OZ2b1GrE9zQYR67azJaMM8cmtq7SC0skurDFt2uEE+IBoBqtu+/32jKJJIwJi7vict8szzzzmJpOi2trE+ur4DiAEZg x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 741be15a-ca1a-43fb-ae7e-08d72ef77ca2 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2019 16:14:38.2258 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT063 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Hans Verkuil , Laurent Pinchart , Sean Paul , Jerome Brunet Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Extract code that updates EDID into a dw_hdmi_connector_update_edid() helper, it will be called from dw_hdmi_connector_detect(). Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 521d689413c8..8ab214dc5ae7 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2171,7 +2171,8 @@ dw_hdmi_connector_detect(struct drm_connector *connector, bool force) return hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); } -static int dw_hdmi_connector_get_modes(struct drm_connector *connector) +static int dw_hdmi_connector_update_edid(struct drm_connector *connector, + bool add_modes) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); @@ -2190,7 +2191,8 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) hdmi->sink_has_audio = drm_detect_monitor_audio(edid); drm_connector_update_edid_property(connector, edid); cec_notifier_set_phys_addr_from_edid(hdmi->cec_notifier, edid); - ret = drm_add_edid_modes(connector, edid); + if (add_modes) + ret = drm_add_edid_modes(connector, edid); kfree(edid); } else { dev_dbg(hdmi->dev, "failed to get edid\n"); @@ -2199,6 +2201,11 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) return ret; } +static int dw_hdmi_connector_get_modes(struct drm_connector *connector) +{ + return dw_hdmi_connector_update_edid(connector, true); +} + static void dw_hdmi_connector_force(struct drm_connector *connector) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, From patchwork Sun Sep 1 16:14:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11125475 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78D8C14DE for ; Sun, 1 Sep 2019 16:14:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6073F23429 for ; Sun, 1 Sep 2019 16:14:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6073F23429 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9AEA89852; Sun, 1 Sep 2019 16:14:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03olkn081f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe08::81f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9943B8954A for ; Sun, 1 Sep 2019 16:14:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BjnK2TI7rVYUfkkbcTmzFNdApEKkjKrtVmai9SvbfeJTHy6JNr3ufUnUgEMrvN+vchIRrOm2oYTsYDjoLQ+u1VeLrrOrPwieulFyetqI/47oF82uAS09SD4CE/lKpRLRF+RvSCopnytrPVFOhyfhJ/6NPvD+Clgd1Pm9Q+ITSWJ1lcKkiABOLjVl9AyUv6RX7fT4G4SBms+XMat+ViOLtR70ch9QCAdSm2J/MmBc5Mr2BFI2SwsCkBnfA/DwIjkZBH4VY9RJv29A9fVdP7cI6QxRwQmntjgdtq90AATydbiBV0wqNlXzazh1GR691G+SPbDWiXBUFOwtmMDPBQ+lnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P437qGjgHJ4joyGOSSESljNIDRvC8H1crQnH6bic4xs=; b=MwmRTKkWMcN1o6H1O5JAhjsPBOv/YK10oxDpQlsd/DvR3K44ArkenSlOzXDWj1q5YOcDKs6PW4pzLf/IfWwM65btRBUkdcsbtlL/KhKZbJcw7XqWQua5tY4muS4K1iayFKsDGfYc9svuiEkOCs+g6aTkbHnJjXtVrsb0qRppU5fuRnkwRmS58eXfdiI3EfEc6QBXQIj2uEKr/UeykJh8xDaSFlvobov3I53t50a9anOXW8uMOzUKXtp/KELZ+wfdx3WjwBsa/lEln4ezWZpo7mjL0lu8OKJ7zY+l6LNgBv7CcpJH1kF8ovPawD7UDPRCS4tDEqMJE84O/mF2XJqk/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (10.152.16.55) by AM5EUR03HT110.eop-EUR03.prod.protection.outlook.com (10.152.17.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Sun, 1 Sep 2019 16:14:39 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Sun, 1 Sep 2019 16:14:39 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87]) by AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87%5]) with mapi id 15.20.2220.021; Sun, 1 Sep 2019 16:14:39 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH 2/5] drm: dw-hdmi: move dw_hdmi_connector_detect() Thread-Topic: [PATCH 2/5] drm: dw-hdmi: move dw_hdmi_connector_detect() Thread-Index: AQHVYOBbWV8Th1TB7E6oSuxlJ5RnAQ== Date: Sun, 1 Sep 2019 16:14:39 +0000 Message-ID: References: <20190901161426.1606-1-jonas@kwiboo.se> In-Reply-To: <20190901161426.1606-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0022.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::32) To AM0PR06MB4004.eurprd06.prod.outlook.com (2603:10a6:208:b9::12) x-incomingtopheadermarker: OriginalChecksum:228A8DD11B64B3E7666AB60E5E47A2B6F77C29E963B1A868DA1A6232157C26FB; UpperCasedChecksum:CE7EBE31092929AE617E0B96A530497F27B0603AFC17793DD6D92C5394E2CCBC; SizeAsReceived:7966; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [bqiqt4RLDZA9AC3c+4twBG+KizakMsvz] x-microsoft-original-message-id: <20190901161426.1606-2-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR03HT110; x-ms-traffictypediagnostic: AM5EUR03HT110: x-microsoft-antispam-message-info: wrbaIbi9jsAy3dAvoqRNBmc0A4G7l+kE0rxUCqQxkAdZ3h6NHyGsXjbkQt/H7LuQj6leFZuc3fuSvQDhhJ/JtwuQcdKpv1stlJWrph6MNN1ccYNqJwpAHvc24YeI1TM25sa5n2ZKjI4hWRLI57Nxp+RSim8nNTFUP83RxjTdr2sCkPD5ndUh37e+nXmyiHLV x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 58bfefe2-773a-400a-57b0-08d72ef77d54 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2019 16:14:39.3552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT110 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Hans Verkuil , Laurent Pinchart , Sean Paul , Jerome Brunet Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move dw_hdmi_connector_detect() it will call dw_hdmi_connector_update_edid(). Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 8ab214dc5ae7..91d86ddd6624 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2156,21 +2156,6 @@ static void dw_hdmi_update_phy_mask(struct dw_hdmi *hdmi) hdmi->rxsense); } -static enum drm_connector_status -dw_hdmi_connector_detect(struct drm_connector *connector, bool force) -{ - struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, - connector); - - mutex_lock(&hdmi->mutex); - hdmi->force = DRM_FORCE_UNSPECIFIED; - dw_hdmi_update_power(hdmi); - dw_hdmi_update_phy_mask(hdmi); - mutex_unlock(&hdmi->mutex); - - return hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); -} - static int dw_hdmi_connector_update_edid(struct drm_connector *connector, bool add_modes) { @@ -2201,6 +2186,21 @@ static int dw_hdmi_connector_update_edid(struct drm_connector *connector, return ret; } +static enum drm_connector_status +dw_hdmi_connector_detect(struct drm_connector *connector, bool force) +{ + struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, + connector); + + mutex_lock(&hdmi->mutex); + hdmi->force = DRM_FORCE_UNSPECIFIED; + dw_hdmi_update_power(hdmi); + dw_hdmi_update_phy_mask(hdmi); + mutex_unlock(&hdmi->mutex); + + return hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); +} + static int dw_hdmi_connector_get_modes(struct drm_connector *connector) { return dw_hdmi_connector_update_edid(connector, true); From patchwork Sun Sep 1 16:14:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11125477 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 917FB14E5 for ; Sun, 1 Sep 2019 16:14:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74C932342E for ; Sun, 1 Sep 2019 16:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74C932342E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96697895D7; Sun, 1 Sep 2019 16:14:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072065.outbound.protection.outlook.com [40.92.72.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id E68F38968D for ; Sun, 1 Sep 2019 16:14:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e683ItcRYinKaRmiczp4ybWfQg5fjGqSAFjtELsrCT9L7bgZi+FDdu1t8gGgei2hqIsTWgoxsKVQ2qPpVZ8vSi/IBXMvgHPFqmDfP+0dBEQc4tQXl1luf+P+pxESV+ckMeFzCnlETk4PBLuvrLzxtpUcC12vHOV3vOpRSJ3OpVukvRVdv62vCy+kRyuNaqACIwPmCBhfE7yW1HzvQitZpb5ssCL7kKobWUjtGxILOxmkzdG+5HrWyZZHWTvCT9mrTDqyrSBF+cuJfj497o+oJCnbJLmTNaDfsJJQwLYqQxWnKyAf8Q7l0JOH3iBC/JQQIup3TDcbGyTHeq87G0Uz8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YBbW2es+zEVxi1PJa2RuUXYr8tKyOCXV1lnyjw2zDHU=; b=hDNSVfSHodI6fmkCCCrqub1BAWWY+cKPEn/wtZJHLjBlpZLnMC3LlEmovuyar+eHfVVPtMvPGF2h/4akzf+65n+MJ3PFtOndazH+fgzcKpwq3CRHazbawtVaEx6chyLQZgYSGTdnw/fAn8NdzzeO80MmYMIGxUrit6Qal1PqlULOlDf8Hcm3uD51TYTQUInnza04NCRJHp18TkclcZWYzCWyVTnVQ4l4Z4ru8au3XJh3N9MXweO/Nx79of4t9GaAgtnyCP1TWEbYYFvDpRO3WYJBw1F7jKLRl+VgFmhiMXvtdOcZNH5XyNUvZlAJHqv/joyvf0qFDCQLWySpwSs56w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (10.152.16.51) by AM5EUR03HT010.eop-EUR03.prod.protection.outlook.com (10.152.16.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Sun, 1 Sep 2019 16:14:40 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Sun, 1 Sep 2019 16:14:40 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87]) by AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87%5]) with mapi id 15.20.2220.021; Sun, 1 Sep 2019 16:14:40 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH 3/5] drm: dw-hdmi: update CEC phys addr and EDID on HPD event Thread-Topic: [PATCH 3/5] drm: dw-hdmi: update CEC phys addr and EDID on HPD event Thread-Index: AQHVYOBbQpm/ZMlRykOhaECOU9r4vA== Date: Sun, 1 Sep 2019 16:14:40 +0000 Message-ID: References: <20190901161426.1606-1-jonas@kwiboo.se> In-Reply-To: <20190901161426.1606-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0022.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::32) To AM0PR06MB4004.eurprd06.prod.outlook.com (2603:10a6:208:b9::12) x-incomingtopheadermarker: OriginalChecksum:1F463C3D5BCABB046F9B08A9F9A9F40717038D88F37E3A3E8C7A6F2C4358B9BD; UpperCasedChecksum:F0FC40B25BB6A19D03E18C0A4EE87F0CA72A035A82E5C8BF327C10A3133D4FF3; SizeAsReceived:8000; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [liv2rWy4Iqf8mgR7TuwgLhMEU2c1XhDZ] x-microsoft-original-message-id: <20190901161426.1606-3-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR03HT010; x-ms-traffictypediagnostic: AM5EUR03HT010: x-microsoft-antispam-message-info: CpBoPcxYXPGfvClL52zJAtARGuaXXSmUVZ2TzMwe5YSBrlyv7B5a8rLJuM4Fgl/wotl0k57z/9CieXw9QAWzSOPZE1ZjLwwkOv6WUCtptqxH+oP5n5DMCcQSRXU0RqRgYa+FOlffR+QENfserfhVP2T0VluVqkJ/ruWImFlhpRcWVCQT8/bXTi+LvoflHeDk x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: c5a36b18-5bcd-41a9-d563-08d72ef77e07 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2019 16:14:40.5565 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT010 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Hans Verkuil , Laurent Pinchart , Sean Paul , Jerome Brunet Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update CEC phys addr and EDID on HPD event, fixes lost CEC phys addr and stale EDID when HDMI cable is unplugged/replugged or AVR is powered on/off. Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 91d86ddd6624..0f07be1b5914 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2189,6 +2189,7 @@ static int dw_hdmi_connector_update_edid(struct drm_connector *connector, static enum drm_connector_status dw_hdmi_connector_detect(struct drm_connector *connector, bool force) { + enum drm_connector_status status; struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); @@ -2198,7 +2199,14 @@ dw_hdmi_connector_detect(struct drm_connector *connector, bool force) dw_hdmi_update_phy_mask(hdmi); mutex_unlock(&hdmi->mutex); - return hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); + status = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); + + if (status == connector_status_connected) + dw_hdmi_connector_update_edid(connector, false); + else + cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); + + return status; } static int dw_hdmi_connector_get_modes(struct drm_connector *connector) @@ -2438,12 +2446,6 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id) dw_hdmi_setup_rx_sense(hdmi, phy_stat & HDMI_PHY_HPD, phy_stat & HDMI_PHY_RX_SENSE); - - if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) { - mutex_lock(&hdmi->cec_notifier_mutex); - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); - mutex_unlock(&hdmi->cec_notifier_mutex); - } } if (intr_stat & HDMI_IH_PHY_STAT0_HPD) { From patchwork Sun Sep 1 16:14:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11125479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4498D14E5 for ; Sun, 1 Sep 2019 16:14:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C122233A2 for ; Sun, 1 Sep 2019 16:14:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C122233A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B5A2898F0; Sun, 1 Sep 2019 16:14:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072065.outbound.protection.outlook.com [40.92.72.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7FDEB895D7 for ; Sun, 1 Sep 2019 16:14:43 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQz4wZyNJrmnGXCDKOXuoiHHuvldMnNO2Z7HdgUzvjDWKiWBUDbEEiJ6v3NXfN/5LXPs0wLSxjnGzkmW7AAMhUn1F3g7+afvTp1BZcq5rBqmIcXU6pq0ri0gjK5SmyHi2v0hnyVFOCBIHS24qBCz70o13zLGJbStabL5iBk5FM8xa+6FwLE5dSnfVqJE5QYR/wFkHFfqmI9pQ31SKv/ZwCC2spQkjcY5jJM0N4+NAjYTANmxwpCG5roy96Qs3/uviv1O+A/NdaCxqp7DHhMBXzbsSo2U3knKI8ULh8b/X2wRxeyneoF538IcT1g9E9hjI1aD18Q7iLuEeZA3in5hZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N7+j1nmikidvbNuu5X4+/mCMSmolAUwcL80L9V6+pUk=; b=lSd3XQDB93uMb76BrL6t7PZJkAwbjvUQGlVvVXgv3HBmLSQiq0ALwBqKxnML/oiRP5DD4CofVJYiSexrbwpCNL5jRseGG60PgxGrkXV5UXp245O0UloezZCk6jwuQJ8lIcOyFYOV9fvljXWM8U62elx1NhON/JNJcEYSeohKgD1QarvRleluypjad3AaIyjetl7yHC8ucpmOzaPdDrgdz26xUo2Hn/AFcavHBusq+8i07HP+Kv66oP9dZEpVO0qMqXjVPANY5kEJUk2vH2XlDTc+BjdTbIlu4eAG7BgNavX5gI6THrR+0i+rzNtQGXd+PwShum6D6rbF7usa3W1oUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (10.152.16.51) by AM5EUR03HT010.eop-EUR03.prod.protection.outlook.com (10.152.16.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Sun, 1 Sep 2019 16:14:42 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Sun, 1 Sep 2019 16:14:42 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87]) by AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87%5]) with mapi id 15.20.2220.021; Sun, 1 Sep 2019 16:14:42 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH 4/5] Revert "drm/edid: make drm_edid_to_eld() static" Thread-Topic: [PATCH 4/5] Revert "drm/edid: make drm_edid_to_eld() static" Thread-Index: AQHVYOBcGargGv3pdUKSwYRRFKPbWw== Date: Sun, 1 Sep 2019 16:14:41 +0000 Message-ID: References: <20190901161426.1606-1-jonas@kwiboo.se> In-Reply-To: <20190901161426.1606-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0022.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::32) To AM0PR06MB4004.eurprd06.prod.outlook.com (2603:10a6:208:b9::12) x-incomingtopheadermarker: OriginalChecksum:A876AAF0C97CFF5DEEAEDE94252B9F3B16BFE03E299D28D6D889942E980504EE; UpperCasedChecksum:A2A9ED068A7714748BDC405D4FD51D91EA52804D0B81BDF848E961FB1FEB78D7; SizeAsReceived:7997; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [jsfD4U4z9ssKIvMd5aUK+zRaIHoInldo] x-microsoft-original-message-id: <20190901161426.1606-4-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR03HT010; x-ms-traffictypediagnostic: AM5EUR03HT010: x-microsoft-antispam-message-info: D1eB9Lp9oz3SLvTRK0Uiy4yyhGP0QuwAU85eub396NwfCbpYDlBZuVWhIpFokAe9lldeThJZkA/KkqrQpHaoXqtANY66CmSvSZpnAuRwCnAjgSgoLdYXB2jfNDrR/bh65dc2mMQgnPGdVrrHVg/7m31vvm0IjR1QXz4tUuylPnQ/hVdBMIpvpFPj1J1z6r45 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: c0453a07-a331-48d7-bb60-08d72ef77eb8 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2019 16:14:42.0566 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT010 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Hans Verkuil , Laurent Pinchart , Sean Paul , Jerome Brunet Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_edid_to_eld() is needed to update stale connector ELD on HPD event. This reverts part of commit 79436a1c9bcc ("drm/edid: make drm_edid_to_eld() static"). Signed-off-by: Jonas Karlman --- drivers/gpu/drm/drm_edid.c | 5 +++-- include/drm/drm_edid.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 82a4ceed3fcf..47c409af0903 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -4069,7 +4069,7 @@ static void clear_eld(struct drm_connector *connector) connector->audio_latency[1] = 0; } -/* +/** * drm_edid_to_eld - build ELD from EDID * @connector: connector corresponding to the HDMI/DP sink * @edid: EDID to parse @@ -4077,7 +4077,7 @@ static void clear_eld(struct drm_connector *connector) * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The * HDCP and Port_ID ELD fields are left for the graphics driver to fill in. */ -static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) +void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) { uint8_t *eld = connector->eld; u8 *cea; @@ -4162,6 +4162,7 @@ static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) DRM_DEBUG_KMS("ELD size %d, SAD count %d\n", drm_eld_size(eld), total_sad_count); } +EXPORT_SYMBOL(drm_edid_to_eld); /** * drm_edid_to_sad - extracts SADs from EDID diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index b9719418c3d2..49987818fe23 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -337,6 +337,7 @@ struct drm_connector; struct drm_connector_state; struct drm_display_mode; +void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid); int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads); int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb); int drm_av_sync_delay(struct drm_connector *connector, From patchwork Sun Sep 1 16:14:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 11125481 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF43C14DE for ; Sun, 1 Sep 2019 16:14:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B706E21872 for ; Sun, 1 Sep 2019 16:14:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B706E21872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kwiboo.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AC6889862; Sun, 1 Sep 2019 16:14:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071045.outbound.protection.outlook.com [40.92.71.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 57BD689862 for ; Sun, 1 Sep 2019 16:14:47 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dCBFol1FSo+jVaGGeDDFGryn1DV7XxRrKzg+jynplZfH/X331wW6694G89oMx5QnIwq6+tFbz6uih2MwbGLYZiiDqx92flwgcRQXEDc9r8yVNaIRAADSpk+uRuBZ5UF9Gq0ptQSqK+GeaFnbe9rV/1INHTEdJwwCsEmI0bf3R1W1LPtKlhsPSr4Q86EoPUsWH4IEGK8nGa9oFcPwCf3ieX1LR0Suzt9zGqQtyYJ99tfiaqCuJigYXvLMeABDwG87d33uasNPSGQMUxbADKP69CE6h6GPyPF0AaobLjYgQKYgt4iPt+n1CPU6tOlL6v+/jRjBcf9Djwnkucb2UAB6Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5tVyJsnYu/muSVK4U3I+XApY3wyLPrfPJchIW7TdulA=; b=VC6zOzDn46MIcsx6ke1dD+7AB+2srx5f/sr6eXYV2CCRWR/undN2iiOoV0vGhusqCyeaz0pNyqgsUCRqjYXY9PrzcIIdvEDnDQnlghtED8DaFNPtMGcLHGa5CZsS3Nn29nNemMfqaNYsmjLi0uNnkMYnJ2aZqdbQPbV23Y+xTPSOqqldAUHie0QXxEKWf35ULH6E3sOhq2WRJTAiZfGrtZtMURBuBjNieH8XN7B6DJY+wPh136YK39K5r/MKk7aKiBjXHYIp3M9C4zHcUsbpVFCzYt7Mt7wF9sVXUfcZxcblxLHTd2kVunPNN0IA2qJ9qAeLAhxGCK0EpsNmZx8yPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (10.152.16.54) by AM5EUR03HT176.eop-EUR03.prod.protection.outlook.com (10.152.17.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Sun, 1 Sep 2019 16:14:43 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Sun, 1 Sep 2019 16:14:43 +0000 Received: from AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87]) by AM0PR06MB4004.eurprd06.prod.outlook.com ([fe80::f13e:4f8e:6777:bb87%5]) with mapi id 15.20.2220.021; Sun, 1 Sep 2019 16:14:43 +0000 From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong Subject: [PATCH 5/5] drm: dw-hdmi: update ELD on HPD event Thread-Topic: [PATCH 5/5] drm: dw-hdmi: update ELD on HPD event Thread-Index: AQHVYOBdkwNWYL4fs06Sbdhw7LQShQ== Date: Sun, 1 Sep 2019 16:14:43 +0000 Message-ID: References: <20190901161426.1606-1-jonas@kwiboo.se> In-Reply-To: <20190901161426.1606-1-jonas@kwiboo.se> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0022.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:bc::32) To AM0PR06MB4004.eurprd06.prod.outlook.com (2603:10a6:208:b9::12) x-incomingtopheadermarker: OriginalChecksum:19D77B1354EF3F02A9F8EE716E58885A525A7D27BB7CEB51996A298DCAEFA5DC; UpperCasedChecksum:63B0D6274CA04E015BA5AB2DFE8D3B7ECAACA3DEAA6B5846DC6F94129B9FAEE6; SizeAsReceived:7959; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [LDAB+wgiQHiH+8AK7nSWcgFSAtLnhZUO] x-microsoft-original-message-id: <20190901161426.1606-5-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR03HT176; x-ms-traffictypediagnostic: AM5EUR03HT176: x-microsoft-antispam-message-info: 4RjpoEJcrk89gZdtEgSA2WDDlSbvxUtvPpx7urS02vhxKE1DqVA+6XLkb4KxOSr1ULDKywsEW5u+WHmd8zGG+2mvnqv5axP0KDrQ9whXMsQ+0XQ1xinsuMlGPmJ0RpnQtVc3NQUlFKFE4IyOyA4U9mbDa4f4zvs3FGRXs3TOSpGIvZuTpM214uOr+tPLu9H3 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 281d4fbc-de83-47ac-359c-08d72ef77fd6 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2019 16:14:43.6576 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT176 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Hans Verkuil , Laurent Pinchart , Sean Paul , Jerome Brunet Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update connector ELD on HPD event, fixes stale ELD when HDMI cable is unplugged/replugged or AVR is powered on/off. Signed-off-by: Jonas Karlman Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 0f07be1b5914..0a8268b20561 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2178,6 +2178,8 @@ static int dw_hdmi_connector_update_edid(struct drm_connector *connector, cec_notifier_set_phys_addr_from_edid(hdmi->cec_notifier, edid); if (add_modes) ret = drm_add_edid_modes(connector, edid); + else + drm_edid_to_eld(connector, edid); kfree(edid); } else { dev_dbg(hdmi->dev, "failed to get edid\n");