From patchwork Tue Jan 23 19:37:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13528088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E2DC4C47258 for ; Tue, 23 Jan 2024 19:39:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDD6110E886; Tue, 23 Jan 2024 19:39:39 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id C7F8710E886 for ; Tue, 23 Jan 2024 19:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706038778; x=1737574778; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3bi336qNdVKLv7Oe0t6dIo7X3g/wOyaVBYR60m//wzc=; b=a3IP7BTM9C5ytPalBgh6peaSbEevQhBxrQVY9emqScG0U78RwgIn6/pC tD8WyErJ/u5yJNuCHfLorEZzxhJmiL1wn9dhF4+ov1ojADzBmAYRQwWUe PDkm1Cv0I2bGEd8ShWC1u2hB5JyBtLViXoKjHHbp7C6d3Jz85aBw3fkqD bmXb9Z21y1dmgGhIXAKP4m27wycTjzwqzCCRdbGYpzTTNjG3O5rq2oe3h YdEfz7kupiAEL3UCnKbtkrGHiNSRML15IysQwQQ4E6WoYrPSMhEbqaNZX Z9EbbhqdLBYMbaW9uXVsTGb86he5XnuX4rZcN0bJ+Z9smr5w4V9ByohLU Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="14980639" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="14980639" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 11:39:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="820212809" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="820212809" Received: from pzsolt-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.40.183]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 11:39:28 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Subject: [PATCH v3 16/39] drm/bridge: cdns-mhdp8546: clear the EDID property on failures Date: Tue, 23 Jan 2024 21:37:22 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" If EDID read fails, clear the EDID property. Signed-off-by: Jani Nikula --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index e44cb89c33f0..e226acc5c15e 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -1524,12 +1524,14 @@ static int cdns_mhdp_get_modes(struct drm_connector *connector) return 0; drm_edid = cdns_mhdp_edid_read(mhdp, connector); + + drm_edid_connector_update(connector, drm_edid); + if (!drm_edid) { dev_err(mhdp->dev, "Failed to read EDID\n"); return 0; } - drm_edid_connector_update(connector, drm_edid); num_modes = drm_edid_connector_add_modes(connector); drm_edid_free(drm_edid);