Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4305014imm; Fri, 18 May 2018 02:55:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoidsxKMnOSwZ95KCT8bLH827enwlElS2+1Nq1smXovAiGdUSBuGdXf9IiuzEnqUeZFLTl7 X-Received: by 2002:a17:902:bb84:: with SMTP id m4-v6mr8756648pls.339.1526637339149; Fri, 18 May 2018 02:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526637339; cv=none; d=google.com; s=arc-20160816; b=lPknvuXxE9vtCqYQu1bTmgLauuOkQX1CXHd/og+FP266o1KR9kAUaGYEAZkgSjt7pZ t9Xvwwpvn1TAhZdanjdo/0eA4S/m+6IWtHGs4Ukm/T0rKgLFPDXK+ZUxxL2FevLxq9+Q H6RDLrocJOn8UujgyJ1cMPVXsheGuwmZmuZA+IAIGowcUvpCddu8V8tErgp3pixdSju9 8ZDY890txsQaOLGlJF9NH4xuCjRxQtsWOX9PjuHQSG5Y6OuXL4+PzwCr54vZPyZqGqeY dJB3phkCTnsNFf+nZZouIEx0kIiEf6TYviR/P9RkQeKOA42Ns2FD7Gpqb71Sy2JwF1tc G4tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=BgCx350OC/hevr1enbMukUj29Ndx67PBZ8JUPaFepCc=; b=toRaXvCACV81+nnhwd7J6TLEbF6YT/NpPdWHXvF8iGZVBgEWyu/oO5dn1b6mpWJYEP 7qg2BJ9qjxBtpm+BsQub4XUhc01nkrdsC+NaZYb9SmMxRP6/cJjMonuAR/O4ZBWHFNfU hLdG/IL7embFU5fu7ILHV7PVPzzVJ4U0904KKwIKgSaPQmVEy9gIHk+WwDjoFlhm4eOg CZgsmSSulqJgmF0RFLrAomQwQsjybhcqJKO1lCywdJTPWusY1xQz56QZccT2uPvLOhBj gt4yzJ8DzW1DZajLHUTa96iqaVb6es6TF1kZ13XY+Ct+EWyO5eF4V+bs0bI73MTAbmqp kmwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FC4jAg8l; 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 v8-v6si6947206plo.306.2018.05.18.02.55.24; Fri, 18 May 2018 02:55:39 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FC4jAg8l; 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 S1752549AbeERJqg (ORCPT + 99 others); Fri, 18 May 2018 05:46:36 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46011 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526AbeERJqc (ORCPT ); Fri, 18 May 2018 05:46:32 -0400 Received: by mail-pl0-f66.google.com with SMTP id bi12-v6so4272780plb.12 for ; Fri, 18 May 2018 02:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BgCx350OC/hevr1enbMukUj29Ndx67PBZ8JUPaFepCc=; b=FC4jAg8lV1Xv90VQmKjRxGhqgYv7J+NF7LXHFkQrbu1CZpRDwAqtjXAt86TfYl9kH8 bUwe1j76UB/Z0o+Q4I5Gzf7VVjefIuoDXxrK0xVQ+nKoZ+C9xq6QDipnCdJuabMgc7iG CnkB93BekGn44AJLHaSEBL/thW/7KnKnujGI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BgCx350OC/hevr1enbMukUj29Ndx67PBZ8JUPaFepCc=; b=J16mdfbA/7NkjmTzqwHlHM+qOW7WmWHivo1e9ERjfdh22q9vQUjUVFkKxQU+s6CMcS 3zRkoDaenX5HYiI03RPPELLhzNDo7mhMaw/+GfmYCc3U7XrAVD85n82A/SzMnZFpj0EZ jphQY9hYQxys+IUx7ll4KpG4FsSWFLhnKqyFGQp7AknlkADQWbtQ/tEgtyxCVJ+lPBHO bRUuiNzljji90PhaRpG2o6ut8KDhf9gQH+odiaMV3+94aG9tSKE53qcLzu8dbbLqRB1w cd+l5ut8MLmiDoMcIvFRFi1uuxdI0jO4Ppu5ppwhgiiROyEY9JZMOcMlqDmm7hKAL6lz +K0w== X-Gm-Message-State: ALKqPwdt9/asBt46pW1cmL2Ejsq2qjRC06UM5Wgm5YmAw+TqTIw4YXW9 wKb6Ru9hGjRKuOwKS52B18AGCQ== X-Received: by 2002:a17:902:4464:: with SMTP id k91-v6mr8641094pld.219.1526636791605; Fri, 18 May 2018 02:46:31 -0700 (PDT) Received: from localhost.localdomain ([183.82.227.74]) by smtp.gmail.com with ESMTPSA id j11-v6sm12694097pff.64.2018.05.18.02.46.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 02:46:31 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Cc: Jagan Teki Subject: [PATCH v2 05/26] drm/sun4i: DE2 mixer: Add index quirk Date: Fri, 18 May 2018 15:15:15 +0530 Message-Id: <20180518094536.17201-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180518094536.17201-1-jagan@amarulasolutions.com> References: <20180518094536.17201-1-jagan@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec When TCON set up TCON TOP, it needs to know mixer index. Here we do that by setting engine ID to number provided in mixer index quirk. Signed-off-by: Jernej Skrabec Signed-off-by: Jagan Teki --- Changes for v2: - New patch drivers/gpu/drm/sun4i/sun8i_mixer.c | 4 ++-- drivers/gpu/drm/sun4i/sun8i_mixer.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c index 126899d6f0d3..36d90c76317a 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c @@ -353,13 +353,13 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, dev_set_drvdata(dev, mixer); mixer->engine.ops = &sun8i_engine_ops; mixer->engine.node = dev->of_node; - /* The ID of the mixer currently doesn't matter */ - mixer->engine.id = -1; mixer->cfg = of_device_get_match_data(dev); if (!mixer->cfg) return -EINVAL; + mixer->engine.id = mixer->cfg->index; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); regs = devm_ioremap_resource(dev, res); if (IS_ERR(regs)) diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h index f34e70c42adf..aeda6e9a7627 100644 --- a/drivers/gpu/drm/sun4i/sun8i_mixer.h +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h @@ -123,6 +123,7 @@ struct de2_fmt_info { * are invalid. * @mod_rate: module clock rate that needs to be set in order to have * a functional block. + * @index: mixer index, needed to properly set TCON TOP */ struct sun8i_mixer_cfg { int vi_num; @@ -130,6 +131,7 @@ struct sun8i_mixer_cfg { int scaler_mask; int ccsc; unsigned long mod_rate; + int index; }; struct sun8i_mixer { -- 2.14.3