mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: lvds: using readable connector name when dual lvds enabled
When we enable Dual LVDS, there will be the following
output in the VOP summary node:
$ cat /sys/kernel/debug/dri/0/summary
...
Video Port1: ACTIVE
Connector: LVDS-1
...
The connector information here is not clear enough. When Dual LVDS is enabled,
both LVDS-0 and LVDS-1 will be enabled (but we will only expose one connector
to user space for operation, which can shield the underlying differences).
In addition, if only LVDS1 is enabled instead of using Dual LVDS,
"LVDS-1" will also be printed here.
In order to express this information more accurately, we will change
the corresponding connector name to "LVDS-DUAL" when using Dual LVDS:
$ cat /sys/kernel/debug/dri/0/summary
...
Video Port1: ACTIVE
Connector: LVDS-DUAL
...
Change-Id: I9621338c8bdec4b32772c3558d55b5b426d3ccc4
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
This commit is contained in:
@@ -731,6 +731,15 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
|
||||
goto err_free_encoder;
|
||||
}
|
||||
|
||||
if (lvds->secondary) {
|
||||
kfree(connector->name);
|
||||
connector->name = kasprintf(GFP_KERNEL, "LVDS-DUAL");
|
||||
if (!connector->name) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free_connector;
|
||||
}
|
||||
}
|
||||
|
||||
drm_connector_helper_add(connector,
|
||||
&rockchip_lvds_connector_helper_funcs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user