diff options
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 3d13ca6e257f..0a19401aff80 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -39,10 +39,6 @@ | |||
39 | #include <drm/drm_fb_helper.h> | 39 | #include <drm/drm_fb_helper.h> |
40 | #include <drm/drm_crtc_helper.h> | 40 | #include <drm/drm_crtc_helper.h> |
41 | 41 | ||
42 | MODULE_AUTHOR("David Airlie, Jesse Barnes"); | ||
43 | MODULE_DESCRIPTION("DRM KMS helper"); | ||
44 | MODULE_LICENSE("GPL and additional rights"); | ||
45 | |||
46 | static LIST_HEAD(kernel_fb_helper_list); | 42 | static LIST_HEAD(kernel_fb_helper_list); |
47 | 43 | ||
48 | /** | 44 | /** |
@@ -844,7 +840,6 @@ int drm_fb_helper_pan_display(struct fb_var_screeninfo *var, | |||
844 | struct drm_fb_helper *fb_helper = info->par; | 840 | struct drm_fb_helper *fb_helper = info->par; |
845 | struct drm_device *dev = fb_helper->dev; | 841 | struct drm_device *dev = fb_helper->dev; |
846 | struct drm_mode_set *modeset; | 842 | struct drm_mode_set *modeset; |
847 | struct drm_crtc *crtc; | ||
848 | int ret = 0; | 843 | int ret = 0; |
849 | int i; | 844 | int i; |
850 | 845 | ||
@@ -855,8 +850,6 @@ int drm_fb_helper_pan_display(struct fb_var_screeninfo *var, | |||
855 | } | 850 | } |
856 | 851 | ||
857 | for (i = 0; i < fb_helper->crtc_count; i++) { | 852 | for (i = 0; i < fb_helper->crtc_count; i++) { |
858 | crtc = fb_helper->crtc_info[i].mode_set.crtc; | ||
859 | |||
860 | modeset = &fb_helper->crtc_info[i].mode_set; | 853 | modeset = &fb_helper->crtc_info[i].mode_set; |
861 | 854 | ||
862 | modeset->x = var->xoffset; | 855 | modeset->x = var->xoffset; |
@@ -1352,7 +1345,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, | |||
1352 | struct drm_connector *connector; | 1345 | struct drm_connector *connector; |
1353 | struct drm_connector_helper_funcs *connector_funcs; | 1346 | struct drm_connector_helper_funcs *connector_funcs; |
1354 | struct drm_encoder *encoder; | 1347 | struct drm_encoder *encoder; |
1355 | struct drm_fb_helper_crtc *best_crtc; | ||
1356 | int my_score, best_score, score; | 1348 | int my_score, best_score, score; |
1357 | struct drm_fb_helper_crtc **crtcs, *crtc; | 1349 | struct drm_fb_helper_crtc **crtcs, *crtc; |
1358 | struct drm_fb_helper_connector *fb_helper_conn; | 1350 | struct drm_fb_helper_connector *fb_helper_conn; |
@@ -1364,7 +1356,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, | |||
1364 | connector = fb_helper_conn->connector; | 1356 | connector = fb_helper_conn->connector; |
1365 | 1357 | ||
1366 | best_crtcs[n] = NULL; | 1358 | best_crtcs[n] = NULL; |
1367 | best_crtc = NULL; | ||
1368 | best_score = drm_pick_crtcs(fb_helper, best_crtcs, modes, n+1, width, height); | 1359 | best_score = drm_pick_crtcs(fb_helper, best_crtcs, modes, n+1, width, height); |
1369 | if (modes[n] == NULL) | 1360 | if (modes[n] == NULL) |
1370 | return best_score; | 1361 | return best_score; |
@@ -1413,7 +1404,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, | |||
1413 | score = my_score + drm_pick_crtcs(fb_helper, crtcs, modes, n + 1, | 1404 | score = my_score + drm_pick_crtcs(fb_helper, crtcs, modes, n + 1, |
1414 | width, height); | 1405 | width, height); |
1415 | if (score > best_score) { | 1406 | if (score > best_score) { |
1416 | best_crtc = crtc; | ||
1417 | best_score = score; | 1407 | best_score = score; |
1418 | memcpy(best_crtcs, crtcs, | 1408 | memcpy(best_crtcs, crtcs, |
1419 | dev->mode_config.num_connector * | 1409 | dev->mode_config.num_connector * |
@@ -1580,8 +1570,7 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config); | |||
1580 | int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) | 1570 | int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) |
1581 | { | 1571 | { |
1582 | struct drm_device *dev = fb_helper->dev; | 1572 | struct drm_device *dev = fb_helper->dev; |
1583 | int count = 0; | 1573 | u32 max_width, max_height; |
1584 | u32 max_width, max_height, bpp_sel; | ||
1585 | 1574 | ||
1586 | if (!fb_helper->fb) | 1575 | if (!fb_helper->fb) |
1587 | return 0; | 1576 | return 0; |
@@ -1596,10 +1585,8 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) | |||
1596 | 1585 | ||
1597 | max_width = fb_helper->fb->width; | 1586 | max_width = fb_helper->fb->width; |
1598 | max_height = fb_helper->fb->height; | 1587 | max_height = fb_helper->fb->height; |
1599 | bpp_sel = fb_helper->fb->bits_per_pixel; | ||
1600 | 1588 | ||
1601 | count = drm_fb_helper_probe_connector_modes(fb_helper, max_width, | 1589 | drm_fb_helper_probe_connector_modes(fb_helper, max_width, max_height); |
1602 | max_height); | ||
1603 | mutex_unlock(&fb_helper->dev->mode_config.mutex); | 1590 | mutex_unlock(&fb_helper->dev->mode_config.mutex); |
1604 | 1591 | ||
1605 | drm_modeset_lock_all(dev); | 1592 | drm_modeset_lock_all(dev); |