summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>2026-09-01 21:50:28 +0300
committerCristian Ciocaltea <cristian.ciocaltea@collabora.com>2026-09-19 23:03:43 +0300
commit400c9ede1ea4a4f26931a269b60de34cb26d51ec (patch)
treec08418affb4acd64655808d1fdcec1a7d962e84f /include
parent245e321b61e384d956b95a3bfa59ac25ca4609c6 (diff)
downloadlinux-next-400c9ede1ea4a4f26931a269b60de34cb26d51ec.tar.gz
linux-next-400c9ede1ea4a4f26931a269b60de34cb26d51ec.zip
drm/connector: Add drmm_connector_hdmi_init() with new signature
In preparation for providing HDMI 2.x source capabilities, move the vendor, product, supported_formats and max_bpc parameters out of the init function into struct drm_connector_hdmi_funcs, and add new supported_hdmi_ver and supported_tmds_char_rate fields there as well. Appending more HDMI-specific arguments to that function would not scale well, hence introduce drmm_connector_hdmi_init() with the reduced signature. Additionally, add the max_tmds_char_rate field to struct drm_connector_hdmi and use the supported HDMI version to determinate the maximum TMDS character rate allowed by the specification. Some controllers, however, may support a lower rate than that version would imply. A non-zero supported_tmds_char_rate lets drivers override this default with the actual controller capability. A value of zero keeps the limit inferred from supported_hdmi_ver. Callers are converted in the following patches, while the old and now renamed *_ini2() helper is removed at the end of the series. No functional changes expected for existing callers. Tested-by: Diederik de Haas <diederik@cknow-tech.com> # NanoPC-T6 LTS, Rock 5B Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Igor Paunovic <royalnet026@gmail.com> # RK3588 Orange Pi 5 Plus, dual HDMI Tested-by: Robin Räber <robin.raebi@gmail.com> Link: https://patch.msgid.link/20260901-dw-hdmi-qp-scramb-v11-4-bc12954a0688@collabora.com Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_connector.h62
1 files changed, 61 insertions, 1 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index f039bb8acf10..be51265e8e26 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1470,9 +1470,51 @@ struct drm_connector_infoframe_funcs {
/**
* struct drm_connector_hdmi_funcs - drm_hdmi_connector control functions
+ * and controller capabilities
*/
struct drm_connector_hdmi_funcs {
/**
+ * @vendor: HDMI Controller Vendor name.
+ */
+ const char *vendor;
+
+ /**
+ * @product: HDMI Controller Product name
+ */
+ const char *product;
+
+ /**
+ * @supported_hdmi_ver:
+ *
+ * Maximum HDMI specification version supported by the controller side
+ * of this connector. This describes the controller capability only;
+ * the effective link capabilities may be further restricted by the
+ * sink, bridge, or mode validation.
+ */
+ enum hdmi_version supported_hdmi_ver;
+
+ /**
+ * @supported_tmds_char_rate:
+ *
+ * Maximum TMDS character rate supported by the controller, in Hz.
+ * A value of 0 means the core should use the default limit implied by
+ * @supported_hdmi_ver.
+ */
+ unsigned long long supported_tmds_char_rate;
+
+ /**
+ * @supported_formats:
+ *
+ * Bitmask of @drm_output_color_format listing supported output formats.
+ */
+ unsigned long supported_formats;
+
+ /**
+ * @max_bpc: Maximum bits per char the HDMI connector supports.
+ */
+ unsigned int max_bpc;
+
+ /**
* @tmds_char_rate_valid:
*
* This callback is invoked at atomic_check time to figure out
@@ -2119,7 +2161,19 @@ struct drm_connector_hdmi {
unsigned long supported_formats;
/**
- * @funcs: HDMI connector Control Functions
+ * @max_tmds_char_rate: Maximum TMDS character rate, in Hz,
+ * supported by the controller.
+ *
+ * This is inferred from &drm_connector_hdmi_funcs.supported_hdmi_ver,
+ * by default. However, controllers may support a lower rate than that
+ * specification version would imply. If that is the case, drivers are
+ * expected to set &drm_connector_hdmi_funcs.supported_tmds_char_rate
+ * to a non-zero value indicating the actual limit.
+ */
+ unsigned long long max_tmds_char_rate;
+
+ /**
+ * @funcs: HDMI connector Control Functions and controller capabilities
*/
const struct drm_connector_hdmi_funcs *funcs;
@@ -2616,6 +2670,12 @@ int drmm_connector_init(struct drm_device *dev,
const struct drm_connector_funcs *funcs,
int connector_type,
struct i2c_adapter *ddc);
+int drmm_connector_hdmi_init(struct drm_device *dev,
+ struct drm_connector *connector,
+ const struct drm_connector_funcs *funcs,
+ const struct drm_connector_hdmi_funcs *hdmi_funcs,
+ int connector_type,
+ struct i2c_adapter *ddc);
int drmm_connector_hdmi_ini2(struct drm_device *dev,
struct drm_connector *connector,
const char *vendor, const char *product,