From patchwork Sat Feb 10 18:03:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10211943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48A6660153 for ; Mon, 12 Feb 2018 07:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CA25288F1 for ; Mon, 12 Feb 2018 07:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31AB428C03; Mon, 12 Feb 2018 07:52:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3172B288F1 for ; Mon, 12 Feb 2018 07:52:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A3C0F6E0C6; Mon, 12 Feb 2018 07:52:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 591 seconds by postgrey-1.36 at gabe; Sat, 10 Feb 2018 18:14:13 UTC Received: from shell.v3.sk (shell.v3.sk [92.60.52.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01D3D6E0B7 for ; Sat, 10 Feb 2018 18:14:13 +0000 (UTC) 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 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 X-Mailman-Approved-At: Mon, 12 Feb 2018 07:52:04 +0000 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: Lubomir Rintel , David Airlie , linux-kernel@vger.kernel.org, Jani Nikula , Daniel Vetter MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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);