mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
drm/fb-helper: Look up preferred fbdev node number from DT
For situations where there are multiple DRM cards in a system,
add a query of DT for "drm_fb" designations for cards to set
their preferred /dev/fbN designation.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drm/fb_helper: Change query for FB designation from drm_fb to drm-fb
Fixes: 1216ea56c2 ("drm/fb-helper: Look up preferred fbdev node number from DT")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
be2b2322e1
commit
8cf01a263e
@@ -1844,7 +1844,7 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)
|
|||||||
struct drm_device *dev = fb_helper->dev;
|
struct drm_device *dev = fb_helper->dev;
|
||||||
struct fb_info *info;
|
struct fb_info *info;
|
||||||
unsigned int width, height;
|
unsigned int width, height;
|
||||||
int ret;
|
int ret, id;
|
||||||
|
|
||||||
width = dev->mode_config.max_width;
|
width = dev->mode_config.max_width;
|
||||||
height = dev->mode_config.max_height;
|
height = dev->mode_config.max_height;
|
||||||
@@ -1872,6 +1872,15 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)
|
|||||||
* register the fbdev emulation instance in kernel_fb_helper_list. */
|
* register the fbdev emulation instance in kernel_fb_helper_list. */
|
||||||
mutex_unlock(&fb_helper->lock);
|
mutex_unlock(&fb_helper->lock);
|
||||||
|
|
||||||
|
id = of_alias_get_highest_id("drm-fb");
|
||||||
|
if (id >= 0)
|
||||||
|
fb_set_lowest_dynamic_fb(id + 1);
|
||||||
|
|
||||||
|
id = of_alias_get_id(dev->dev->of_node, "drm-fb");
|
||||||
|
if (id >= 0) {
|
||||||
|
info->node = id;
|
||||||
|
info->custom_fb_num = true;
|
||||||
|
}
|
||||||
ret = register_framebuffer(info);
|
ret = register_framebuffer(info);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user