mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-31 03:01:47 +00:00
AR-1 - Adding support category for distributions AR-4 - Remove Allwinner legacy AR-5 - Drop Udoo family and move Udoo board into newly created imx6 family AR-9 - Rename sunxi-next to sunxi-legacy AR-10 - Rename sunxi-dev to sunxi-current AR-11 - Adding Radxa Rockpi S support AR-13 - Rename rockchip64-default to rockchip64-legacy AR-14 - Add rockchip64-current as mainline source AR-15 - Drop Rockchip 4.19.y NEXT, current become 5.3.y AR-16 - Rename RK3399 default to legacy AR-17 - Rename Odroid XU4 next and default to legacy 4.14.y, add DEV 5.4.y AR-18 - Add Odroid N2 current mainline AR-19 - Move Odroid C1 to meson family AR-20 - Rename mvebu64-default to mvebu64-legacy AR-21 - Rename mvebu-default to mvebu-legacy AR-22 - Rename mvebu-next to mvebu-current AR-23 - Drop meson64 default and next, current becomes former DEV 5.3.y AR-24 - Drop cubox family and move Cubox/Hummingboard boards under imx6 AR-26 - Adjust motd AR-27 - Enabling distribution release status AR-28 - Added new GCC compilers AR-29 - Implementing Ubuntu Eoan AR-30 - Add desktop packages per board or family AR-31 - Remove (Ubuntu/Debian) distribution name from image filename AR-32 - Move arch configs from configuration.sh to separate arm64 and armhf config files AR-33 - Revision numbers for beta builds changed to day_in_the_year AR-34 - Patches support linked patches AR-35 - Break meson64 family into gxbb and gxl AR-36 - Add Nanopineo2 Black AR-38 - Upgrade option from old branches to new one via armbian-config AR-41 - Show full timezone info AR-43 - Merge Odroid N2 to meson64 AR-44 - Enable FORCE_BOOTSCRIPT_UPDATE for all builds
112 lines
3.9 KiB
Diff
112 lines
3.9 KiB
Diff
From 057c57825bba67e0d72c19d76a11de9da803db30 Mon Sep 17 00:00:00 2001
|
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
Date: Mon, 20 May 2019 15:37:50 +0200
|
|
Subject: [PATCH 2/5] drm/bridge: add encoder support to specify bridge input
|
|
format
|
|
|
|
This patch adds a new format_set() callback to the bridge ops permitting
|
|
the encoder to specify the new input format and encoding.
|
|
|
|
This allows supporting the very specific HDMI2.0 YUV420 output mode
|
|
when the bridge cannot convert from RGB or YUV444 to YUV420.
|
|
|
|
In this case, the encode must downsample before the bridge and must
|
|
specify the bridge the new input bus format differs.
|
|
|
|
This will also help supporting the YUV420 mode where the bridge cannot
|
|
downsample, and also support 10bit, 12bit and 16bit output modes
|
|
when the bridge cannot convert between different bit depths.
|
|
|
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
|
---
|
|
drivers/gpu/drm/drm_bridge.c | 35 +++++++++++++++++++++++++++++++++++
|
|
include/drm/drm_bridge.h | 19 +++++++++++++++++++
|
|
2 files changed, 54 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
|
|
index cba537c99e43..a4458dbfe302 100644
|
|
--- a/drivers/gpu/drm/drm_bridge.c
|
|
+++ b/drivers/gpu/drm/drm_bridge.c
|
|
@@ -307,6 +307,41 @@ void drm_bridge_mode_set(struct drm_bridge *bridge,
|
|
}
|
|
EXPORT_SYMBOL(drm_bridge_mode_set);
|
|
|
|
+/**
|
|
+ * drm_bridge_format_set - setup with proposed input format and encoding for
|
|
+ * all bridges in the encoder chain
|
|
+ * @bridge: bridge control structure
|
|
+ * @input_bus_format: proposed input bus format for the bridge
|
|
+ * @input_encoding: proposed input encoding for this bridge
|
|
+ *
|
|
+ * Calls &drm_bridge_funcs.format_set op for all the bridges in the
|
|
+ * encoder chain, starting from the first bridge to the last.
|
|
+ *
|
|
+ * Note: the bridge passed should be the one closest to the encoder
|
|
+ *
|
|
+ * RETURNS:
|
|
+ * true on success, false if one of the bridge cannot handle the format
|
|
+ */
|
|
+bool drm_bridge_format_set(struct drm_bridge *bridge,
|
|
+ const u32 input_bus_format,
|
|
+ const u32 input_encoding)
|
|
+{
|
|
+ bool ret = true;
|
|
+
|
|
+ if (!bridge)
|
|
+ return true;
|
|
+
|
|
+ if (bridge->funcs->format_set)
|
|
+ ret = bridge->funcs->format_set(bridge, input_bus_format,
|
|
+ input_encoding);
|
|
+ if (!ret)
|
|
+ return ret;
|
|
+
|
|
+ return drm_bridge_format_set(bridge->next, input_bus_format,
|
|
+ input_encoding);
|
|
+}
|
|
+EXPORT_SYMBOL(drm_bridge_format_set);
|
|
+
|
|
/**
|
|
* drm_bridge_pre_enable - prepares for enabling all
|
|
* bridges in the encoder chain
|
|
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
|
|
index 7616f6562fe4..161026c9b908 100644
|
|
--- a/include/drm/drm_bridge.h
|
|
+++ b/include/drm/drm_bridge.h
|
|
@@ -198,6 +198,22 @@ struct drm_bridge_funcs {
|
|
void (*mode_set)(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
+
|
|
+ /**
|
|
+ * @format_set:
|
|
+ *
|
|
+ * This callback should configure the bridge for the given input bus
|
|
+ * format and encoding. It is called after the @format_set callback
|
|
+ * for the preceding element in the display pipeline has been called
|
|
+ * already. If the bridge is the first element then this would be
|
|
+ * &drm_encoder_helper_funcs.format_set. The display pipe (i.e.
|
|
+ * clocks and timing signals) is off when this function is called.
|
|
+ *
|
|
+ * @returns: true in success, false is a bridge refuses the format
|
|
+ */
|
|
+ bool (*format_set)(struct drm_bridge *bridge,
|
|
+ const u32 input_bus_format,
|
|
+ const u32 input_encoding);
|
|
/**
|
|
* @pre_enable:
|
|
*
|
|
@@ -416,6 +432,9 @@ void drm_bridge_post_disable(struct drm_bridge *bridge);
|
|
void drm_bridge_mode_set(struct drm_bridge *bridge,
|
|
const struct drm_display_mode *mode,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
+bool drm_bridge_format_set(struct drm_bridge *bridge,
|
|
+ const u32 input_bus_format,
|
|
+ const u32 input_encoding);
|
|
void drm_bridge_pre_enable(struct drm_bridge *bridge);
|
|
void drm_bridge_enable(struct drm_bridge *bridge);
|
|
|
|
--
|
|
2.20.1
|
|
|