diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_connector.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_mode_config.c | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 39e470eb8aea..c5cb56db99f6 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c | |||
| @@ -150,7 +150,7 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state) | |||
| 150 | state->connectors[i].state); | 150 | state->connectors[i].state); |
| 151 | state->connectors[i].ptr = NULL; | 151 | state->connectors[i].ptr = NULL; |
| 152 | state->connectors[i].state = NULL; | 152 | state->connectors[i].state = NULL; |
| 153 | drm_connector_unreference(connector); | 153 | drm_connector_put(connector); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | for (i = 0; i < config->num_crtc; i++) { | 156 | for (i = 0; i < config->num_crtc; i++) { |
| @@ -1030,7 +1030,7 @@ drm_atomic_get_connector_state(struct drm_atomic_state *state, | |||
| 1030 | if (!connector_state) | 1030 | if (!connector_state) |
| 1031 | return ERR_PTR(-ENOMEM); | 1031 | return ERR_PTR(-ENOMEM); |
| 1032 | 1032 | ||
| 1033 | drm_connector_reference(connector); | 1033 | drm_connector_get(connector); |
| 1034 | state->connectors[index].state = connector_state; | 1034 | state->connectors[index].state = connector_state; |
| 1035 | state->connectors[index].old_state = connector->state; | 1035 | state->connectors[index].old_state = connector->state; |
| 1036 | state->connectors[index].new_state = connector_state; | 1036 | state->connectors[index].new_state = connector_state; |
| @@ -1380,7 +1380,7 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, | |||
| 1380 | crtc_state->connector_mask &= | 1380 | crtc_state->connector_mask &= |
| 1381 | ~(1 << drm_connector_index(conn_state->connector)); | 1381 | ~(1 << drm_connector_index(conn_state->connector)); |
| 1382 | 1382 | ||
| 1383 | drm_connector_unreference(conn_state->connector); | 1383 | drm_connector_put(conn_state->connector); |
| 1384 | conn_state->crtc = NULL; | 1384 | conn_state->crtc = NULL; |
| 1385 | } | 1385 | } |
| 1386 | 1386 | ||
| @@ -1392,7 +1392,7 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state, | |||
| 1392 | crtc_state->connector_mask |= | 1392 | crtc_state->connector_mask |= |
| 1393 | 1 << drm_connector_index(conn_state->connector); | 1393 | 1 << drm_connector_index(conn_state->connector); |
| 1394 | 1394 | ||
| 1395 | drm_connector_reference(conn_state->connector); | 1395 | drm_connector_get(conn_state->connector); |
| 1396 | conn_state->crtc = crtc; | 1396 | conn_state->crtc = crtc; |
| 1397 | 1397 | ||
| 1398 | DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n", | 1398 | DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n", |
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index bdfddfa87316..6e7d9dfce342 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -3351,7 +3351,7 @@ __drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector, | |||
| 3351 | { | 3351 | { |
| 3352 | memcpy(state, connector->state, sizeof(*state)); | 3352 | memcpy(state, connector->state, sizeof(*state)); |
| 3353 | if (state->crtc) | 3353 | if (state->crtc) |
| 3354 | drm_connector_reference(connector); | 3354 | drm_connector_get(connector); |
| 3355 | } | 3355 | } |
| 3356 | EXPORT_SYMBOL(__drm_atomic_helper_connector_duplicate_state); | 3356 | EXPORT_SYMBOL(__drm_atomic_helper_connector_duplicate_state); |
| 3357 | 3357 | ||
| @@ -3477,7 +3477,7 @@ void | |||
| 3477 | __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) | 3477 | __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state) |
| 3478 | { | 3478 | { |
| 3479 | if (state->crtc) | 3479 | if (state->crtc) |
| 3480 | drm_connector_unreference(state->connector); | 3480 | drm_connector_put(state->connector); |
| 3481 | } | 3481 | } |
| 3482 | EXPORT_SYMBOL(__drm_atomic_helper_connector_destroy_state); | 3482 | EXPORT_SYMBOL(__drm_atomic_helper_connector_destroy_state); |
| 3483 | 3483 | ||
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index a48e9a65046d..5a4be752a85e 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c | |||
| @@ -35,8 +35,8 @@ | |||
| 35 | * als fixed panels or anything else that can display pixels in some form. As | 35 | * als fixed panels or anything else that can display pixels in some form. As |
| 36 | * opposed to all other KMS objects representing hardware (like CRTC, encoder or | 36 | * opposed to all other KMS objects representing hardware (like CRTC, encoder or |
| 37 | * plane abstractions) connectors can be hotplugged and unplugged at runtime. | 37 | * plane abstractions) connectors can be hotplugged and unplugged at runtime. |
| 38 | * Hence they are reference-counted using drm_connector_reference() and | 38 | * Hence they are reference-counted using drm_connector_get() and |
| 39 | * drm_connector_unreference(). | 39 | * drm_connector_put(). |
| 40 | * | 40 | * |
| 41 | * KMS driver must create, initialize, register and attach at a &struct | 41 | * KMS driver must create, initialize, register and attach at a &struct |
| 42 | * drm_connector for each such sink. The instance is created as other KMS | 42 | * drm_connector for each such sink. The instance is created as other KMS |
| @@ -557,7 +557,7 @@ drm_connector_list_iter_next(struct drm_connector_list_iter *iter) | |||
| 557 | spin_unlock_irqrestore(&config->connector_list_lock, flags); | 557 | spin_unlock_irqrestore(&config->connector_list_lock, flags); |
| 558 | 558 | ||
| 559 | if (old_conn) | 559 | if (old_conn) |
| 560 | drm_connector_unreference(old_conn); | 560 | drm_connector_put(old_conn); |
| 561 | 561 | ||
| 562 | return iter->conn; | 562 | return iter->conn; |
| 563 | } | 563 | } |
| @@ -576,7 +576,7 @@ void drm_connector_list_iter_put(struct drm_connector_list_iter *iter) | |||
| 576 | { | 576 | { |
| 577 | iter->dev = NULL; | 577 | iter->dev = NULL; |
| 578 | if (iter->conn) | 578 | if (iter->conn) |
| 579 | drm_connector_unreference(iter->conn); | 579 | drm_connector_put(iter->conn); |
| 580 | lock_release(&connector_list_iter_dep_map, 0, _RET_IP_); | 580 | lock_release(&connector_list_iter_dep_map, 0, _RET_IP_); |
| 581 | } | 581 | } |
| 582 | EXPORT_SYMBOL(drm_connector_list_iter_put); | 582 | EXPORT_SYMBOL(drm_connector_list_iter_put); |
| @@ -1309,7 +1309,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, | |||
| 1309 | out: | 1309 | out: |
| 1310 | mutex_unlock(&dev->mode_config.mutex); | 1310 | mutex_unlock(&dev->mode_config.mutex); |
| 1311 | out_unref: | 1311 | out_unref: |
| 1312 | drm_connector_unreference(connector); | 1312 | drm_connector_put(connector); |
| 1313 | 1313 | ||
| 1314 | return ret; | 1314 | return ret; |
| 1315 | } | 1315 | } |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index e2284539f82c..9594c623799b 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
| @@ -685,7 +685,7 @@ out: | |||
| 685 | if (connector_set) { | 685 | if (connector_set) { |
| 686 | for (i = 0; i < crtc_req->count_connectors; i++) { | 686 | for (i = 0; i < crtc_req->count_connectors; i++) { |
| 687 | if (connector_set[i]) | 687 | if (connector_set[i]) |
| 688 | drm_connector_unreference(connector_set[i]); | 688 | drm_connector_put(connector_set[i]); |
| 689 | } | 689 | } |
| 690 | } | 690 | } |
| 691 | kfree(connector_set); | 691 | kfree(connector_set); |
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 44ba0e990d6c..536051c627d8 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -465,7 +465,7 @@ drm_crtc_helper_disable(struct drm_crtc *crtc) | |||
| 465 | connector->dpms = DRM_MODE_DPMS_OFF; | 465 | connector->dpms = DRM_MODE_DPMS_OFF; |
| 466 | 466 | ||
| 467 | /* we keep a reference while the encoder is bound */ | 467 | /* we keep a reference while the encoder is bound */ |
| 468 | drm_connector_unreference(connector); | 468 | drm_connector_put(connector); |
| 469 | } | 469 | } |
| 470 | drm_connector_list_iter_put(&conn_iter); | 470 | drm_connector_list_iter_put(&conn_iter); |
| 471 | } | 471 | } |
| @@ -623,7 +623,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
| 623 | for (ro = 0; ro < set->num_connectors; ro++) { | 623 | for (ro = 0; ro < set->num_connectors; ro++) { |
| 624 | if (set->connectors[ro]->encoder) | 624 | if (set->connectors[ro]->encoder) |
| 625 | continue; | 625 | continue; |
| 626 | drm_connector_reference(set->connectors[ro]); | 626 | drm_connector_get(set->connectors[ro]); |
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | /* a) traverse passed in connector list and get encoders for them */ | 629 | /* a) traverse passed in connector list and get encoders for them */ |
| @@ -772,7 +772,7 @@ fail: | |||
| 772 | for (ro = 0; ro < set->num_connectors; ro++) { | 772 | for (ro = 0; ro < set->num_connectors; ro++) { |
| 773 | if (set->connectors[ro]->encoder) | 773 | if (set->connectors[ro]->encoder) |
| 774 | continue; | 774 | continue; |
| 775 | drm_connector_unreference(set->connectors[ro]); | 775 | drm_connector_put(set->connectors[ro]); |
| 776 | } | 776 | } |
| 777 | 777 | ||
| 778 | /* Try to restore the config */ | 778 | /* Try to restore the config */ |
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 1b068e6264d5..b243fdbdbb08 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
| @@ -148,7 +148,7 @@ fail: | |||
| 148 | struct drm_fb_helper_connector *fb_helper_connector = | 148 | struct drm_fb_helper_connector *fb_helper_connector = |
| 149 | fb_helper->connector_info[i]; | 149 | fb_helper->connector_info[i]; |
| 150 | 150 | ||
| 151 | drm_connector_unreference(fb_helper_connector->connector); | 151 | drm_connector_put(fb_helper_connector->connector); |
| 152 | 152 | ||
| 153 | kfree(fb_helper_connector); | 153 | kfree(fb_helper_connector); |
| 154 | fb_helper->connector_info[i] = NULL; | 154 | fb_helper->connector_info[i] = NULL; |
| @@ -185,7 +185,7 @@ int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_ | |||
| 185 | if (!fb_helper_connector) | 185 | if (!fb_helper_connector) |
| 186 | return -ENOMEM; | 186 | return -ENOMEM; |
| 187 | 187 | ||
| 188 | drm_connector_reference(connector); | 188 | drm_connector_get(connector); |
| 189 | fb_helper_connector->connector = connector; | 189 | fb_helper_connector->connector = connector; |
| 190 | fb_helper->connector_info[fb_helper->connector_count++] = fb_helper_connector; | 190 | fb_helper->connector_info[fb_helper->connector_count++] = fb_helper_connector; |
| 191 | return 0; | 191 | return 0; |
| @@ -211,7 +211,7 @@ int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, | |||
| 211 | if (i == fb_helper->connector_count) | 211 | if (i == fb_helper->connector_count) |
| 212 | return -EINVAL; | 212 | return -EINVAL; |
| 213 | fb_helper_connector = fb_helper->connector_info[i]; | 213 | fb_helper_connector = fb_helper->connector_info[i]; |
| 214 | drm_connector_unreference(fb_helper_connector->connector); | 214 | drm_connector_put(fb_helper_connector->connector); |
| 215 | 215 | ||
| 216 | for (j = i + 1; j < fb_helper->connector_count; j++) { | 216 | for (j = i + 1; j < fb_helper->connector_count; j++) { |
| 217 | fb_helper->connector_info[j - 1] = fb_helper->connector_info[j]; | 217 | fb_helper->connector_info[j - 1] = fb_helper->connector_info[j]; |
| @@ -633,7 +633,7 @@ static void drm_fb_helper_modeset_release(struct drm_fb_helper *helper, | |||
| 633 | int i; | 633 | int i; |
| 634 | 634 | ||
| 635 | for (i = 0; i < modeset->num_connectors; i++) { | 635 | for (i = 0; i < modeset->num_connectors; i++) { |
| 636 | drm_connector_unreference(modeset->connectors[i]); | 636 | drm_connector_put(modeset->connectors[i]); |
| 637 | modeset->connectors[i] = NULL; | 637 | modeset->connectors[i] = NULL; |
| 638 | } | 638 | } |
| 639 | modeset->num_connectors = 0; | 639 | modeset->num_connectors = 0; |
| @@ -650,7 +650,7 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper) | |||
| 650 | int i; | 650 | int i; |
| 651 | 651 | ||
| 652 | for (i = 0; i < helper->connector_count; i++) { | 652 | for (i = 0; i < helper->connector_count; i++) { |
| 653 | drm_connector_unreference(helper->connector_info[i]->connector); | 653 | drm_connector_put(helper->connector_info[i]->connector); |
| 654 | kfree(helper->connector_info[i]); | 654 | kfree(helper->connector_info[i]); |
| 655 | } | 655 | } |
| 656 | kfree(helper->connector_info); | 656 | kfree(helper->connector_info); |
| @@ -2192,7 +2192,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper, | |||
| 2192 | fb_crtc->y = offset->y; | 2192 | fb_crtc->y = offset->y; |
| 2193 | modeset->mode = drm_mode_duplicate(dev, | 2193 | modeset->mode = drm_mode_duplicate(dev, |
| 2194 | fb_crtc->desired_mode); | 2194 | fb_crtc->desired_mode); |
| 2195 | drm_connector_reference(connector); | 2195 | drm_connector_get(connector); |
| 2196 | modeset->connectors[modeset->num_connectors++] = connector; | 2196 | modeset->connectors[modeset->num_connectors++] = connector; |
| 2197 | modeset->fb = fb_helper->fb; | 2197 | modeset->fb = fb_helper->fb; |
| 2198 | modeset->x = offset->x; | 2198 | modeset->x = offset->x; |
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 884cc4d26fb5..20aec165abd7 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c | |||
| @@ -418,7 +418,7 @@ void drm_mode_config_cleanup(struct drm_device *dev) | |||
| 418 | * current connector itself, which means it is inherently safe | 418 | * current connector itself, which means it is inherently safe |
| 419 | * against unreferencing the current connector - but not against | 419 | * against unreferencing the current connector - but not against |
| 420 | * deleting it right away. */ | 420 | * deleting it right away. */ |
| 421 | drm_connector_unreference(connector); | 421 | drm_connector_put(connector); |
| 422 | } | 422 | } |
| 423 | drm_connector_list_iter_put(&conn_iter); | 423 | drm_connector_list_iter_put(&conn_iter); |
| 424 | if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) { | 424 | if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) { |
