From patchwork Thu Jun 6 07:38:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Harish Chegondi X-Patchwork-Id: 10978763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70FB476 for ; Thu, 6 Jun 2019 07:38:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62EFF1FFCD for ; Thu, 6 Jun 2019 07:38:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56CB620564; Thu, 6 Jun 2019 07:38:04 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 F2E9F1FFCD for ; Thu, 6 Jun 2019 07:38:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C502E892D6; Thu, 6 Jun 2019 07:38:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F19289873 for ; Thu, 6 Jun 2019 07:38:01 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2019 00:38:01 -0700 X-ExtLoop1: 1 Received: from hchegond-ivm.ra.intel.com ([10.54.134.59]) by orsmga002.jf.intel.com with ESMTP; 06 Jun 2019 00:38:00 -0700 From: Harish Chegondi To: intel-gfx@lists.freedesktop.org Date: Thu, 6 Jun 2019 00:38:00 -0700 Message-Id: <20190606073800.64781-1-harish.chegondi@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC] drm: Do not call drm_probe_ddc() when connector force isn't specified X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This would allow the EDID override to be handled correctly in drm_do_get_edid() for cases where EDID data is missing or corrupt. All drm_probe_ddc() does is call drm_do_probe_ddc_edid( , , , 1) which probes the display by reading 1 byte of EDID data via I2C. This patch removes the call to drm_probe_ddc() from drm_get_edid() but drm_get_edid() calls drm_do_get_edid() which first handles the EDID override case and then calls drm_do_probe_ddc_edid( , , ,EDID_LENGTH) via function pointer argument get_edid_block. So, the display device is still being probed by reading EDID_LENGTH bytes of EDID data via I2C. Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Harish Chegondi References: https://bugs.freedesktop.org/show_bug.cgi?id=107583 Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_edid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index d87f574feeca..41c420706532 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1724,9 +1724,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);