Received: by 10.223.185.116 with SMTP id b49csp433233wrg; Sat, 10 Feb 2018 10:15:25 -0800 (PST) X-Google-Smtp-Source: AH8x227SVssTdAX1YFU+f5bffA/k7WNLvzzPcrSXah3cXfTbPthcOQwYvit9iHdZw5h51AiZIgeV X-Received: by 2002:a17:902:5aca:: with SMTP id g10-v6mr6262238plm.334.1518286525158; Sat, 10 Feb 2018 10:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518286525; cv=none; d=google.com; s=arc-20160816; b=A01N/Yg9krl83/J7gXtETn6OYpVB3DQKAxchrzdHI+3JtJs4lLHNIBdLFcCcxrr/PX R+zQ87+AF5fPa4ZOaoxVv64QTZk1xGK+gQI1ZHkA7Bre6mP0hsNyNW5cqqLToPqQR4Pg ZXuqiTMcFbFcpX31qsdUgJaFoTKGGR07BPM94bSshfxCxv+fAdZOYycD77hYw2VxFFkh g/6raZQ0b4J+z6r0wWPSzVfwo9Wiz7uo9aFekg+qzL2BukVPfM/ovX7n/QwLluba6aBt 4k/QRPBot74Wf83qQTgmREZPaPLRXAYm0NscEZusrN7gulYkqJdVujCNfyj50ofw4i9k Psiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=24/JqQyGcZUul4oKjuAJgUDtFF0YigEkSJ2TV/vMhz8=; b=uvsKqxt7ydhLkrLeRW2VFDL6YmoNIQMs6iG/Jz2fDWNDoyHsSCBYwJPDA/t/V3Wuvn nKLhCvnFcj7whyL94sKhP54AZaCJXqtsmHbN/EQ4iLC/3luDAdhU2I8f5UDKT/K+hG3w rEZnwL4FizknlXWFE0vU9qO+llsKFgV2g+QhF/2mkWxzBbtyqehu7ykOFgX+sdI2+4Vx MIqa7m+uPKDeNIi97Z/1f4a8YSCUYG/wz56Mmfqi5E02lQuJgBizYZtZK/OyIBn19V/d 3gnOqcjlzD/uOd6ZwzDzsvriYrlXBPeJAzGVQZ6TbPX01ggtwb3Sr8jUTS05ktVWaVvy nteg== ARC-Authentication-Results: i=1; mx.google.com; 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 be3-v6si1501674plb.398.2018.02.10.10.15.10; Sat, 10 Feb 2018 10:15:25 -0800 (PST) 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; 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 S1751570AbeBJSOO (ORCPT + 99 others); Sat, 10 Feb 2018 13:14:14 -0500 Received: from shell.v3.sk ([92.60.52.57]:59765 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeBJSOO (ORCPT ); Sat, 10 Feb 2018 13:14:14 -0500 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Sat, 10 Feb 2018 13:14:13 EST Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 799889AC1B; Sat, 10 Feb 2018 19:04:19 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0MCQVVF1JZOo; Sat, 10 Feb 2018 19:04:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id DED549AC1C; Sat, 10 Feb 2018 19:04:14 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 363DFLwhZeF0; Sat, 10 Feb 2018 19:04:13 +0100 (CET) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4641F9AC1B; Sat, 10 Feb 2018 19:04:13 +0100 (CET) From: Lubomir Rintel To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, David Airlie , Daniel Vetter , Sean Paul , Lubomir Rintel , Jani Nikula Subject: [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid Date: Sat, 10 Feb 2018 19:03:55 +0100 Message-Id: <20180210180355.2284-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that drm_do_get_edid() handles override and firmware EDIDs it makes no sense to conditionalize it with a DCC probe. On the contrary -- the overrides are useful specifically when DCC is not functioning. drm_do_get_edid() already bails out when DCC fails, there's no need for an extra check. It seems entirely safe to just drop this. Working around the issue by forcing the connector on is not a good solution because that way the desktop shell can't tell when a monitor is plugged in or removed. Cc: Jani Nikula Fixes: 53fd40a ("drm: handle override and firmware EDID at drm_do_get_edid() level") --- drivers/gpu/drm/drm_edid.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index cb487148359a..72169d84256d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1642,21 +1642,6 @@ struct edid *drm_do_get_edid(struct drm_connector *connector, } EXPORT_SYMBOL_GPL(drm_do_get_edid); -/** - * drm_probe_ddc() - probe DDC presence - * @adapter: I2C adapter to probe - * - * Return: True on success, false on failure. - */ -bool -drm_probe_ddc(struct i2c_adapter *adapter) -{ - unsigned char out; - - return (drm_do_probe_ddc_edid(adapter, &out, 0, 1) == 0); -} -EXPORT_SYMBOL(drm_probe_ddc); - /** * drm_get_edid - get EDID data, if available * @connector: connector we're probing @@ -1675,9 +1660,6 @@ struct edid *drm_get_edid(struct drm_connector *connector, if (connector->force == DRM_FORCE_OFF) return NULL; - if (connector->force == DRM_FORCE_UNSPECIFIED && !drm_probe_ddc(adapter)) - return NULL; - edid = drm_do_get_edid(connector, drm_do_probe_ddc_edid, adapter); if (edid) drm_get_displayid(connector, edid); -- 2.14.3