drm/bridge: synopsys: dw-hdmi-qp: Support multiple HDMI debugfs nodes

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib7be546cba2130a84fe4a82194800d143cdb61d9
This commit is contained in:
Algea Cao 2022-04-25 14:51:13 +08:00 committed by Tao Huang
parent 0e3de5a3c2
commit dbad11d42f
3 changed files with 6 additions and 1 deletions

View File

@ -2630,7 +2630,10 @@ static const struct file_operations dw_hdmi_status_fops = {
static void dw_hdmi_register_debugfs(struct device *dev, struct dw_hdmi_qp *hdmi)
{
hdmi->debugfs_dir = debugfs_create_dir("dw-hdmi", NULL);
u8 buf[11];
snprintf(buf, sizeof(buf), "dw-hdmi%d", hdmi->plat_data->id);
hdmi->debugfs_dir = debugfs_create_dir(buf, NULL);
if (IS_ERR(hdmi->debugfs_dir)) {
dev_err(dev, "failed to create debugfs dir!\n");
return;

View File

@ -3255,6 +3255,7 @@ static int dw_hdmi_rockchip_probe(struct platform_device *pdev)
if (!plat_data)
return -ENOMEM;
plat_data->id = hdmi->id;
hdmi->plat_data = plat_data;
hdmi->chip_data = plat_data->phy_data;

View File

@ -179,6 +179,7 @@ struct dw_hdmi_plat_data {
unsigned long input_bus_format;
unsigned long input_bus_encoding;
unsigned int max_tmdsclk;
int id;
bool use_drm_infoframe;
bool ycbcr_420_allowed;
bool unsupported_yuv_input;