From patchwork Tue Jan 23 19:37:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13528073 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 6B2D5C47258 for ; Tue, 23 Jan 2024 19:38:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5BA310E843; Tue, 23 Jan 2024 19:38:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C93710E83A for ; Tue, 23 Jan 2024 19:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706038688; x=1737574688; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T7GMpre8EsGHdJoSALkKVEwv0VlV55UK24ycs4Xs/9Q=; b=esvd5Dw7LcE9kmEtuBfTAbQFRnpxD7TGNszEGa6Xg0jAgj7hVGGWCzvd Ste157vstR8V8hq7RuApQR9p0iZm3eRm9eZszo7XWk1tBmqdXvWT0xBZt U49/ZItdP/uUyh81DpWlfXgExGpKYqugHVo7kUT4Ip7C5jFGO+gHoj1eC 4z8xmkY0QNEF5xNwbjYuBjsVuy4JNWu0QCAqNs/2MgcglrhP/Qp2Hng9S 68DRozYt0IT/HkZUWvQ59l0zZnI1rlQHrwb4osNtrcJLT0+HDUw1p+tcz sDhmI1oCe5S4U7+MVrdUXTdZgAdzl5o87NSB31JENBqwUf6zNe6f+bqVk w==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="14980271" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="14980271" 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:38:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="820212486" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="820212486" 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:38:05 -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 03/39] drm/bridge: chrontel-ch7033: switch to drm_bridge_read_edid() Date: Tue, 23 Jan 2024 21:37:09 +0200 Message-Id: <51691a606671d46696c0f1ab9492e6a1b691457b.1706038510.git.jani.nikula@intel.com> 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" Prefer using the struct drm_edid based functions. Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Jani Nikula --- drivers/gpu/drm/bridge/chrontel-ch7033.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/chrontel-ch7033.c b/drivers/gpu/drm/bridge/chrontel-ch7033.c index 483c28c7fc99..c83486cf6b15 100644 --- a/drivers/gpu/drm/bridge/chrontel-ch7033.c +++ b/drivers/gpu/drm/bridge/chrontel-ch7033.c @@ -230,14 +230,14 @@ static const struct drm_connector_funcs ch7033_connector_funcs = { static int ch7033_connector_get_modes(struct drm_connector *connector) { struct ch7033_priv *priv = conn_to_ch7033_priv(connector); - struct edid *edid; + const struct drm_edid *drm_edid; int ret; - edid = drm_bridge_get_edid(priv->next_bridge, connector); - drm_connector_update_edid_property(connector, edid); - if (edid) { - ret = drm_add_edid_modes(connector, edid); - kfree(edid); + drm_edid = drm_bridge_edid_read(priv->next_bridge, connector); + drm_edid_connector_update(connector, drm_edid); + if (drm_edid) { + ret = drm_edid_connector_add_modes(connector); + drm_edid_free(drm_edid); } else { ret = drm_add_modes_noedid(connector, 1920, 1080); drm_set_preferred_mode(connector, 1024, 768);