From: "Adrián Larumbe" <adrian.larumbe@collabora.com>
To: narmstrong@baylibre.com, khilman@baylibre.com,
linux-amlogic@lists.infradead.org,
dri-devel@lists.freedesktop.org, rfoss@kernel.org,
andrzej.hajda@intel.com
Cc: adrian.larumbe@collabora.com, kernel@collabora.com
Subject: [PATCH 2/3] dw-hdmi: truly enforce 420-only formats when drm mode demands it
Date: Sun, 28 May 2023 15:00:00 +0100 [thread overview]
Message-ID: <20230528140001.1057084-3-adrian.larumbe@collabora.com> (raw)
In-Reply-To: <20230528140001.1057084-1-adrian.larumbe@collabora.com>
The current output bus format selection logic is enforcing YUV420 even
when the drm mode allows for other bus formats as well.
Fix it by adding check for 420-only drm modes.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index d59a547f9cb2..1afb8f2603a0 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2710,9 +2710,10 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
/* Default 8bit fallback */
output_fmts[i++] = MEDIA_BUS_FMT_UYYVYY8_0_5X24;
- *num_output_fmts = i;
-
- return output_fmts;
+ if (drm_mode_is_420_only(info, mode)) {
+ *num_output_fmts = i;
+ return output_fmts;
+ }
}
/*
--
2.40.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-05-28 14:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-28 13:59 [PATCH 0/3] Add additional YUV420 bus format check for dw-meson's bridge enable Adrián Larumbe
2023-05-28 13:59 ` [PATCH 1/3] drm/meson: dw-hdmi: change YUV420 selection logic at clock setup Adrián Larumbe
2023-05-30 7:48 ` Neil Armstrong
2023-05-28 14:00 ` Adrián Larumbe [this message]
2023-05-30 7:46 ` [PATCH 2/3] dw-hdmi: truly enforce 420-only formats when drm mode demands it Neil Armstrong
2023-05-28 14:00 ` [PATCH 3/3] dw-hdmi: remove dead code and fix indentation Adrián Larumbe
2023-05-29 8:40 ` AngeloGioacchino Del Regno
2023-05-30 7:49 ` 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=20230528140001.1057084-3-adrian.larumbe@collabora.com \
--to=adrian.larumbe@collabora.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=narmstrong@baylibre.com \
--cc=rfoss@kernel.org \
/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®