drm/rockchip: move loader_protect to rockchip_drm_private

move loader_protect flag from drm_mode_config to rockchip_drm_private.

Change-Id: I7f9ec53ac9a29d3b467697a99159ad4bb7d05e3d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2020-06-30 15:41:40 +08:00
committed by Tao Huang
parent b5e8a5bae5
commit 074532c0a0
5 changed files with 11 additions and 10 deletions

View File

@@ -448,8 +448,7 @@ retry:
}
}
if (!dev->mode_config.loader_protect)
ret = drm_atomic_commit(state);
ret = drm_atomic_commit(state);
out_state:
if (ret == -EDEADLK)

View File

@@ -219,7 +219,7 @@ void rockchip_free_loader_memory(struct drm_device *drm)
free_reserved_area(start, end, -1, "drm_logo");
kfree(logo);
private->logo = NULL;
drm->mode_config.loader_protect = false;
private->loader_protect = false;
}
static int init_loader_memory(struct drm_device *drm_dev)
@@ -789,6 +789,7 @@ static void show_loader_logo(struct drm_device *drm_dev)
struct drm_atomic_state *state, *old_state;
struct device_node *np = drm_dev->dev->of_node;
struct drm_mode_config *mode_config = &drm_dev->mode_config;
struct rockchip_drm_private *private = drm_dev->dev_private;
struct device_node *root, *route;
struct rockchip_drm_mode_set *set, *tmp, *unset;
struct list_head mode_set_list;
@@ -929,7 +930,7 @@ static void show_loader_logo(struct drm_device *drm_dev)
drm_atomic_state_put(old_state);
drm_atomic_state_put(state);
mode_config->loader_protect = true;
private->loader_protect = true;
drm_modeset_unlock_all(drm_dev);
return;
err_free_old_state:

View File

@@ -169,6 +169,12 @@ struct rockchip_drm_private {
u8 dmc_support;
struct list_head psr_list;
struct mutex psr_list_lock;
/**
* @loader_protect
* ignore restore_fbdev_mode_atomic when in logo on state
*/
bool loader_protect;
};
#ifndef MODULE

View File

@@ -226,7 +226,7 @@ static void rockchip_drm_output_poll_changed(struct drm_device *dev)
struct rockchip_drm_private *private = dev->dev_private;
struct drm_fb_helper *fb_helper = private->fbdev_helper;
if (fb_helper)
if (fb_helper && !private->loader_protect)
drm_fb_helper_hotplug_event(fb_helper);
}

View File

@@ -869,11 +869,6 @@ struct drm_mode_config {
struct drm_atomic_state *suspend_state;
const struct drm_mode_config_helper_funcs *helper_private;
/**
* @loader_protect
* ignore restore_fbdev_mode_atomic when in logo on state
*/
bool loader_protect;
};
void drm_mode_config_init(struct drm_device *dev);