diff options
author | Maxime Ripard <mripard@kernel.org> | 2024-05-27 15:58:00 +0200 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2024-05-28 10:12:26 +0200 |
commit | f035f4097f1e0a35a457b72427bb0c06ca0c81c4 (patch) | |
tree | 35db77a98a22b6080b608be1646af32b4e269828 /drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | |
parent | abb6f74973e20956d42e8227dde6fb4e92502c14 (diff) |
drm/connector: hdmi: Calculate TMDS character rate
Most HDMI drivers have some code to calculate the TMDS character rate,
usually to adjust an internal clock to match what the mode requires.
Since the TMDS character rates mostly depends on the resolution, whether
we need to repeat pixels or not, the bpc count and the format, we can
now derive it from the HDMI connector state that stores all those infos
and remove the duplication from drivers.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-11-c5af16c3aae2@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c')
-rw-r--r-- | drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c index 99fed169ea4d..71cfc7450134 100644 --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c @@ -72,6 +72,9 @@ static int light_up_connector(struct kunit *test, conn_state = drm_atomic_get_connector_state(state, connector); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state); + conn_state->hdmi.output_bpc = connector->max_bpc; + conn_state->hdmi.output_format = HDMI_COLORSPACE_RGB; + ret = drm_atomic_set_crtc_for_connector(conn_state, crtc); KUNIT_EXPECT_EQ(test, ret, 0); |