From patchwork Tue Apr 16 13:22:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13631810 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C22EDC4345F for ; Tue, 16 Apr 2024 13:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UQ1Iq+wVdeqI42XpB1JzJ85xcuX3Z57vrxrxzf6I2JQ=; b=lDcTJ/q679oUr9 eK1/8YFLrkrzw1wUptaxWIX/OaOl2j1WpezXVbFPQhqqWj/AFKLK+pw26gRExJUq8GSovCC24qbvz X3Uzki+Cdj71AyLuTWr9ygo+bsF/rI1++GnQrsXnuWEisRgpPHHRTyJPn94w1AGI/3BZy/rglgrOZ 5tSyzBCN3Oy3ZC1Krg/5zymK9I1SGYC4v4sRjz/YALVwENShHVz8TTqeJcEHD80pUY26rumqkCZ5m c27KKcxDkYpVVfchgr4zREWdSjIM9Q/VEOrWD0ID8qeHLNAYPB3ZpC0i1WIyKsQ27lumDc6Bnfv4T qJgSvOKvvT4RlJS1OxYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwin7-0000000CIJe-0zN8; Tue, 16 Apr 2024 13:24:05 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwimr-0000000CIAE-2BBq; Tue, 16 Apr 2024 13:23:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713273830; x=1744809830; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5nXrXIDLBlKi4Z6zegaSBQ/zMeZdxeF3Ujvn8Hi1gnk=; b=EK3RQMTSE11G29MPeyBgJSfIxC4QL50IywIDoUOjgM411ubSsW9uoiu0 FHgrUV0tKc1QcRFJcROvhYD+eRgVFdojIvdMKodn6hxSEr21dqYbXQJCX ec/a36A/RP3/fvrWdZUZsPimRGhpoWCVaGjl5cx4RWjMiPtQgIH8LDVdy Y3JOzhcXMKOvYKRrgfAfPvGQTB9eVKac51GaHvxmBeZnh/XlJKSaA6EiK hVGQaDBNz0S2bzr7yW8JOWTC4HF7HChk3SxHf1TRQ1Yw4z3Kh6fWAMni8 lQ4IcaxnkXchmxNYlOraYKYh3MBle6CYGLpq7IaQCoXP0Ga8nf9Ote1kt Q==; X-CSE-ConnectionGUID: EvJE/QMZRFWovDvWnr2RhA== X-CSE-MsgGUID: KS1MuhGtTcGc2lrvLzCniQ== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="31191369" X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="31191369" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 06:23:48 -0700 X-CSE-ConnectionGUID: BovRYRspTR2fPsG8cCa1qw== X-CSE-MsgGUID: aN/gRYSTT62HH5y/HjjR9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="22326162" Received: from martakit-mobl.ger.corp.intel.com (HELO localhost) ([10.252.44.100]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 06:23:45 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: Jani Nikula , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 14/15] drm/rockchip: inno_hdmi: switch to struct drm_edid Date: Tue, 16 Apr 2024 16:22:28 +0300 Message-Id: <1218cb4fd79149c90dc0c82c42ae0c8a36acf055.1713273659.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_062349_701262_03D07295 X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Acked-by: Heiko Stuebner --- Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org --- drivers/gpu/drm/rockchip/inno_hdmi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 1d2261643743..3df2cfcf9998 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -606,18 +606,16 @@ inno_hdmi_connector_detect(struct drm_connector *connector, bool force) static int inno_hdmi_connector_get_modes(struct drm_connector *connector) { struct inno_hdmi *hdmi = connector_to_inno_hdmi(connector); - struct edid *edid; + const struct drm_edid *drm_edid; int ret = 0; if (!hdmi->ddc) return 0; - edid = drm_get_edid(connector, hdmi->ddc); - if (edid) { - drm_connector_update_edid_property(connector, edid); - ret = drm_add_edid_modes(connector, edid); - kfree(edid); - } + drm_edid = drm_edid_read_ddc(connector, hdmi->ddc); + drm_edid_connector_update(connector, drm_edid); + ret = drm_edid_connector_add_modes(connector); + drm_edid_free(drm_edid); return ret; }