Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2052615imm; Sun, 23 Sep 2018 19:01:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV618zlqWJ3JlC99u6QO6egikBPumZFHLKW9b+q03Lc15HWJtZBCc/WzDWUymtJuWUz4gFE1j X-Received: by 2002:a63:7e1c:: with SMTP id z28-v6mr7456260pgc.246.1537754474844; Sun, 23 Sep 2018 19:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537754474; cv=none; d=google.com; s=arc-20160816; b=QPBaYYrafRtcbyJr+2KlIanvuo0cTRKu0Uez8cy0eQf+dGtnGz0IGY1vNyQ73RqWnx 6APmAXKT3F8suWAR3MpGO6ubjr0isimKrFvtt0g+pXDUDWXYn1bOajhGag1C2+Ntrlnx soudWxmsiRV3G7kLVXPhiBFDY2JO66emxHn7CJZ86BbVqI0rotM6jVQK5W24r5IRxGDG cRlQdya9UmV8PsJiv1v/7P6NqW8vrBCLHCOHWtUv9xPqek1h8GFRqVo+HQrP4T+XB8Fh 469zj7zQVIXJ755C/zjBzd4K3/mPxPctLgArZgAgy/re27Vs+ucgMASW+obh1jsOAyJy jGdg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=GwEdn4yvCDSejgX7p+RXWExNQWRzSk6dUI3lIijLla4=; b=Q8t84DVUnM8giN8wUKDw2GCjOc6DvOlrHdhAAhqoM9HNTLhIvTmP/QFsWDCnIfUw7L rkUHjadI768tCBx8lh/GlxOBPr13CmksYvqHYbqZvBzlKa5AhYnQI9K1nXv/efIqr0jv QN0cj6/wU2HJ4PKLwzPNbaZkj+ySzVi/G2QtabVyRHRbfBIN0cGhg340K/RcHGXLfyPQ WwtUyv8wc5YiHdhhbs88JuMLgJ33Q0fZPGjigte2oQHDvgtIL3Y0JdpCysxRGDBuAW4+ yHWxasqLxaV1v4REiaJZGL1z6biJuaqdx0kvYzmH2TZXewx3LkE6KLnk1a0wJFNyzsJS VG4g== 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 o123-v6si35712201pfd.36.2018.09.23.19.00.59; Sun, 23 Sep 2018 19:01:14 -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 S1727338AbeIXH7Z convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Sep 2018 03:59:25 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:33773 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727052AbeIXH7Z (ORCPT ); Mon, 24 Sep 2018 03:59:25 -0400 Received: by mail-ed1-f68.google.com with SMTP id g26-v6so1820909edp.0; Sun, 23 Sep 2018 18:59:36 -0700 (PDT) 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:content-transfer-encoding; bh=wS4COzUK7bO0xJuD+Xb71DeJgxBC/MK+ia2FMMP0DUU=; b=dYI7iT8VLKNd6BGzYfpiOasIhu69sX9gw9/m03vwJxXsx1q0kqEABdayP7IBsxA/F/ mTFyRpoFeGWysbL5Ze6wXisRLh+bTYvCjBJZaHBNm+2WmMzSMS9AgmAWaAzD70zh/qD3 fHYn8zfAxgAd+qFk9VRyBmqZLYxbYqc2sagm9Ksn1WNRZDxpTmaNIYxvJ8fCWOdSawnn W16/BODXG7oOLdCONZmQmYtkhpiOG25+Zrl3jatMZzwU+Pl9YDpOSt0laQjgYQUQ5OMk lsw4a8GKH8+Ql0Ub3DSMrNq0aN8l3+LA8JE0CBeSZX46Qj5tTRoyBXMe7/qWICvkJnes 6SoA== X-Gm-Message-State: ABuFfoiJAtDymTXlpmGSM3HkbBMSnRSa40AXcmMiUXUOPZoUbvA28PiZ eFwJfgIguXdrDR8uYLRT60tq6aGwIzo= X-Received: by 2002:a50:9e85:: with SMTP id a5-v6mr13830676edf.92.1537754375169; Sun, 23 Sep 2018 18:59:35 -0700 (PDT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com. [209.85.221.41]) by smtp.gmail.com with ESMTPSA id d12-v6sm5892599ede.78.2018.09.23.18.59.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Sep 2018 18:59:34 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id t15so10122194wrx.1; Sun, 23 Sep 2018 18:59:34 -0700 (PDT) X-Received: by 2002:adf:e484:: with SMTP id i4-v6mr6939043wrm.145.1537754374017; Sun, 23 Sep 2018 18:59:34 -0700 (PDT) MIME-Version: 1.0 References: <20180902072643.4917-1-jernej.skrabec@siol.net> <6201242.bzTTWRITmP@jernej-laptop> In-Reply-To: <6201242.bzTTWRITmP@jernej-laptop> From: Chen-Yu Tsai Date: Mon, 24 Sep 2018 09:59:22 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] Re: [PATCH 13/27] drm/sun4i: Add support for H6 DE3 mixer 0 To: Jernej Skrabec Cc: linux-sunxi , Rob Herring , Maxime Ripard , Mark Rutland , Mike Turquette , Stephen Boyd , David Airlie , Archit Taneja , Andrzej Hajda , devicetree , linux-arm-kernel , linux-kernel , linux-clk , dri-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 24, 2018 at 3:40 AM Jernej Škrabec wrote: > > Dne sobota, 22. september 2018 ob 15:47:03 CEST je Chen-Yu Tsai napisal(a): > > On Sat, Sep 22, 2018 at 9:23 PM Chen-Yu Tsai wrote: > > > On Sun, Sep 2, 2018 at 3:27 PM Jernej Skrabec > wrote: > > > > Mixer 0 has 1 VI and 3 UI planes, scaler on all planes and can output > > > > 4K image @60Hz. It also support 10 bit colors. > > > > > > AFAICT 10 bit color support is not implemented? Please mention this. > > ok. > > > > > > > > Signed-off-by: Jernej Skrabec > > > > --- > > > > > > > > drivers/gpu/drm/sun4i/sun8i_mixer.c | 13 +++++++++++++ > > > > 1 file changed, 13 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c > > > > b/drivers/gpu/drm/sun4i/sun8i_mixer.c index a9218abf0935..54eca2dd4b33 > > > > 100644 > > > > --- a/drivers/gpu/drm/sun4i/sun8i_mixer.c > > > > +++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c > > > > @@ -540,6 +540,15 @@ static int sun8i_mixer_remove(struct > > > > platform_device *pdev)> > > > > > return 0; > > > > > > > > } > > > > > > > > +static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = { > > > > > > Please sort the per-compatible structures according to "version sort" > > > rules.> > > > > + .ccsc = 0, > > > > + .is_de3 = true, > > > > + .mod_rate = 600000000, > > > > + .scaler_mask = 0xf, > > > > + .ui_num = 3, > > > > + .vi_num = 1, > > > > +}; > > > > + > > > > > > > > static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = { > > > > > > > > .ccsc = 0, > > > > .scaler_mask = 0xf, > > > > > > > > @@ -587,6 +596,10 @@ static const struct sun8i_mixer_cfg > > > > sun8i_v3s_mixer_cfg = {> > > > > > }; > > > > > > > > static const struct of_device_id sun8i_mixer_of_table[] = { > > > > > > > > + { > > > > + .compatible = "allwinner,sun50i-h6-de3-mixer-0", > > > > + .data = &sun50i_h6_mixer0_cfg, > > > > + }, > > > > > > Same here. > > > > > > ChenYu > > > > BTW, DE 3.0 includes a register in DE TOP called "DE IP configure register", > > which gives the number of IP blocks per class, per mixer. If we retrieve > > the configuration from this register, then we shouldn't need to > > differentiate between mixer-0 and mixer-1 with compatible strings. > > > > What do you think? > > IIRC, not all setting were correct when read from registers, but I would need > to check again. I'm also not sure if register holds all possible settings, so > it is safer to have separate list. We would also have to devise mechanism to > get this data from DE2/3 CCU driver (it occupies the same memory space). > > Perhaps the strongest argument is that some SoCs with DE3 have HW bug in > mixer1 block, including that in H6. In order to work, mod clock has to be > enabled for mixer0 and mixer1 at the same time. I would associate that quirk > with mixer1 compatible. OK. That makes sense. So apart from the mentioning 10 bit support status in the commit log, Reviewed-by: Chen-Yu Tsai