diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-02-22 17:40:41 +0100 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-03-24 13:44:00 +0100 |
commit | dd39d024a8471e88951f8494f19e693c9e3185a9 (patch) | |
tree | ad31d9049b20f55e2afcea9d8f0734b1597c8f5a /drivers/gpu/drm/vc4/vc4_hdmi.h | |
parent | f785dcfc596c378a19af01a6a337b8b67e5e4534 (diff) | |
download | linux-dd39d024a8471e88951f8494f19e693c9e3185a9.tar.gz |
drm/vc4: hdmi: Always try to have the highest bpc
Currently we take the max_bpc property as the bpc value and do not try
anything else.
However, what the other drivers seem to be doing is that they would try
with the highest bpc allowed by the max_bpc property and the hardware
capabilities, test if it results in an acceptable configuration, and if
not decrease the bpc and try again.
Let's use the same logic.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220222164042.403112-7-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_hdmi.h')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_hdmi.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h index cb744bc5489b..79a1a10c40a8 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h @@ -218,7 +218,8 @@ struct vc4_hdmi { bool scdc_enabled; /** - * @output_bpc: BPC currently being used. Protected by @mutex. + * @output_bpc: Copy of @vc4_connector_state.output_bpc for use + * outside of KMS hooks. Protected by @mutex. */ unsigned int output_bpc; }; @@ -240,6 +241,7 @@ encoder_to_vc4_hdmi(struct drm_encoder *encoder) struct vc4_hdmi_connector_state { struct drm_connector_state base; unsigned long long tmds_char_rate; + unsigned int output_bpc; }; static inline struct vc4_hdmi_connector_state * |