Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp753276ybt; Wed, 8 Jul 2020 10:47:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjYrudZs+0dTX9/l66MLoCpKznCrqHwOa7zPidat6l59szH3CXlvsDthRcSNPPKfZooY5S X-Received: by 2002:a05:6402:1778:: with SMTP id da24mr57109760edb.126.1594230434886; Wed, 08 Jul 2020 10:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594230434; cv=none; d=google.com; s=arc-20160816; b=kqchuB0b3ZJAyhO7LIJcbYREh5Ok/LsSnbFoQH7TZ6k58k/GCFD0576Q9bdG5OOB5S XJZgpBusqofb4Do+zChEfmIGDIRkvxQlV3rJC2K/pcS0XFs66tcl9jXXP51hv/g7tw5V jw4QaMflygMPozNKxp1h056VyXBuczIY4IZ+unPAQuV3hitIO8jqJEb74ha96zggDye7 x2dJb2nuSst+djSZlyEGPus+N8XU79ZSzNJXa+BjhIHK9OMUBb4/YRqH92vsJ8gvaGEd hLnamgLgBV9E/pXXMD2ELaHLI2veu7mKpYZA6XSB55QoU44pwsNmlAsWa2BYhHQO09IU fotg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=2uHFyUwNK/6yfbghIh47l4CHUyqe+Ay+rc5YWKDiiP0=; b=VSbRuawZ4gEYxr1KfdFx6IVHy/Ya3WhO/XZl4rLtVStHN7dzX+TlUsV+1pE9yfQMVB +7fWHYIm6saLc8Wdtcg2GhXwLqc8z4VLhBPnpehMUE2gYVg2ArCnNXYt45Dx503bhEwq F7ZPSuLPt+OWr5IYXYTVfoLKW+SnqEYliYBfwxETcHEtr5X4xolu/6Mr6F/jdWYpD9Y7 PpsC6I5fLQW6GiEcJncu4tSbiFdUd8V6HJZ5SQ/oQ6JvyeBoIcYnyRUlYG6mIo+/E2Ls MXtJLjbZc0KFSRRJiXIVjqMbEqkOAAEmf+Dl8TkfwtfBECUxwzHQo2ZdTT/p+In56IYU OL6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=KBVeSrpA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=k9dyQKdP; 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=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ha20si287532ejb.683.2020.07.08.10.46.51; Wed, 08 Jul 2020 10:47:14 -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=@cerno.tech header.s=fm3 header.b=KBVeSrpA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=k9dyQKdP; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727903AbgGHRn5 (ORCPT + 99 others); Wed, 8 Jul 2020 13:43:57 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:53213 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727820AbgGHRnx (ORCPT ); Wed, 8 Jul 2020 13:43:53 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 2B7FAFCC; Wed, 8 Jul 2020 13:43:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 08 Jul 2020 13:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=2uHFyUwNK/6yf bghIh47l4CHUyqe+Ay+rc5YWKDiiP0=; b=KBVeSrpAcLKoyrd25J6k9xhdbn/rE 3w/7us9W15wAWVmslYDNzLWPwJ9x3DR8779ylf91b5H0vMR12/g5EButdraw+HNe 64bFbgADRO+BmQl62IMwQutbTOXDQxeJW2Pl6nHSp3rkUZW7L5awf051690wLUPz QA0hgcB5asL40sleKZICW9C69kfo2779QekRhhtDRCs36J2Wwwl4AEKD8LZ0Gvo/ jp56BCJHmiJhnYPsvIqi9OyUEn70E+tDYa/UC6XyICBeS8F3wrHnsL9ptqygO04t OL38yf5ABZ+dcj9n2Job1PS4s6sZb2J49PXHkoEJ/opPaujuZ2uzSXBzQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=2uHFyUwNK/6yfbghIh47l4CHUyqe+Ay+rc5YWKDiiP0=; b=k9dyQKdP LkT//GfaFlHAV+2HQIIkFfjvbv0NVoCTdnb5as+3W963E8dzbyhPGUrFHpHtfYO5 1UNZbbJHfCXvQFeZCrh6l5wCucSoHNkZQCyHRhneiZNuyzw1AP2gNCjEHGoJfuvf 8irpbRIvSPD1b7d1TMdKc8OddShlm4aKyYIAUCSWY5HJVNwiE71m+Iqr75AQ8KKs 2Z8LSMYXdXzo3K9zN937uvbLR2+XRnxo2gJOy8Ml0P5iQKs2X6YVfWcqVLMJujn2 H0+O83krNGgPsmKNg5KJjOG1s5+pVJYka3uNEmAmxLemuRiV+x5ZcMzu3OD6h9q3 6hEwOS5Ej0FtXw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudejgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgephedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 78BE23280059; Wed, 8 Jul 2020 13:43:51 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, 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 , Maxime Ripard Subject: [PATCH v4 56/78] drm/vc4: hdmi: Store the encoder type in the variant structure Date: Wed, 8 Jul 2020 19:42:04 +0200 Message-Id: <08b5c574e128bc7c42387867aee11978068c2aa5.1594230107.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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