mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
PM / devfreq: rockchip-dmc: fix bug of get lcdc type deadlock
When lcdc status changing and ddr frequency changing at the same time, it may deadlock. Use list_for_each_entry to avoid this bug. Change-Id: I8074dc60b71650ea1afc300282f90ae8ff1ae97b Signed-off-by: Tang Yun ping <typ@rock-chips.com>
This commit is contained in:
committed by
Huang, Tao
parent
3565b1e7e8
commit
df885baaac
@@ -691,14 +691,13 @@ static int rk_drm_get_lcdc_type(void)
|
||||
if (drm) {
|
||||
struct drm_connector *conn;
|
||||
|
||||
drm_modeset_lock(&drm->mode_config.connection_mutex, NULL);
|
||||
drm_for_each_connector(conn, drm) {
|
||||
list_for_each_entry(conn, &drm->mode_config.connector_list,
|
||||
head) {
|
||||
if (conn->encoder) {
|
||||
lcdc_type = conn->connector_type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
drm_modeset_unlock(&drm->mode_config.connection_mutex);
|
||||
}
|
||||
switch (lcdc_type) {
|
||||
case DRM_MODE_CONNECTOR_LVDS:
|
||||
|
||||
Reference in New Issue
Block a user