Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp294889ybg; Tue, 28 Jul 2020 06:19:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz1DRJ5UlOicPLXztugVNf3QkCHnynq8PUu/FlgKXMapUa0WOqZnDMTVmP2657lnxG1GzM X-Received: by 2002:a50:f98b:: with SMTP id q11mr10253136edn.359.1595942388672; Tue, 28 Jul 2020 06:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595942388; cv=none; d=google.com; s=arc-20160816; b=DhkosDV79IPrsA1ohP47cMmXPRwQQnFuVCcm7WaO/Sa6PbTtaThadVSOUf626BT6XN 9g20cxQZyw0gA686PNAvdzC6H7y8BDsu3boT7krLW+cOz/bEjuN40g10ULBJPEpocppV p07QjkvGUyFSEM9ifPz8dqSjoHGbp5Fy/sixnTI6P2CfaDhY2n3groHI+xQzukffxGEB ONnrAZfcgofapU/bf3lk4ldXM+zhugCrcNaclvS+Kzc7Cf0c7zvGcMaNHciKpeV7/w8Z 1+6c2E3NTo0EnALqGXoLNCTQ5UM9xSXd5WuAqbZRm8Cu3ryL8tTAIVlcMfe4gDCn5p7d 5mXA== 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=WWdZpdgjdgvXjLWPPue7If3nshivPXisw0K+933QvvQ=; b=ratDsL9LzOwwVDbIicdrH+/T/YVq+MNoQo3Fl2h2OhaNlTFWjYVvxPFx6JvDmiQmoC 1Ngo7GoLqGy2MALJMvVod1iZVFqJADmlmFzOiavXtfsmIsWXx8OSXTUeGeiRki0/nmkP 5G3fx47NDOQ8sV09jxjSP6lBVvdaKpvz9+BPO1ioGtOttMnkY479xEqiZIR9zR6V8fh3 b6h41CGFwg6vEcvLr+2YKQARS1R8W09aWNjzLIhEEFSkYFGEIwXkET6DAnEYIJHKQdWr l2m3ZYWmXeTs+exkPBZVlcweXYgpVVi2OEnJ978zaLcf8Ci5os7X9sN67muwwKDmO6UD 39tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=i5qek+mO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si6768655eju.192.2020.07.28.06.19.24; Tue, 28 Jul 2020 06:19:48 -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=@raspberrypi.com header.s=google header.b=i5qek+mO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729948AbgG1NTE (ORCPT + 99 others); Tue, 28 Jul 2020 09:19:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729688AbgG1NTD (ORCPT ); Tue, 28 Jul 2020 09:19:03 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D94C061794 for ; Tue, 28 Jul 2020 06:19:03 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id r4so15305869wrx.9 for ; Tue, 28 Jul 2020 06:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WWdZpdgjdgvXjLWPPue7If3nshivPXisw0K+933QvvQ=; b=i5qek+mODnmUnqV7JmR63SRMMOaIcB7jB7y59U0zxMQc7FUocN/SI7k4RvV2BxbEVu lPpJGp4TRbNauLdxSBJ791ROggTWFdev110Tweyvwex0UJmTlBJOJLoOslMU4TrZgJAn A+FIo2p2NK/vWCWAvK/mcQAqx/UwuPVPc2Ee5CNZTg9pd4nLluBcsb1ipySPEmYacC7y 5Wx+aMXyuCAuZ7XR0y0Md1VISQFVSm1WfGt7QK80idI/6rt/WEGRgC9fg3Ei27jKBX6C mQ5J2HbeAp4F36kbhfyppx9ps/GzyPwvDfBaYFoCpxqNppwGgrTi7eyA701s1SvnFsZz f9Ng== 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=WWdZpdgjdgvXjLWPPue7If3nshivPXisw0K+933QvvQ=; b=D9NSVJa+xO0eDMstqtGBR14cBirDacyB8f8dVpmWNz2aQihJ07ymbscIyI3dH/BfrL PqQXTkFp4NBX08wMzf1aQAx9xnbTOM7hf7YtaExTT4HxtM+6xhpXsSvZ5KFg7NGrSeSh 5CyL1tygI2W2cthxvnqNV6d1J+sXNCr4D0uiR5cClU9VLOSemp6nawKyrglsEfN8O7Rb MZooTU8TM2i1UDpUI8MHfdwvKk/bL1siFprVrB+KZ991cMss8BdR1kV4ev8ZHhFU53xE JOEKgAI3p4rplVaf23l3KSmYgnSe6wf6Jc07Kxn3aJKa973FBTrei8RKORhU8YzKoESr JSSA== X-Gm-Message-State: AOAM5327LlkU1xMrzLRVqnmcsGWOiWUtuOQnvxsLGKNk0DQGKEpKXvcR dJ+6GSVTfrIn8WneOvkRmbSJgNE0X8eeir61lAJ3sQ== X-Received: by 2002:adf:fe50:: with SMTP id m16mr7588899wrs.27.1595942342223; Tue, 28 Jul 2020 06:19:02 -0700 (PDT) MIME-Version: 1.0 References: <08b5c574e128bc7c42387867aee11978068c2aa5.1594230107.git-series.maxime@cerno.tech> In-Reply-To: <08b5c574e128bc7c42387867aee11978068c2aa5.1594230107.git-series.maxime@cerno.tech> From: Dave Stevenson Date: Tue, 28 Jul 2020 14:18:46 +0100 Message-ID: Subject: Re: [PATCH v4 56/78] drm/vc4: hdmi: Store the encoder type in the variant structure To: Maxime Ripard Cc: Nicolas Saenz Julienne , Eric Anholt , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, LKML , 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 Hi Maxime On Wed, 8 Jul 2020 at 18:43, Maxime Ripard wrote: > > The vc4 CRTC will use the encoder type to control its output clock > muxing. However, this will be different from HDMI0 to HDMI1, so let's > store our type in the variant structure so that we can support multiple > controllers later on. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++- > drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index a50220bfd5dd..c50241170d7e 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -1268,7 +1268,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) > > dev_set_drvdata(dev, vc4_hdmi); > encoder = &vc4_hdmi->encoder.base.base; > - vc4_hdmi->encoder.base.type = VC4_ENCODER_TYPE_HDMI0; > + vc4_hdmi->encoder.base.type = variant->encoder_type; > vc4_hdmi->pdev = pdev; > vc4_hdmi->variant = variant; > > @@ -1447,6 +1447,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) > } > > static const struct vc4_hdmi_variant bcm2835_variant = { > + .encoder_type = VC4_ENCODER_TYPE_HDMI0, > .registers = vc4_hdmi_fields, > .num_registers = ARRAY_SIZE(vc4_hdmi_fields), > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h > index 0c32dc46d289..0d529db4b3ab 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.h > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h > @@ -27,6 +27,9 @@ struct vc4_hdmi; > struct vc4_hdmi_register; > > struct vc4_hdmi_variant { > + /* Encoder Type for that controller */ > + enum vc4_encoder_type encoder_type; > + > /* List of the registers available on that variant */ > const struct vc4_hdmi_register *registers; > > -- > git-series 0.9.1