Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp222169iob; Wed, 18 May 2022 00:16:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvTX+2y0H7/micetUc6s5pmh+8YPvdEZMXQXyYkR1FbBhEirvP2BSzCovL8XygfRCLaMti X-Received: by 2002:a63:6b82:0:b0:39d:a6ce:14dc with SMTP id g124-20020a636b82000000b0039da6ce14dcmr22681892pgc.476.1652858214337; Wed, 18 May 2022 00:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652858214; cv=none; d=google.com; s=arc-20160816; b=y1oQGg89XYHi0Cby+DujmZ+cVD7EMsmJx+e59zdI8H/52TX4ezdEeY/ecSD2M2T5tS 7jNU3Xp6tha0XuZQet3NociJrwBN7iyBjq/tE+uvwZEaIdv5T3Ma3TpM8w7630WIAG5L gETuYuIX2lnfsJonRvKkD/pRsJJG6/dwur8oisb4B7RMwWkOz4q8Nj4l9Yd3YJ1j1eis dhJe3Z63QLlSTs5lkKVSXKVqRWtVuUh+maHmPZJSyVTKQv8OyZG6TsAyDj87HxjHc6OU jfdEOWAXsWwszTXdxuDXlIQGAzXF2IdMQ20dDCtiJZKWrt5dGD+MIFqQO2Q+lnfDoa5s J1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=ZCNKI5woerPUrmPCB0wU/T9brPPBMRmt8DMnLhy8VFA=; b=uQX0JBYg9ASC4Xi7aTSRYGLt6DA+CMAcLPGcWz+qaTc7ziy0SUP6btleQLNJUoVbbs S4FSIqqPTde0pk2kfinATjATky/LxA83mK1KeR6pgfVPsv7W2SVtu3YHKgGZZDdeFVar uYopf+BWsJsEostAvGpUliyus1gq+KB4kOcOY8lq0fYcpZZ9fmkOnc3Tr54LNhAWbsAV XTjoaQtmjSjFMdrBUrBXlh2WCNlMqFDpojP2M7TWJpvvV2r+EDG/Dd04nlntzsfHDF8R 99iStS5z2X1T14yZAe4feovLzq89/HSa4i/hbO5rPAzM4OOgMF1M1SFC6db8k5lQVS2c Wycg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=3ZiEMpES; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k9-20020a63d849000000b003c6aa1dce61si1566720pgj.534.2022.05.18.00.16.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 00:16:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=3ZiEMpES; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4984E26; Wed, 18 May 2022 00:10:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231901AbiERHKV (ORCPT + 99 others); Wed, 18 May 2022 03:10:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbiERHKG (ORCPT ); Wed, 18 May 2022 03:10:06 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05F50E64FA for ; Wed, 18 May 2022 00:10:05 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id t6so1300447wra.4 for ; Wed, 18 May 2022 00:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=ZCNKI5woerPUrmPCB0wU/T9brPPBMRmt8DMnLhy8VFA=; b=3ZiEMpESJJSEUhffXP/IpwU9L2ho0mVvu018crv9SbiP4Y91EhmpwbxBkut6kmW1uv bSEKpuWdEwxM4fOwpWwLa+ybzQ6DPAj15+PJQtxz1og9wv16KN7EX41jzdDipCfRiAfE m97bekTjXB9iaz45+9UF8ZyqSm3JWC1Gnoz2RY9fb1AlsbWUtLXVsrrbV93IpKJlleVb f18fBUCx5xabxRATX6cxrdH0wMsUzwTgi6gS9Rp+poGVHR4ba/RPti6wCFBtgJRdMQDC 3yjk4jRLsWEewxBy/ZCKewsTZ7kzOLG6TVMXyjkBHA0LY9YwDI5igpSRV4tILoOJ258e p+PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=ZCNKI5woerPUrmPCB0wU/T9brPPBMRmt8DMnLhy8VFA=; b=FqRuLZMIT8G/kesYtbm/x7WlFzA84V6UDM97+NlhJ/XTrPOkI1VWDdpS4xDbGmXuhP bKlt99y599RtnOOHXg79Omotre55MaeYMSFnpiZ1pVUL4q0PjA+bBkx7zD36AbEztXZi Fkfke7r3zpmkz+fzn+BZgGajpAANBeOQIID9lJOJDy+RljFtjsMyyYv0/Fx71ezEfzv3 4VEs9lMi2vhBvSHIRYkBaI5UDAaWbxzSY8Cyjo5pSkNmFOPXn7flYsNoGAlCr5TQjaZh Djs/V2+txyH4yEMcY4ERHP4uBbnAGDuhVf+0YMquC95MOKiApb9hWKGN0L8LSvPH9FX+ 4tPA== X-Gm-Message-State: AOAM531EQE+yQ0foZO5aKZ+pYeHpNx6PNwAUv6OkdhdcwOdITS9IBAgt OZGRQz2oNe/MnzQmaFHg/m35AhN3uHKj3KEQ X-Received: by 2002:a5d:584b:0:b0:20c:6317:1f77 with SMTP id i11-20020a5d584b000000b0020c63171f77mr21948376wrf.355.1652857803413; Wed, 18 May 2022 00:10:03 -0700 (PDT) Received: from ?IPV6:2001:861:44c0:66c0:dea9:338d:d500:c574? ([2001:861:44c0:66c0:dea9:338d:d500:c574]) by smtp.gmail.com with ESMTPSA id bg26-20020a05600c3c9a00b003942a244ee0sm962397wmb.37.2022.05.18.00.10.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 00:10:02 -0700 (PDT) Message-ID: Date: Wed, 18 May 2022 09:10:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] drm/meson: add YUV422 output support Content-Language: en-US To: Christian Hewitt , Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Dongjin Kim , Furkan Kardame References: <20220516072245.10745-1-christianshewitt@gmail.com> From: Neil Armstrong Organization: Baylibre In-Reply-To: <20220516072245.10745-1-christianshewitt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/05/2022 09:22, Christian Hewitt wrote: > From: Dongjin Kim > > Support YUV422 output from the Amlogic Meson SoC VPU to the HDMI > controller. Without this YUV422 format out of the HDMI encoder > leads to using the dw-hdmi YUV444 to YUV422 color conversion which > gives wrong colors and a green line on the left edge of the screen. > > Signed-off-by: Dongjin Kim > Signed-off-by: Christian Hewitt > Tested-by: Furkan Kardame > --- > I've had this patch in my sources for some time now; originally picked > from Dongjin's mainline branches for Hardkernel boards and tweaked for > some minor renaming after DRM bridge changes were merged. Furkhan has > reminded me this is still needed a couple of days ago and now the same > issue is reported on the mailing list [0] so best to submit it. If a > fixes tag is required? please advise the commit and i'll resend. > > drivers/gpu/drm/meson/meson_encoder_hdmi.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c > index 5e306de6f485..08529efb4405 100644 > --- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c > +++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c > @@ -218,7 +218,8 @@ static void meson_encoder_hdmi_atomic_enable(struct drm_bridge *bridge, > if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24) { > ycrcb_map = VPU_HDMI_OUTPUT_CRYCB; > yuv420_mode = true; > - } > + } else if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16) > + ycrcb_map = VPU_HDMI_OUTPUT_CRYCB; > > /* VENC + VENC-DVI Mode setup */ > meson_venc_hdmi_mode_set(priv, vic, ycrcb_map, yuv420_mode, mode); > @@ -230,6 +231,10 @@ static void meson_encoder_hdmi_atomic_enable(struct drm_bridge *bridge, > /* Setup YUV420 to HDMI-TX, no 10bit diphering */ > writel_relaxed(2 | (2 << 2), > priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); > + else if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16) > + /* Setup YUV422 to HDMI-TX, no 10bit diphering */ > + writel_relaxed(1 | (2 << 2), > + priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); > else > /* Setup YUV444 to HDMI-TX, no 10bit diphering */ > writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL)); > @@ -257,6 +262,7 @@ static void meson_encoder_hdmi_atomic_disable(struct drm_bridge *bridge, > > static const u32 meson_encoder_hdmi_out_bus_fmts[] = { > MEDIA_BUS_FMT_YUV8_1X24, > + MEDIA_BUS_FMT_UYVY8_1X16, > MEDIA_BUS_FMT_UYYVYY8_0_5X24, > }; > Acked-by: Neil Armstrong