drm/rockchip: dw_hdmi: Call get yuv422 format interface in dw_hdmi-rockchip.c

To be compatible with GKI, dw-hdmi driver can't call interfaces in
rockchip-drm directly. In order for dp to be usable, get yuv422
format interface should define in rockchip-drm. So hdmi call
get yuv422 format interface in dw_hdmi-rockchip.c.

Fixes: dbd228a254 ("drm/bridge: synopsys: dw-hdmi: Get edid yuv422 info independently")
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Icc879ff4420357a6becba84371b9e3317583960b
This commit is contained in:
Algea Cao
2021-10-25 15:35:36 +08:00
committed by Tao Huang
parent 6570412992
commit a7c8450f79
3 changed files with 16 additions and 3 deletions

View File

@@ -42,8 +42,6 @@
#include "dw-hdmi-hdcp.h"
#include "dw-hdmi.h"
#include "../../rockchip/rockchip_drm_drv.h"
#define DDC_CI_ADDR 0x37
#define DDC_SEGMENT_ADDR 0x30
@@ -2907,7 +2905,8 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
drm_connector_update_edid_property(connector, edid);
cec_notifier_set_phys_addr_from_edid(hdmi->cec_notifier, edid);
ret = drm_add_edid_modes(connector, edid);
rockchip_drm_get_yuv422_format(connector, edid);
if (hdmi->plat_data->get_color_changed)
hdmi->plat_data->get_yuv422_format(connector, edid);
dw_hdmi_update_hdr_property(connector);
kfree(edid);
} else {

View File

@@ -940,6 +940,16 @@ dw_hdmi_rockchip_get_color_changed(void *data)
return ret;
}
static int
dw_hdmi_rockchip_get_yuv422_format(struct drm_connector *connector,
struct edid *edid)
{
if (!connector || !edid)
return -EINVAL;
return rockchip_drm_get_yuv422_format(connector, edid);
}
static const struct drm_prop_enum_list color_depth_enum_list[] = {
{ 0, "Automatic" }, /* Prefer highest color depth */
{ 8, "24bit" },
@@ -1600,6 +1610,8 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
dw_hdmi_rockchip_get_hdr_blob;
plat_data->get_color_changed =
dw_hdmi_rockchip_get_color_changed;
plat_data->get_yuv422_format =
dw_hdmi_rockchip_get_yuv422_format;
plat_data->property_ops = &dw_hdmi_rockchip_property_ops;
encoder = &hdmi->encoder;

View File

@@ -196,6 +196,8 @@ struct dw_hdmi_plat_data {
struct drm_property *(*get_hdr_property)(void *data);
struct drm_property_blob *(*get_hdr_blob)(void *data);
bool (*get_color_changed)(void *data);
int (*get_yuv422_format)(struct drm_connector *connector,
struct edid *edid);
/* Vendor Property support */
const struct dw_hdmi_property_ops *property_ops;