&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
NULL,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_EXPECT_MEMEQ(test,
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_EXPECT_MEMEQ(test,
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_EXPECT_MEMEQ(test,
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_EXPECT_MEMEQ(test,
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
9);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
0);
KUNIT_EXPECT_LT(test, ret, 0);
}
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10);
KUNIT_EXPECT_EQ(test, ret, 0);
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12);
KUNIT_EXPECT_EQ(test, ret, 0);
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_YUV422),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
#define YUV420_ALLOWED_TEST(_formats, _allowed, _result) \
{ \
- .supported_formats = BIT(HDMI_COLORSPACE_RGB) | (_formats), \
+ .supported_formats = BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) | (_formats), \
.yuv420_allowed = _allowed, \
.expected_result = _result, \
}
static const struct drm_connector_hdmi_init_formats_yuv420_allowed_test
drm_connector_hdmi_init_formats_yuv420_allowed_tests[] = {
- YUV420_ALLOWED_TEST(BIT(HDMI_COLORSPACE_YUV420), true, 0),
- YUV420_ALLOWED_TEST(BIT(HDMI_COLORSPACE_YUV420), false, -EINVAL),
- YUV420_ALLOWED_TEST(BIT(HDMI_COLORSPACE_YUV422), true, -EINVAL),
- YUV420_ALLOWED_TEST(BIT(HDMI_COLORSPACE_YUV422), false, 0),
+ YUV420_ALLOWED_TEST(BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420), true, 0),
+ YUV420_ALLOWED_TEST(BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420), false, -EINVAL),
+ YUV420_ALLOWED_TEST(BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422), true, -EINVAL),
+ YUV420_ALLOWED_TEST(BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422), false, 0),
};
static void
&dummy_hdmi_funcs,
connector_type,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
}
&dummy_hdmi_funcs,
connector_type,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_LT(test, ret, 0);
}
static const
struct drm_hdmi_connector_get_output_format_name_test
drm_hdmi_connector_get_output_format_name_valid_tests[] = {
- OUTPUT_FORMAT_TEST(HDMI_COLORSPACE_RGB, "RGB"),
- OUTPUT_FORMAT_TEST(HDMI_COLORSPACE_YUV420, "YUV 4:2:0"),
- OUTPUT_FORMAT_TEST(HDMI_COLORSPACE_YUV422, "YUV 4:2:2"),
- OUTPUT_FORMAT_TEST(HDMI_COLORSPACE_YUV444, "YUV 4:4:4"),
+ OUTPUT_FORMAT_TEST(DRM_OUTPUT_COLOR_FORMAT_RGB444, "RGB"),
+ OUTPUT_FORMAT_TEST(DRM_OUTPUT_COLOR_FORMAT_YCBCR420, "YUV 4:2:0"),
+ OUTPUT_FORMAT_TEST(DRM_OUTPUT_COLOR_FORMAT_YCBCR422, "YUV 4:2:2"),
+ OUTPUT_FORMAT_TEST(DRM_OUTPUT_COLOR_FORMAT_YCBCR444, "YUV 4:4:4"),
};
static void
&dummy_hdmi_funcs,
DRM_MODE_CONNECTOR_HDMIA,
&priv->ddc,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 8, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1000ULL, rate);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 10, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 10, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1250, rate);
}
mode = drm_kunit_display_mode_from_cea_vic(test, drm, 1);
KUNIT_ASSERT_NOT_NULL(test, mode);
- rate = drm_hdmi_compute_mode_clock(mode, 10, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 10, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, rate, 0);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1500, rate);
}
mode = drm_kunit_display_mode_from_cea_vic(test, drm, 1);
KUNIT_ASSERT_NOT_NULL(test, mode);
- rate = drm_hdmi_compute_mode_clock(mode, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, rate, 0);
}
KUNIT_ASSERT_TRUE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(mode, 8, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, (mode->clock * 1000ULL) * 2, rate);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(mode, 8, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, (mode->clock * 1000ULL) / 2, rate);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 10, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(mode, 10, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 625, rate);
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 12, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(mode, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 750, rate);
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(mode, 8, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1000, rate);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 10, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(mode, 10, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1000, rate);
}
KUNIT_ASSERT_FALSE(test, mode->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(mode, 12, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(mode, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, mode->clock * 1000, rate);
}
enc->possible_crtcs = drm_crtc_mask(priv->crtc);
conn = &priv->connector;
- conn->ycbcr_420_allowed = !!(formats & BIT(HDMI_COLORSPACE_YUV420));
+ conn->ycbcr_420_allowed = !!(formats & BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420));
ret = drmm_connector_hdmi_init(drm, conn,
"Vendor", "Product",
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
broadcast_rgb = *(enum drm_hdmi_broadcast_rgb *)test->param_value;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV420),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420),
8,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_4k_yuv420_dc_max_200mhz);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
KUNIT_ASSERT_EQ(test, conn_state->hdmi.broadcast_rgb, broadcast_rgb);
- KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_YUV420);
+ KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_EXPECT_TRUE(test, conn_state->hdmi.is_limited_range);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12,
&dummy_connector_hdmi_funcs,
test_edid_dvi_1080p);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.tmds_char_rate, preferred->clock * 1000);
drm_modeset_drop_locks(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_340mhz);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_bpc, 10);
- KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.tmds_char_rate, preferred->clock * 1250);
drm_modeset_drop_locks(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_340mhz);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_bpc, 12);
- KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_ASSERT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.tmds_char_rate, preferred->clock * 1500);
drm_modeset_drop_locks(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
KUNIT_ASSERT_NOT_NULL(test, preferred);
KUNIT_ASSERT_FALSE(test, preferred->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 10, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 10, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 10);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.tmds_char_rate, preferred->clock * 1250);
drm_modeset_drop_locks(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV420),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_4k_yuv420_dc_max_200mhz);
KUNIT_ASSERT_NOT_NULL(test, yuv420_only_mode);
KUNIT_ASSERT_TRUE(test, drm_mode_is_420_only(info, yuv420_only_mode));
- rate = drm_hdmi_compute_mode_clock(yuv420_only_mode, 12, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(yuv420_only_mode, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(yuv420_only_mode, 10, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(yuv420_only_mode, 10, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 10);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_YUV420);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.tmds_char_rate, yuv420_only_mode->clock * 625);
drm_modeset_drop_locks(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
KUNIT_ASSERT_NOT_NULL(test, preferred);
KUNIT_ASSERT_FALSE(test, preferred->flags & DRM_MODE_FLAG_DBLCLK);
- rate = drm_hdmi_compute_mode_clock(preferred, 10, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 10, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 10);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV420),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR420),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_4k_rgb_yuv420_dc_max_340mhz);
KUNIT_ASSERT_FALSE(test, preferred->flags & DRM_MODE_FLAG_DBLCLK);
KUNIT_ASSERT_TRUE(test, drm_mode_is_420_also(info, preferred));
- rate = drm_hdmi_compute_mode_clock(preferred, 8, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 8, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 10, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 10, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_YUV420);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR420);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_4k_yuv420_dc_max_200mhz);
conn_state = conn->state;
KUNIT_ASSERT_NOT_NULL(test, conn_state);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
state = drm_kunit_helper_atomic_state_alloc(test, drm, &ctx);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz);
* But since the driver only supports RGB, we should fallback to
* a lower bpc with RGB.
*/
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_LT(test, conn_state->hdmi.output_bpc, 12);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);
* But since the display only supports RGB, we should fallback to
* a lower bpc with RGB.
*/
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_GT(test, rate, info->max_tmds_clock * 1000);
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_YUV422);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_LT(test, conn_state->hdmi.output_bpc, 12);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_yuv_dc_max_340mhz);
* We're making sure that we have headroom on the TMDS character
* clock to actually use 12bpc.
*/
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_340mhz);
* We're making sure that we have headroom on the TMDS character
* clock to actually use 12bpc.
*/
- rate = drm_hdmi_compute_mode_clock(preferred, 12, HDMI_COLORSPACE_RGB);
+ rate = drm_hdmi_compute_mode_clock(preferred, 12, DRM_OUTPUT_COLOR_FORMAT_RGB444);
KUNIT_ASSERT_LT(test, rate, info->max_tmds_clock * 1000);
drm_modeset_acquire_init(&ctx, 0);
KUNIT_ASSERT_NOT_NULL(test, conn_state);
KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_bpc, 8);
- KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, HDMI_COLORSPACE_RGB);
+ KUNIT_EXPECT_EQ(test, conn_state->hdmi.output_format, DRM_OUTPUT_COLOR_FORMAT_RGB444);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
int ret;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
12);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_connector *conn;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB) |
- BIT(HDMI_COLORSPACE_YUV422) |
- BIT(HDMI_COLORSPACE_YUV444),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422) |
+ BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444),
12);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_display_mode *preferred;
priv = drm_kunit_helper_connector_hdmi_init(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8);
KUNIT_ASSERT_NOT_NULL(test, priv);
struct drm_display_mode *preferred;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&reject_100mhz_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&reject_connector_hdmi_funcs,
no_edid);
struct drm_display_mode *preferred;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_100mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&dummy_connector_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&reject_avi_infoframe_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&reject_hdr_infoframe_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz_hdr);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
10,
&reject_hdr_infoframe_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz_hdr);
int ret;
priv = drm_kunit_helper_connector_hdmi_init_with_edid_funcs(test,
- BIT(HDMI_COLORSPACE_RGB),
+ BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444),
8,
&reject_audio_infoframe_hdmi_funcs,
test_edid_hdmi_1080p_rgb_max_200mhz);