drm/display: bridge_connector: handle ycbcr_420_allowed
Follow the interlace_allowed example and calculate drm_connector's ycbcr_420_allowed flag as AND of all drm_bridge's ycbcr_420_allowed flags in a chain. This is one of the gaps between several bridge-specific connector implementations and drm_bridge_connector. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241019-bridge-yuv420-v1-1-d74efac9e4e6@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
91e21479c8
commit
3ced1c6875
2 changed files with 9 additions and 2 deletions
|
@ -397,11 +397,11 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
|
||||||
bridge_connector->encoder = encoder;
|
bridge_connector->encoder = encoder;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: Handle doublescan_allowed, stereo_allowed and
|
* TODO: Handle doublescan_allowed and stereo_allowed.
|
||||||
* ycbcr_420_allowed.
|
|
||||||
*/
|
*/
|
||||||
connector = &bridge_connector->base;
|
connector = &bridge_connector->base;
|
||||||
connector->interlace_allowed = true;
|
connector->interlace_allowed = true;
|
||||||
|
connector->ycbcr_420_allowed = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise connector status handling. First locate the furthest
|
* Initialise connector status handling. First locate the furthest
|
||||||
|
@ -414,6 +414,8 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
|
||||||
drm_for_each_bridge_in_chain(encoder, bridge) {
|
drm_for_each_bridge_in_chain(encoder, bridge) {
|
||||||
if (!bridge->interlace_allowed)
|
if (!bridge->interlace_allowed)
|
||||||
connector->interlace_allowed = false;
|
connector->interlace_allowed = false;
|
||||||
|
if (!bridge->ycbcr_420_allowed)
|
||||||
|
connector->ycbcr_420_allowed = false;
|
||||||
|
|
||||||
if (bridge->ops & DRM_BRIDGE_OP_EDID)
|
if (bridge->ops & DRM_BRIDGE_OP_EDID)
|
||||||
bridge_connector->bridge_edid = bridge;
|
bridge_connector->bridge_edid = bridge;
|
||||||
|
|
|
@ -802,6 +802,11 @@ struct drm_bridge {
|
||||||
* modes.
|
* modes.
|
||||||
*/
|
*/
|
||||||
bool interlace_allowed;
|
bool interlace_allowed;
|
||||||
|
/**
|
||||||
|
* @ycbcr_420_allowed: Indicate that the bridge can handle YCbCr 420
|
||||||
|
* output.
|
||||||
|
*/
|
||||||
|
bool ycbcr_420_allowed;
|
||||||
/**
|
/**
|
||||||
* @pre_enable_prev_first: The bridge requires that the prev
|
* @pre_enable_prev_first: The bridge requires that the prev
|
||||||
* bridge @pre_enable function is called before its @pre_enable,
|
* bridge @pre_enable function is called before its @pre_enable,
|
||||||
|
|
Loading…
Add table
Reference in a new issue