Message ID | 20241019-bridge-yuv420-v1-3-d74efac9e4e6@linaro.org |
---|---|
State | Accepted |
Commit | d5cd8280c52bad44d5943fa7501bf9f20718d432 |
Headers | show |
Series | [1/6] drm/display: bridge_connector: handle ycbcr_420_allowed | expand |
On 18/10/2024 23:49, Dmitry Baryshkov wrote: > Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other > bridges in the chain still might limit YCbCr 420 support on the > corresponding connector. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > drivers/gpu/drm/bridge/display-connector.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c > index ab8e00baf3f1..aab9ce7be94c 100644 > --- a/drivers/gpu/drm/bridge/display-connector.c > +++ b/drivers/gpu/drm/bridge/display-connector.c > @@ -270,6 +270,10 @@ static int display_connector_probe(struct platform_device *pdev) > /* All the supported connector types support interlaced modes. */ > conn->bridge.interlace_allowed = true; > > + if (type == DRM_MODE_CONNECTOR_HDMIA || > + type == DRM_MODE_CONNECTOR_DisplayPort) > + conn->bridge.ycbcr_420_allowed = true; > + > /* Get the optional connector label. */ > of_property_read_string(pdev->dev.of_node, "label", &label); > > I think we should make sure all HDMI bridges can filter out 420 before landing this, no ? Neil
On Mon, 21 Oct 2024 at 10:29, Neil Armstrong <neil.armstrong@linaro.org> wrote: > > On 18/10/2024 23:49, Dmitry Baryshkov wrote: > > Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other > > bridges in the chain still might limit YCbCr 420 support on the > > corresponding connector. > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > drivers/gpu/drm/bridge/display-connector.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c > > index ab8e00baf3f1..aab9ce7be94c 100644 > > --- a/drivers/gpu/drm/bridge/display-connector.c > > +++ b/drivers/gpu/drm/bridge/display-connector.c > > @@ -270,6 +270,10 @@ static int display_connector_probe(struct platform_device *pdev) > > /* All the supported connector types support interlaced modes. */ > > conn->bridge.interlace_allowed = true; > > > > + if (type == DRM_MODE_CONNECTOR_HDMIA || > > + type == DRM_MODE_CONNECTOR_DisplayPort) > > + conn->bridge.ycbcr_420_allowed = true; > > + > > /* Get the optional connector label. */ > > of_property_read_string(pdev->dev.of_node, "label", &label); > > > > > > I think we should make sure all HDMI bridges can filter out 420 before > landing this, no ? No, it's the other way around: if one of the bridges in a chain doesn't set 420_allowed, then 420_allowed won't be set for the connector, disallowing YCbCr 420 modes. Before this patchset the bridge / platform drivers had to manually set the flag on the created connector (see dw-hdmi + meson-encoder-hdmi or msm/dp).
On 21/10/2024 11:06, Dmitry Baryshkov wrote: > On Mon, 21 Oct 2024 at 10:29, Neil Armstrong <neil.armstrong@linaro.org> wrote: >> >> On 18/10/2024 23:49, Dmitry Baryshkov wrote: >>> Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other >>> bridges in the chain still might limit YCbCr 420 support on the >>> corresponding connector. >>> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >>> --- >>> drivers/gpu/drm/bridge/display-connector.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c >>> index ab8e00baf3f1..aab9ce7be94c 100644 >>> --- a/drivers/gpu/drm/bridge/display-connector.c >>> +++ b/drivers/gpu/drm/bridge/display-connector.c >>> @@ -270,6 +270,10 @@ static int display_connector_probe(struct platform_device *pdev) >>> /* All the supported connector types support interlaced modes. */ >>> conn->bridge.interlace_allowed = true; >>> >>> + if (type == DRM_MODE_CONNECTOR_HDMIA || >>> + type == DRM_MODE_CONNECTOR_DisplayPort) >>> + conn->bridge.ycbcr_420_allowed = true; >>> + >>> /* Get the optional connector label. */ >>> of_property_read_string(pdev->dev.of_node, "label", &label); >>> >>> >> >> I think we should make sure all HDMI bridges can filter out 420 before >> landing this, no ? > > No, it's the other way around: if one of the bridges in a chain > doesn't set 420_allowed, then 420_allowed won't be set for the > connector, disallowing YCbCr 420 modes. > Before this patchset the bridge / platform drivers had to manually set > the flag on the created connector (see dw-hdmi + meson-encoder-hdmi or > msm/dp). > Right, sorry for the noise... Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c index ab8e00baf3f1..aab9ce7be94c 100644 --- a/drivers/gpu/drm/bridge/display-connector.c +++ b/drivers/gpu/drm/bridge/display-connector.c @@ -270,6 +270,10 @@ static int display_connector_probe(struct platform_device *pdev) /* All the supported connector types support interlaced modes. */ conn->bridge.interlace_allowed = true; + if (type == DRM_MODE_CONNECTOR_HDMIA || + type == DRM_MODE_CONNECTOR_DisplayPort) + conn->bridge.ycbcr_420_allowed = true; + /* Get the optional connector label. */ of_property_read_string(pdev->dev.of_node, "label", &label);
Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other bridges in the chain still might limit YCbCr 420 support on the corresponding connector. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/bridge/display-connector.c | 4 ++++ 1 file changed, 4 insertions(+)