Skip to content

Commit 0c4558a

Browse files
Kwiboommind
authored andcommitted
drm/rockchip: Load crtc devices in preferred order
On RK3399 the VOPL is loaded before VOPB and get registered as crtc-0. However, on RK3288 and PX30 VOPB is gets registered as crtc-0 instead of VOPL. With VOPL registered as crtc-0 the kernel kms client is not able to enable 4K display modes for console use on RK3399. Load VOPB before VOPL to help kernel kms client make use of 4K display modes for console use on RK3399. Signed-off-by: Jonas Karlman <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 28f0ae4 commit 0c4558a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

drivers/gpu/drm/rockchip/rockchip_drm_drv.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,34 @@ static void rockchip_drm_match_remove(struct device *dev)
354354
device_link_del(link);
355355
}
356356

357+
/* list of preferred vop devices */
358+
static const char *const rockchip_drm_match_preferred[] = {
359+
"rockchip,rk3399-vop-big",
360+
NULL,
361+
};
362+
357363
static struct component_match *rockchip_drm_match_add(struct device *dev)
358364
{
359365
struct component_match *match = NULL;
366+
struct device_node *port;
360367
int i;
361368

369+
/* add preferred vop device match before adding driver device matches */
370+
for (i = 0; ; i++) {
371+
port = of_parse_phandle(dev->of_node, "ports", i);
372+
if (!port)
373+
break;
374+
375+
if (of_device_is_available(port->parent) &&
376+
of_device_compatible_match(port->parent,
377+
rockchip_drm_match_preferred))
378+
drm_of_component_match_add(dev, &match,
379+
component_compare_of,
380+
port->parent);
381+
382+
of_node_put(port);
383+
}
384+
362385
for (i = 0; i < num_rockchip_sub_drivers; i++) {
363386
struct platform_driver *drv = rockchip_sub_drivers[i];
364387
struct device *p = NULL, *d;

0 commit comments

Comments
 (0)