diff options
| author | Nicolas Frattaroli <nicolas.frattaroli@collabora.com> | 2026-06-09 14:43:51 +0200 |
|---|---|---|
| committer | Daniel Stone <daniels@collabora.com> | 2026-06-09 21:03:50 +0100 |
| commit | c761e890657c6c257df0dc81e1f9da5e45e3837e (patch) | |
| tree | 5f4b2be3272f67270d3041c16cbc90059f4814e8 /include | |
| parent | 1b61bea2373d157a8b9db0e7304ec72fd80f0759 (diff) | |
| download | linux-c761e890657c6c257df0dc81e1f9da5e45e3837e.tar.gz linux-c761e890657c6c257df0dc81e1f9da5e45e3837e.zip | |
drm/connector: Let connectors have a say in their color format
Add a function to get the connector color format from a connector state,
and a new function pointer in drm_connector_funcs to allow connectors to
override what connector color format it returns.
This is useful for the bridge chain recursive bus format selection code,
which does not wish to implement connector implementation specific
checks like whether it involves HDMI.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20260609-color-format-v17-4-35739b5782cc@collabora.com
Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_connector.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index e1f6072ce7c9..4317166562cf 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -1803,6 +1803,16 @@ struct drm_connector_funcs { * Allows connectors to create connector-specific debugfs files. */ void (*debugfs_init)(struct drm_connector *connector, struct dentry *root); + + /** + * @color_format: + * + * Allows connectors to return a connector color format other than + * @conn_state.color_format for purposes of e.g. display protocol + * specific helper logic having already mapped it to an output format. + */ + enum drm_connector_color_format (*color_format)( + const struct drm_connector_state *conn_state); }; /** @@ -2619,6 +2629,8 @@ drm_connector_is_unregistered(struct drm_connector *connector) void drm_connector_oob_hotplug_event(struct fwnode_handle *connector_fwnode, enum drm_connector_status status); +enum drm_connector_color_format +drm_connector_get_color_format(const struct drm_connector_state *conn_state); const char *drm_get_connector_type_name(unsigned int connector_type); const char *drm_get_connector_status_name(enum drm_connector_status status); const char *drm_get_subpixel_order_name(enum subpixel_order order); |
