drm/rockchip: update crtc->primary->fb to fb help fb

Before this update, drm_fb_helper_is_bound will return false
when hdmi plug.

Change-Id: I28c07b1c1c3405af2627bf423721c757f1e84258
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2018-02-28 14:41:11 +08:00
committed by Tao Huang
parent 0f25f377ac
commit 3edcf7147a

View File

@@ -1268,6 +1268,7 @@ static int rockchip_drm_bind(struct device *dev)
int ret;
struct device_node *np = dev->of_node;
struct device_node *parent_np;
struct drm_crtc *crtc;
drm_dev = drm_dev_alloc(&rockchip_drm_driver, dev);
if (!drm_dev)
@@ -1392,6 +1393,10 @@ static int rockchip_drm_bind(struct device *dev)
if (ret)
goto err_kms_helper_poll_fini;
drm_for_each_crtc(crtc, drm_dev) {
struct drm_fb_helper *helper = private->fbdev_helper;
crtc->primary->fb = helper->fb;
}
drm_dev->mode_config.allow_fb_modifiers = true;
ret = drm_dev_register(drm_dev, 0);