From mboxrd@z Thu Jan 1 00:00:00 1970 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 E77C1C54F32 for ; Wed, 28 Aug 2024 12:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ftRdv0MLU+3ijXVFoJmvVkSok6Tm8Wviwpu9Wkm/YDY=; b=l6VUy0c8dHdWg72XHXOJuHacl4 t4QphFWEoZTQs37jg4ISUKcoy9fF6+/7CxzJ6inqRrMqALf/cbIxzuti45ZCvG0s2uA9y1d5tJ7ja yd5hpp8KAiwGQqE3KKiXTaRuzyW0fgsZzJ3xjTKFlS/QIHuMOTVpJEgwKVPAQMG3ywSHjJHKid6AV AjvG5zjQu7t0yZ0kJhMZ48xa9Fu3xbnVCnbfCHtpNtrRjS77cFgcGHS4absyk9TpMwv95OUaqklFD 84fZeivIycWIphMzPfC/clTRZGuJSI8sbL6kFFn9lClowOJ+SBO+TzqqIiH5YiYHw9Py6puvMudpb RbVUH9+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjI6e-0000000FNvs-1VVx; Wed, 28 Aug 2024 12:49:00 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjI3i-0000000FNPB-1znF for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 12:46:00 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4280bbdad3dso57198355e9.0 for ; Wed, 28 Aug 2024 05:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1724849157; x=1725453957; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ftRdv0MLU+3ijXVFoJmvVkSok6Tm8Wviwpu9Wkm/YDY=; b=XbSDbDinr7hBZr2Tr45rZWCLtabEhP6c1PF2melhdNcbCMTYWTzN+1QhBoDe1WIYj8 Wd0MrFZIkY8RjHZttqAPe1kfrRdRY+ROcCDO8d0v9em3ZhYIdQKgvPVLEnYR/PhxKSaU HHREwBtjXpyibOUTbF7KwEDinQsMmV39zVnhE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724849157; x=1725453957; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ftRdv0MLU+3ijXVFoJmvVkSok6Tm8Wviwpu9Wkm/YDY=; b=nmIM4oy5mpGFPVn4Wi37Ih22naWwflg6dgP+kAMcrVoGPazxxpbGjafED2yFGluPIf 6/uW/uK81TxapJCCc7INFIYFql5tWxsP23oXqCmkLgcnYH7V76DLn90oZxIOmy+VeH0x GqWkasxQFgobehK0oyzEpBara2dUHh1/vNN+Cw/4PpFcMBNytzKaoTUvjj7HiMFzViab SKsZftLWJimGRClKBQhSMkIAes2z12b8NDDNiov7zL3Sv+ZEp86bxQQUHkTzzS1MolcH y8XWsx0/tnZPuXV9LXOhdrONXfX6MxzBRMiLhzGaMgC7/kjPMSHASzKNZeSLdsVZ1vM0 5k8Q== X-Forwarded-Encrypted: i=1; AJvYcCVzg1UR+HYuOp5ktdDVS3CtQCEgcTsflRMkzSqPr0e+S5fa7gwSryoU12xNZzpFbmj5vU1tuMYuZok7ne8OQQC8@lists.infradead.org X-Gm-Message-State: AOJu0YwKCPK4c5SZ9Zgehr01Zhtt3KiCDll7O0U1Q7XHuLYudPYKyGt7 EMfgCuQ1QhuP8glz347x8n05OCw0wbhEix61GFp0bdKhRVoxk0KRNcNuIcv7GEA= X-Google-Smtp-Source: AGHT+IHJLuY388mFQiWhVPxgkqgSy18vMCcZhNzc2YHb6bAZ5VajwOyWWRJA7igX6fSAvH8sZu1CAw== X-Received: by 2002:a05:600c:3514:b0:426:51dc:f6cd with SMTP id 5b1f17b1804b1-42acd57a01dmr123145165e9.18.1724849156478; Wed, 28 Aug 2024 05:45:56 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ba63a53f9sm20899835e9.12.2024.08.28.05.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 05:45:56 -0700 (PDT) Date: Wed, 28 Aug 2024 14:45:54 +0200 From: Daniel Vetter To: Jani Nikula Cc: dri-devel@lists.freedesktop.org, Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 3/6] drm/exynos: hdmi: convert to struct drm_edid Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 6.9.12-amd64 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_054558_539875_616CA2D3 X-CRM114-Status: GOOD ( 25.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 22, 2024 at 08:42:49PM +0300, Jani Nikula wrote: > Prefer the struct drm_edid based functions for reading the EDID and > updating the connector. > > The functional change is that the CEC physical address gets invalidated > when the EDID could not be read. > > v2: > - display info usage was split to a separate patch > - check drm_edid_connector_update() return value > > Signed-off-by: Jani Nikula > > --- > > Cc: Inki Dae > Cc: Seung-Woo Kim > Cc: Kyungmin Park > Cc: Krzysztof Kozlowski > Cc: Alim Akhtar > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-samsung-soc@vger.kernel.org > --- > drivers/gpu/drm/exynos/exynos_hdmi.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c > index 25d508b25921..c9d4b9146df9 100644 > --- a/drivers/gpu/drm/exynos/exynos_hdmi.c > +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c > @@ -884,14 +884,21 @@ static int hdmi_get_modes(struct drm_connector *connector) > { > struct hdmi_context *hdata = connector_to_hdmi(connector); > const struct drm_display_info *info = &connector->display_info; > - struct edid *edid; > + const struct drm_edid *drm_edid; > int ret; > > if (!hdata->ddc_adpt) > goto no_edid; > > - edid = drm_get_edid(connector, hdata->ddc_adpt); > - if (!edid) > + drm_edid = drm_edid_read_ddc(connector, hdata->ddc_adpt); hdmi_create_connector seems to set up the right ddc already, so I think drm_edid_read should be working. With that: Reviewed-by: Daniel Vetter > + > + ret = drm_edid_connector_update(connector, drm_edid); > + if (ret) > + return 0; > + > + cec_notifier_set_phys_addr(hdata->notifier, info->source_physical_address); > + > + if (!drm_edid) > goto no_edid; > > hdata->dvi_mode = !info->is_hdmi; > @@ -899,12 +906,9 @@ static int hdmi_get_modes(struct drm_connector *connector) > (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), > info->width_mm / 10, info->height_mm / 10); > > - drm_connector_update_edid_property(connector, edid); > - cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); > - > - ret = drm_add_edid_modes(connector, edid); > + ret = drm_edid_connector_add_modes(connector); > > - kfree(edid); > + drm_edid_free(drm_edid); > > return ret; > > -- > 2.39.2 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch