Message ID | 20200206191834.6125-6-narmstrong@baylibre.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | drm/bridge: dw-hdmi: implement bus-format negotiation and YUV420 support | expand |
On 06/02/2020 20:18, Neil Armstrong wrote: > Now the DW-HDMI Controller supports the HDMI2.0 modes, enable support > for these modes in the connector if the platform supports them. > We limit these modes to DW-HDMI IP version >= 0x200a which > are designed to support HDMI2.0 display modes. > > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++ > include/drm/bridge/dw_hdmi.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 15048ad694bc..4b35ea1427df 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -3231,6 +3231,12 @@ __dw_hdmi_probe(struct platform_device *pdev, > hdmi->bridge.of_node = pdev->dev.of_node; > #endif > > + if (hdmi->version >= 0x200a) > + hdmi->connector.ycbcr_420_allowed = > + hdmi->plat_data->ycbcr_420_allowed; > + else > + hdmi->connector.ycbcr_420_allowed = false; > + > memset(&pdevinfo, 0, sizeof(pdevinfo)); > pdevinfo.parent = dev; > pdevinfo.id = PLATFORM_DEVID_AUTO; > diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h > index 9d4d5cc47969..0b34a12c4a1c 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -129,6 +129,7 @@ struct dw_hdmi_plat_data { > unsigned long input_bus_format; > unsigned long input_bus_encoding; > bool use_drm_infoframe; > + bool ycbcr_420_allowed; > > /* Vendor PHY support */ > const struct dw_hdmi_phy_ops *phy_ops; > Forgot to add: Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> from 020c82bc-15fd-6e23-a093-62abfa9b466d@samsung.com Neil
Hi Neil, Thank you for the patch. On Thu, Feb 06, 2020 at 08:18:28PM +0100, Neil Armstrong wrote: > Now the DW-HDMI Controller supports the HDMI2.0 modes, enable support > for these modes in the connector if the platform supports them. > We limit these modes to DW-HDMI IP version >= 0x200a which > are designed to support HDMI2.0 display modes. > > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++ > include/drm/bridge/dw_hdmi.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 15048ad694bc..4b35ea1427df 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -3231,6 +3231,12 @@ __dw_hdmi_probe(struct platform_device *pdev, > hdmi->bridge.of_node = pdev->dev.of_node; > #endif > > + if (hdmi->version >= 0x200a) > + hdmi->connector.ycbcr_420_allowed = > + hdmi->plat_data->ycbcr_420_allowed; > + else > + hdmi->connector.ycbcr_420_allowed = false; > + The hdmi structure being allocated with kzalloc, you don't need the second branch of the if, but I'm fine if you prefer keeping it. Any either case, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > memset(&pdevinfo, 0, sizeof(pdevinfo)); > pdevinfo.parent = dev; > pdevinfo.id = PLATFORM_DEVID_AUTO; > diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h > index 9d4d5cc47969..0b34a12c4a1c 100644 > --- a/include/drm/bridge/dw_hdmi.h > +++ b/include/drm/bridge/dw_hdmi.h > @@ -129,6 +129,7 @@ struct dw_hdmi_plat_data { > unsigned long input_bus_format; > unsigned long input_bus_encoding; > bool use_drm_infoframe; > + bool ycbcr_420_allowed; > > /* Vendor PHY support */ > const struct dw_hdmi_phy_ops *phy_ops;
On 02/03/2020 11:03, Laurent Pinchart wrote: > Hi Neil, > > Thank you for the patch. > > On Thu, Feb 06, 2020 at 08:18:28PM +0100, Neil Armstrong wrote: >> Now the DW-HDMI Controller supports the HDMI2.0 modes, enable support >> for these modes in the connector if the platform supports them. >> We limit these modes to DW-HDMI IP version >= 0x200a which >> are designed to support HDMI2.0 display modes. >> >> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> >> --- >> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++ >> include/drm/bridge/dw_hdmi.h | 1 + >> 2 files changed, 7 insertions(+) >> >> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> index 15048ad694bc..4b35ea1427df 100644 >> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> @@ -3231,6 +3231,12 @@ __dw_hdmi_probe(struct platform_device *pdev, >> hdmi->bridge.of_node = pdev->dev.of_node; >> #endif >> >> + if (hdmi->version >= 0x200a) >> + hdmi->connector.ycbcr_420_allowed = >> + hdmi->plat_data->ycbcr_420_allowed; >> + else >> + hdmi->connector.ycbcr_420_allowed = false; >> + > > The hdmi structure being allocated with kzalloc, you don't need the > second branch of the if, but I'm fine if you prefer keeping it. Any > either case, Yep Andrzej said the same, but I prefer it to be explicit. > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Thanks, Neil > >> memset(&pdevinfo, 0, sizeof(pdevinfo)); >> pdevinfo.parent = dev; >> pdevinfo.id = PLATFORM_DEVID_AUTO; >> diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h >> index 9d4d5cc47969..0b34a12c4a1c 100644 >> --- a/include/drm/bridge/dw_hdmi.h >> +++ b/include/drm/bridge/dw_hdmi.h >> @@ -129,6 +129,7 @@ struct dw_hdmi_plat_data { >> unsigned long input_bus_format; >> unsigned long input_bus_encoding; >> bool use_drm_infoframe; >> + bool ycbcr_420_allowed; >> >> /* Vendor PHY support */ >> const struct dw_hdmi_phy_ops *phy_ops; >
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 15048ad694bc..4b35ea1427df 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3231,6 +3231,12 @@ __dw_hdmi_probe(struct platform_device *pdev, hdmi->bridge.of_node = pdev->dev.of_node; #endif + if (hdmi->version >= 0x200a) + hdmi->connector.ycbcr_420_allowed = + hdmi->plat_data->ycbcr_420_allowed; + else + hdmi->connector.ycbcr_420_allowed = false; + memset(&pdevinfo, 0, sizeof(pdevinfo)); pdevinfo.parent = dev; pdevinfo.id = PLATFORM_DEVID_AUTO; diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 9d4d5cc47969..0b34a12c4a1c 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -129,6 +129,7 @@ struct dw_hdmi_plat_data { unsigned long input_bus_format; unsigned long input_bus_encoding; bool use_drm_infoframe; + bool ycbcr_420_allowed; /* Vendor PHY support */ const struct dw_hdmi_phy_ops *phy_ops;
Now the DW-HDMI Controller supports the HDMI2.0 modes, enable support for these modes in the connector if the platform supports them. We limit these modes to DW-HDMI IP version >= 0x200a which are designed to support HDMI2.0 display modes. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++ include/drm/bridge/dw_hdmi.h | 1 + 2 files changed, 7 insertions(+)