Received: by 10.213.65.68 with SMTP id h4csp397904imn; Tue, 27 Mar 2018 01:03:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELtjWNwU+8BxyjyN4BrRqQhkW1fMDQNoX4hasGf/sGJzuuK2KHnCDboLj08PgppK5Q/wH3Mc X-Received: by 10.99.65.6 with SMTP id o6mr21927446pga.57.1522137792934; Tue, 27 Mar 2018 01:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522137792; cv=none; d=google.com; s=arc-20160816; b=qgf0k0Zgfb6DOMGtdp1c0lDYZs+dSxdTFYeAOfqI3dGOxI0I5AtEiNGG9srXPosul7 lGhVVYD7u57tYS5djEPkDg3jBoHtrL/TJpJTlPOR3K3wNS9HgvaBeAvhsZylFjYXCTuZ GM22di/eTLsC7F5Kofpgxcwjb3/s5mfs/8FkCTDdI6fS3Y7dVScwivl9Cuak64n/Elas mUmO/JRC0ZpLzNaPy4hX/yXmkafvapWOpnoYeUS+AQzv1ODEh7ZThpPQ58VFJXd8BTZp 5sqJClt4vc+D82bnyCrRFH/oGhniMc49PVWXt+BiQZCKlXwU6mgxsWnCTvaYohZL/OiY cBiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=biWHXFg3DVIdaFw/HF7nQvmb7hCpX2LuokUCp8+vGog=; b=zsA1gfO6YepMPreMjPAaliIU/HJAv85sqoSMAzRMc+OlZVVGIGYD1Azunuorq2WEcx ltksmQoI7HKlA9+oJYzjY6GmTndjDiXWtbjdsQvygUPvmR8l5QO1bvbDa7IGbEvvvrkZ r326Bv8toFq6fOuYMz3x/dXms5At/ArDlU/HM9CMDzh+usp20b43xo2cDvgLC9pvnxOq L79VjDM2Yl8N1kilg/aUQ7ElAX2gUN5z5tIUy4aWP1k+H4kJuXzGjm96FDKnszGocYX5 KtUu9zGD5LomV+6fS9/SqfdosARHVBL34f9Hj/yO+9m2vQnEAxdtGtbCmHphF565eUh9 ZLAw== 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 i63si466684pfj.365.2018.03.27.01.02.58; Tue, 27 Mar 2018 01:03:12 -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 S1751713AbeC0IBv (ORCPT + 99 others); Tue, 27 Mar 2018 04:01:51 -0400 Received: from mail.bootlin.com ([62.4.15.54]:36111 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbeC0IBt (ORCPT ); Tue, 27 Mar 2018 04:01:49 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 403EF20728; Tue, 27 Mar 2018 10:01:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from aptenodytes (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id B30FE2055E; Tue, 27 Mar 2018 10:01:46 +0200 (CEST) Message-ID: <1522137643.1110.4.camel@bootlin.com> Subject: Re: [PATCH 02/10] drm/sun4i: Disable YUV channel when using the frontend and set interlace From: Paul Kocialkowski To: Maxime Ripard Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, David Airlie , Chen-Yu Tsai , Daniel Vetter , Gustavo Padovan , Sean Paul Date: Tue, 27 Mar 2018 10:00:43 +0200 In-Reply-To: <20180323095529.5nptn5achjt3esog@flea> References: <20180321152904.22411-1-paul.kocialkowski@bootlin.com> <20180321152904.22411-3-paul.kocialkowski@bootlin.com> <20180323095529.5nptn5achjt3esog@flea> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VXrm6PjPabLMelrs/Uhr" X-Mailer: Evolution 3.26.5 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-VXrm6PjPabLMelrs/Uhr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, 2018-03-23 at 10:55 +0100, Maxime Ripard wrote: > On Wed, Mar 21, 2018 at 04:28:56PM +0100, Paul Kocialkowski wrote: > > The YUV channel was only disabled in > > sun4i_backend_update_layer_formats, > > which is not called when the frontend is selected. > >=20 > > Thus, creating a layer with a YUV format handled by the backend and > > then > > switching to a format that requires the frontend would keep the YUV > > channel enabled for the layer. > >=20 > > This explicitly disables the YUV channel for the layer when using > > the > > frontend as well. It also sets the relevant interlace bit, which was > > missing in the frontend path as well. >=20 > This should be part of a separate patch. Usually, if you write "it > also does..." at the end of your commit log, it's a pretty good > indication that it should be another patch :) I must say, I figured that this part was missing in the frontend path by chance and couldn't really test the feature, so I'm also tempted to drop it altogether. What do you think? Also, is interlacing actually used on any of the video outputs we support? Perhaps RGB? > > Signed-off-by: Paul Kocialkowski > > --- > > drivers/gpu/drm/sun4i/sun4i_backend.c | 17 ++++++++++++++++- > > drivers/gpu/drm/sun4i/sun4i_backend.h | 3 ++- > > drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +- > > 3 files changed, 19 insertions(+), 3 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c > > b/drivers/gpu/drm/sun4i/sun4i_backend.c > > index e07a33adc51d..b98dafda52f8 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c > > @@ -294,8 +294,10 @@ int sun4i_backend_update_layer_formats(struct > > sun4i_backend *backend, > > } > > =20 > > int sun4i_backend_update_layer_frontend(struct sun4i_backend > > *backend, > > - int layer, uint32_t fmt) > > + int layer, struct drm_plane > > *plane, > > + uint32_t fmt) > > { > > + bool interlaced =3D false; >=20 > There's no need to pass the full drm_plane pointer, you can just pass > a boolean to tell if it is interlaced or not. Yes that'll do just as well. Thanks, --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-VXrm6PjPabLMelrs/Uhr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAlq5+isACgkQ3cLmz3+f v9ELFgf/btbgiV1vhsojEtIvmKNfqTXxExc4odqFDQipFFE4D28DbdPgsjsXZLjG T65rJNfHwXuIiATZdd5Bjc0KZpxOzfYxrPrb/W91V1/3rtLkWE2U11JDmz9eGPIF vDml0b+ZhAKbc0t9KwAVgAfa6JzhAb2ciKJ7HEPzAGvyq3oLgREs7hp8QtqwC3Mt lgUG3Wz8KOZQ6gm4GoSa6kxReWq3L2Vr0uX/lYeh1Ho1cuwsBhp5M7xh14vCOfoz lSy/zb8hEiXDG8m7UMkObdx4G3cP6YVonfYLGeNzAP6NmPsQ01TCq2hroSNlS1Q/ vJk5QtG/pXqw+Z3oFb1pF/OKzbqdnA== =nJpH -----END PGP SIGNATURE----- --=-VXrm6PjPabLMelrs/Uhr--