Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1048352ybm; Wed, 27 May 2020 14:53:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGorU2tm3vC05dXyOVfdt+LD1YCwg51S51vZiD0YPkjNzzJ+QYSuxdbHdjlbNb+ikiPdti X-Received: by 2002:a05:6402:959:: with SMTP id h25mr160172edz.287.1590616380205; Wed, 27 May 2020 14:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616380; cv=none; d=google.com; s=arc-20160816; b=QQeyWp7vAAiMp9oU6lTzUDJGEkaLnUZB9o+W7uxoias0rEgDXVdI6nSgzDAT+Am4UY BjwEcBX0ndNWT2ZEGGjkVa7QbjUVV7aMJK7Lihx0v6pRR2uYy66SO74Aj1N5Ny6heRxP i5paJb0e7xZVYc7IqUvl/lLzxwphAHQZd+3vIUx3CcOePeqfl9iWKbpw7ypVP2pwO0pt Y8GEhOQPGLG5QP6F+wGzWrTKeoE8r0k9/qzsedaO7OKTL0vXP8B4fZzl+ru5D3aTxlDj l59vMc6zCeXno/xAu/MXEHYajm8qxQcbi4vi9/GUhBS0vJK/admTO9DG+J1hknRUSXhu AK4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=80e9RnD9Ss8eOafGm0SPCkZYoQv72dsa4vHL2CNUsTI=; b=wbIs67ifHvGTUkIL/ddUkpawNxc+RRWl6tYwtlI0nr0iCPYQRZGeCo73JtLeJhtebP A595YPlBVTIXvc5mQ+I6dxch4hSVVFa1MoKw+RBXOhLmy8uQt+c25SAGuw4GwWI/MDxY 6z4ommicOMnAZe+fYc6GwodAYK+p7CKklfNtMiy4lpSm03oGg11FcK0CsnIf0f0Ph+KI IDWw5NlLvbQ5Mc2phD5VCVyAyKUpK7mvhxq36MxZAbe2U3Pn3ACcdzcSyPUNAiOZjY4V zT+dmUKh0TOKSuytBX8h88Ln+XyIkuRJ9UtUiElXNpaaRkIxANC9XiUZkrxMzKPbEH29 F/XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b=QN1siCcU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si2257652edt.279.2020.05.27.14.52.37; Wed, 27 May 2020 14:53:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b=QN1siCcU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbgE0SsR (ORCPT + 99 others); Wed, 27 May 2020 14:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726459AbgE0Srg (ORCPT ); Wed, 27 May 2020 14:47:36 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 372D7C008638 for ; Wed, 27 May 2020 11:41:37 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id m18so30182510ljo.5 for ; Wed, 27 May 2020 11:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anholt-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=80e9RnD9Ss8eOafGm0SPCkZYoQv72dsa4vHL2CNUsTI=; b=QN1siCcUywmiFL5b2l7OO2oJrFZjy0oVoG39jF8U3zH1k9rEEmuBmleEe7rSCXVq9b QDK/ZQZSsIFtjtyqvUKUGZpDAKKGE4YXN8HrzpU0lJnDxfXUnAFWPaerCMwA/UkQaGq6 NV6pwJVvRp8hgN5+JK1UdeoLeCp6e0a+/V5iE7yug/9UO4hqzlfLKMTtQBJjCHMPkpgM gSOMNRg8jwdPUo7jOdYjVE95+JviMtUNl2EJK784jiP4U2WAA6mUOgpjejHB3we1xTko lpHOf2J4ipaoutCd2b80OURfvWweVQlY47Ga3y1MboXT4o7ZqhvVwpWG0R0EOVn86EpA 5Adw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=80e9RnD9Ss8eOafGm0SPCkZYoQv72dsa4vHL2CNUsTI=; b=ns/m4BkiKYrnzGTrKtqnMUvDWQF/VYfyi47tMQLBWR+KPhw1skNaDrDKkjr3GRCZGJ o8IYTRDDo2EZVzihyx3U+yahpmTypgydVecUmiNSpfbBPtjs6PqPcq1sXVwX2ns7KSml nDsKBLHlvEW9sTO1cjOKarJV6FCRliMRhgw0eR3iYcWZR0Uy1VxVGep2JLvor0YXfAQF 07oGbVMCVfHgHlNOudkw0vQX/GN1xIW2khUemgVk0DXypsllk2ewfNCfPYM4qwtV38yj 8G8M8wjd4eGdSuwqpHaugMLlTM59CzNuA7XKsI7PSyhTir+vgUo3sWSEGnrQBPPFPvSC 5PoQ== X-Gm-Message-State: AOAM533TDJ66uzNySvH11JOQTImwvWc4oe6EaKVQIf02b7sQlCzA3f/o /2eyxbskulZoCnC+S94eMbF74M9aD5KFJO4yQTpGlQ== X-Received: by 2002:a2e:8186:: with SMTP id e6mr3868617ljg.252.1590604895724; Wed, 27 May 2020 11:41:35 -0700 (PDT) MIME-Version: 1.0 References: <020de18840a1075b2671736c6cc2e451030fad74.1590594512.git-series.maxime@cerno.tech> In-Reply-To: <020de18840a1075b2671736c6cc2e451030fad74.1590594512.git-series.maxime@cerno.tech> From: Eric Anholt Date: Wed, 27 May 2020 11:41:24 -0700 Message-ID: Subject: Re: [PATCH v3 070/105] drm/vc4: hdmi: rework connectors and encoders To: Maxime Ripard Cc: Nicolas Saenz Julienne , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2020 at 8:51 AM Maxime Ripard wrote: > > the vc4_hdmi driver has some custom structures to hold the data it needs to > associate with the drm_encoder and drm_connector structures. > > However, it allocates them separately from the vc4_hdmi structure which > makes it more complicated than it needs to be. > > Move those structures to be contained by vc4_hdmi and update the code > accordingly. > @@ -1220,7 +1219,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) > struct drm_device *drm = dev_get_drvdata(master); > struct vc4_dev *vc4 = drm->dev_private; > struct vc4_hdmi *hdmi; > - struct vc4_hdmi_encoder *vc4_hdmi_encoder; > + struct drm_encoder *encoder; > struct device_node *ddc_node; > u32 value; > int ret; > @@ -1229,14 +1228,10 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) > if (!hdmi) > return -ENOMEM; > > - vc4_hdmi_encoder = devm_kzalloc(dev, sizeof(*vc4_hdmi_encoder), > - GFP_KERNEL); > - if (!vc4_hdmi_encoder) > - return -ENOMEM; > - vc4_hdmi_encoder->base.type = VC4_ENCODER_TYPE_HDMI0; > - hdmi->encoder = &vc4_hdmi_encoder->base.base; > - > hdmi->pdev = pdev; > + encoder = &hdmi->encoder.base.base; > + encoder->base.type = VC4_ENCODER_TYPE_HDMI0; Wait, does this patch build? setting struct drm_encoder->base.type = VC4_* seems very wrong, when previously we were setting struct vc4_hdmi_encoder->base.type (struct vc4_encoder->type). Other than this, patch 68-78 r-b.