Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6335174imm; Sun, 20 May 2018 00:31:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZroXCuaFNPngMqOZTj42JP1MYc1NBbM7SMKE3G2Mlybpm5sLEyUoatuXr7wiQ4MuDqceV2B X-Received: by 2002:a65:5883:: with SMTP id d3-v6mr12350609pgu.131.1526801491119; Sun, 20 May 2018 00:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526801491; cv=none; d=google.com; s=arc-20160816; b=KiqoFCmSVpEmgq9x0qMDjSf3lPSuJ8igdV+5L1PMIyOKfqxMPGK0LwNAGr4E7H2JXH YVNRaw7LW45Rf6JnRbXr9nZg8ipEnw4rMtTYSBbUDlE7iFqNyD+4VpdsZIoYrg2lEO4a LJkuYBt/578xnLQxfIdJCUprP24u7XVXRxsZgM6QowPx3WBnia/pRPE99Gsy/AiLKjbt gjicz/Wy4q6Vy3R+I8rsrkO5ZOiaQa0yNxtpjU+IHeYJ8TPjNBKrm5RHQz6Dh7tPjuZd GZcirvoIqsRXNMo8nw1qnkr8RFHLR2IKWQkbIgKYYptxbqMCz2Rak+WPyWRS6NyjFriC j1Ug== 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 :arc-authentication-results; bh=Wg2vatcCHUtVEskug88/hzLNcg6fzEWRgqFgICdLeI0=; b=N2Gl2mtjBEhonTTe5VW3ywGsM8FecITAup1l4jZmlcbZl2XL37Mkh7jFsxri5Pgdcp 6fyk4UCFhsLuLg4cCSVOH90HiA89EePUCg983jLb343ADcrImaPBW+tN0+0nCROLvJRf riL+evaCiwXRwBUX8rakElzsLmPjdifjDQDqeEF85I5VBRYPuysCe/xy5zZlzEPAZFNI hYLM6h6MR+XUJKjuYaGOFwWLbSOaDLiQBQVo/ITy0kUfcVfg88RIbS1lQzSfK4otNwJZ fxRKcZeq8lfbNrk3tWYC3dmzrQ1JGilRy7TBzi29iwfhsz3DYchxqaxvua0ThhIy6aNq YCYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si11535137pli.269.2018.05.20.00.31.16; Sun, 20 May 2018 00:31:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751421AbeETHbH (ORCPT + 99 others); Sun, 20 May 2018 03:31:07 -0400 Received: from mailout8.siol.net ([213.250.19.135]:48408 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750883AbeETHbF (ORCPT ); Sun, 20 May 2018 03:31:05 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTP id 66B6752061A; Sun, 20 May 2018 09:31:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta12.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta12.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BIGNjhuKT4LN; Sun, 20 May 2018 09:31:01 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTPS id C3C67520639; Sun, 20 May 2018 09:31:01 +0200 (CEST) Received: from jernej-laptop.localnet (unknown [194.152.15.144]) (Authenticated sender: 031275009) by mail.siol.net (Zimbra) with ESMTPA id 6735B520618; Sun, 20 May 2018 09:31:00 +0200 (CEST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Julian Calaby Cc: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , dri-devel , devicetree , "Mailing List, Arm" , "linux-kernel@vger.kernel.org" , "open list:COMMON CLK FRAMEWORK" , linux-sunxi Subject: Re: [linux-sunxi] [PATCH 10/15] drm/sun4i: Add support for R40 TV TCONs Date: Sun, 20 May 2018 09:30:22 +0200 Message-ID: <8079031.6V9S5xCcmc@jernej-laptop> In-Reply-To: References: <20180519183127.2718-1-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Dne nedelja, 20. maj 2018 ob 04:09:52 CEST je Julian Calaby napisal(a): > Hi Jernej, > > On Sun, May 20, 2018 at 11:57 AM, Julian Calaby wrote: > > Hi Jernej, > > > > On Sun, May 20, 2018 at 4:31 AM, Jernej Skrabec wrote: > >> R40 display pipeline has a lot of possible configurations. HDMI can be > >> connected to 2 different TCONs (out of 4) and mixers can be connected to > >> any TCON. All this must be configured in TCON TOP. > >> > >> Along with definition of TCON capabilities also add mux callback, which > >> can configure this complex pipeline. > >> > >> For now, only TCON TV is supported. > >> > >> Signed-off-by: Jernej Skrabec > >> --- > >> > >> drivers/gpu/drm/sun4i/sun4i_tcon.c | 39 ++++++++++++++++++++++++++++++ > >> 1 file changed, 39 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c > >> b/drivers/gpu/drm/sun4i/sun4i_tcon.c index e0c562ce1c22..81b9551e4f78 > >> 100644 > >> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > >> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > >> @@ -1274,6 +1274,31 @@ static int sun6i_tcon_set_mux(struct sun4i_tcon > >> *tcon,>> > >> return 0; > >> > >> } > >> > >> +static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, > >> + const struct drm_encoder *encoder, > >> + int index) > >> +{ > >> + if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) > >> + sun8i_tcon_top_set_hdmi_src(tcon->tcon_top, index); > >> + > >> + sun8i_tcon_top_de_config(tcon->tcon_top, tcon->id, > >> + tcon_type_tv, index); > >> + > >> + return 0; > >> +} > >> + > >> +static int sun8i_r40_tcon_tv_set_mux_0(struct sun4i_tcon *tcon, > >> + const struct drm_encoder *encoder) > >> +{ > >> + return sun8i_r40_tcon_tv_set_mux(tcon, encoder, 0); > >> +} > >> + > >> +static int sun8i_r40_tcon_tv_set_mux_1(struct sun4i_tcon *tcon, > >> + const struct drm_encoder *encoder) > >> +{ > >> + return sun8i_r40_tcon_tv_set_mux(tcon, encoder, 1); > >> +} > > > > Are TCON-TOPs going to be a common thing in new SoCs from Allwinner? > > If so, maybe we should add an index to the TCON quirks and have a > > common TCON-TOP set_mux function. > > Actually, that only moves it up a level. Should it be a devicetree property? > TCON-TOP is besides R40 part of two newest Allwinner SoCs, H6 and A63. However, they have only one TV TCON and one LCD TCON, so indexes are not needed for them (always 0). This makes R40 somewhat special. I don't think it makes sense to expand everything just for one SoC. Best regards, Jernej