From: Neil Armstrong <narmstrong@baylibre.com>
To: Christian Hewitt <christianshewitt@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Kevin Hilman <khilman@baylibre.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Dongjin Kim <tobetter@gmail.com>, Furkan Kardame <f.kardame@manjaro.org>
Subject: Re: [PATCH] drm/meson: add YUV422 output support
Date: Wed, 18 May 2022 09:10:01 +0200 [thread overview]
Message-ID: <bb8e1955-b82f-bb6d-69ce-bd0845aa2ec1@baylibre.com> (raw)
In-Reply-To: <20220516072245.10745-1-christianshewitt@gmail.com>
On 16/05/2022 09:22, Christian Hewitt wrote:
> From: Dongjin Kim <tobetter@gmail.com>
>
> 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 <tobetter@gmail.com>
> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
> Tested-by: Furkan Kardame <f.kardame@manjaro.org>
> ---
> 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 <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2022-05-18 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 7:22 Christian Hewitt
2022-05-16 7:42 ` Dan Johansen
2022-05-18 7:10 ` Neil Armstrong [this message]
2022-05-18 7:23 ` Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb8e1955-b82f-bb6d-69ce-bd0845aa2ec1@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=christianshewitt@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=f.kardame@manjaro.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=tobetter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®