summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_hdmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_hdmi.h')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
index 1076faeab616..51b27dcdcd9b 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
@@ -8,18 +8,6 @@
#include "vc4_drv.h"
-/* VC4 HDMI encoder KMS struct */
-struct vc4_hdmi_encoder {
- struct vc4_encoder base;
- bool hdmi_monitor;
-};
-
-static inline struct vc4_hdmi_encoder *
-to_vc4_hdmi_encoder(struct drm_encoder *encoder)
-{
- return container_of(encoder, struct vc4_hdmi_encoder, base.base);
-}
-
struct vc4_hdmi;
struct vc4_hdmi_register;
struct vc4_hdmi_connector_state;
@@ -121,6 +109,13 @@ struct vc4_hdmi_audio {
bool streaming;
};
+enum vc4_hdmi_output_format {
+ VC4_HDMI_OUTPUT_RGB,
+ VC4_HDMI_OUTPUT_YUV422,
+ VC4_HDMI_OUTPUT_YUV444,
+ VC4_HDMI_OUTPUT_YUV420,
+};
+
/* General HDMI hardware state. */
struct vc4_hdmi {
struct vc4_hdmi_audio audio;
@@ -128,7 +123,7 @@ struct vc4_hdmi {
struct platform_device *pdev;
const struct vc4_hdmi_variant *variant;
- struct vc4_hdmi_encoder encoder;
+ struct vc4_encoder encoder;
struct drm_connector connector;
struct delayed_work scrambling_work;
@@ -220,6 +215,18 @@ struct vc4_hdmi {
* the scrambler on? Protected by @mutex.
*/
bool scdc_enabled;
+
+ /**
+ * @output_bpc: Copy of @vc4_connector_state.output_bpc for use
+ * outside of KMS hooks. Protected by @mutex.
+ */
+ unsigned int output_bpc;
+
+ /**
+ * @output_format: Copy of @vc4_connector_state.output_format
+ * for use outside of KMS hooks. Protected by @mutex.
+ */
+ enum vc4_hdmi_output_format output_format;
};
static inline struct vc4_hdmi *
@@ -231,14 +238,15 @@ connector_to_vc4_hdmi(struct drm_connector *connector)
static inline struct vc4_hdmi *
encoder_to_vc4_hdmi(struct drm_encoder *encoder)
{
- struct vc4_hdmi_encoder *_encoder = to_vc4_hdmi_encoder(encoder);
-
+ struct vc4_encoder *_encoder = to_vc4_encoder(encoder);
return container_of(_encoder, struct vc4_hdmi, encoder);
}
struct vc4_hdmi_connector_state {
struct drm_connector_state base;
- unsigned long long pixel_rate;
+ unsigned long long tmds_char_rate;
+ unsigned int output_bpc;
+ enum vc4_hdmi_output_format output_format;
};
static inline struct vc4_hdmi_connector_state *