diff options
Diffstat (limited to 'drivers/gpu/drm/ast')
| -rw-r--r-- | drivers/gpu/drm/ast/ast_drv.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_drv.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_fb.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 16 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_tables.h | 1 |
5 files changed, 11 insertions, 16 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 44074fbcf7ff..f19682a93c24 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c | |||
| @@ -51,7 +51,7 @@ static struct drm_driver driver; | |||
| 51 | .subdevice = PCI_ANY_ID, \ | 51 | .subdevice = PCI_ANY_ID, \ |
| 52 | .driver_data = (unsigned long) info } | 52 | .driver_data = (unsigned long) info } |
| 53 | 53 | ||
| 54 | static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { | 54 | static const struct pci_device_id pciidlist[] = { |
| 55 | AST_VGA_DEVICE(PCI_CHIP_AST2000, NULL), | 55 | AST_VGA_DEVICE(PCI_CHIP_AST2000, NULL), |
| 56 | AST_VGA_DEVICE(PCI_CHIP_AST2100, NULL), | 56 | AST_VGA_DEVICE(PCI_CHIP_AST2100, NULL), |
| 57 | /* AST_VGA_DEVICE(PCI_CHIP_AST1180, NULL), - don't bind to 1180 for now */ | 57 | /* AST_VGA_DEVICE(PCI_CHIP_AST1180, NULL), - don't bind to 1180 for now */ |
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 5d6a87573c33..957d4fabf1e1 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h | |||
| @@ -362,7 +362,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait) | |||
| 362 | { | 362 | { |
| 363 | int ret; | 363 | int ret; |
| 364 | 364 | ||
| 365 | ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0); | 365 | ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL); |
| 366 | if (ret) { | 366 | if (ret) { |
| 367 | if (ret != -ERESTARTSYS && ret != -EBUSY) | 367 | if (ret != -ERESTARTSYS && ret != -EBUSY) |
| 368 | DRM_ERROR("reserve failed %p\n", bo); | 368 | DRM_ERROR("reserve failed %p\n", bo); |
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c index a28640f47c27..cba45c774552 100644 --- a/drivers/gpu/drm/ast/ast_fb.c +++ b/drivers/gpu/drm/ast/ast_fb.c | |||
| @@ -287,7 +287,7 @@ static void ast_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, | |||
| 287 | *blue = ast_crtc->lut_b[regno] << 8; | 287 | *blue = ast_crtc->lut_b[regno] << 8; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | static struct drm_fb_helper_funcs ast_fb_helper_funcs = { | 290 | static const struct drm_fb_helper_funcs ast_fb_helper_funcs = { |
| 291 | .gamma_set = ast_fb_gamma_set, | 291 | .gamma_set = ast_fb_gamma_set, |
| 292 | .gamma_get = ast_fb_gamma_get, | 292 | .gamma_get = ast_fb_gamma_get, |
| 293 | .fb_probe = astfb_create, | 293 | .fb_probe = astfb_create, |
| @@ -328,8 +328,10 @@ int ast_fbdev_init(struct drm_device *dev) | |||
| 328 | return -ENOMEM; | 328 | return -ENOMEM; |
| 329 | 329 | ||
| 330 | ast->fbdev = afbdev; | 330 | ast->fbdev = afbdev; |
| 331 | afbdev->helper.funcs = &ast_fb_helper_funcs; | ||
| 332 | spin_lock_init(&afbdev->dirty_lock); | 331 | spin_lock_init(&afbdev->dirty_lock); |
| 332 | |||
| 333 | drm_fb_helper_prepare(dev, &afbdev->helper, &ast_fb_helper_funcs); | ||
| 334 | |||
| 333 | ret = drm_fb_helper_init(dev, &afbdev->helper, | 335 | ret = drm_fb_helper_init(dev, &afbdev->helper, |
| 334 | 1, 1); | 336 | 1, 1); |
| 335 | if (ret) { | 337 | if (ret) { |
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 114aee941d46..5389350244f2 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c | |||
| @@ -667,17 +667,9 @@ static void ast_encoder_destroy(struct drm_encoder *encoder) | |||
| 667 | static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) | 667 | static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) |
| 668 | { | 668 | { |
| 669 | int enc_id = connector->encoder_ids[0]; | 669 | int enc_id = connector->encoder_ids[0]; |
| 670 | struct drm_mode_object *obj; | ||
| 671 | struct drm_encoder *encoder; | ||
| 672 | |||
| 673 | /* pick the encoder ids */ | 670 | /* pick the encoder ids */ |
| 674 | if (enc_id) { | 671 | if (enc_id) |
| 675 | obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); | 672 | return drm_encoder_find(connector->dev, enc_id); |
| 676 | if (!obj) | ||
| 677 | return NULL; | ||
| 678 | encoder = obj_to_encoder(obj); | ||
| 679 | return encoder; | ||
| 680 | } | ||
| 681 | return NULL; | 673 | return NULL; |
| 682 | } | 674 | } |
| 683 | 675 | ||
| @@ -829,7 +821,7 @@ static void ast_connector_destroy(struct drm_connector *connector) | |||
| 829 | { | 821 | { |
| 830 | struct ast_connector *ast_connector = to_ast_connector(connector); | 822 | struct ast_connector *ast_connector = to_ast_connector(connector); |
| 831 | ast_i2c_destroy(ast_connector->i2c); | 823 | ast_i2c_destroy(ast_connector->i2c); |
| 832 | drm_sysfs_connector_remove(connector); | 824 | drm_connector_unregister(connector); |
| 833 | drm_connector_cleanup(connector); | 825 | drm_connector_cleanup(connector); |
| 834 | kfree(connector); | 826 | kfree(connector); |
| 835 | } | 827 | } |
| @@ -871,7 +863,7 @@ static int ast_connector_init(struct drm_device *dev) | |||
| 871 | connector->interlace_allowed = 0; | 863 | connector->interlace_allowed = 0; |
| 872 | connector->doublescan_allowed = 0; | 864 | connector->doublescan_allowed = 0; |
| 873 | 865 | ||
| 874 | drm_sysfs_connector_add(connector); | 866 | drm_connector_register(connector); |
| 875 | 867 | ||
| 876 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; | 868 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; |
| 877 | 869 | ||
diff --git a/drivers/gpu/drm/ast/ast_tables.h b/drivers/gpu/drm/ast/ast_tables.h index 4c761dcea972..05c01ea85294 100644 --- a/drivers/gpu/drm/ast/ast_tables.h +++ b/drivers/gpu/drm/ast/ast_tables.h | |||
| @@ -99,6 +99,7 @@ static struct ast_vbios_dclk_info dclk_table[] = { | |||
| 99 | {0x25, 0x65, 0x80}, /* 16: VCLK88.75 */ | 99 | {0x25, 0x65, 0x80}, /* 16: VCLK88.75 */ |
| 100 | {0x77, 0x58, 0x80}, /* 17: VCLK119 */ | 100 | {0x77, 0x58, 0x80}, /* 17: VCLK119 */ |
| 101 | {0x32, 0x67, 0x80}, /* 18: VCLK85_5 */ | 101 | {0x32, 0x67, 0x80}, /* 18: VCLK85_5 */ |
| 102 | {0x6a, 0x6d, 0x80}, /* 19: VCLK97_75 */ | ||
| 102 | }; | 103 | }; |
| 103 | 104 | ||
| 104 | static struct ast_vbios_stdtable vbios_stdtable[] = { | 105 | static struct ast_vbios_stdtable vbios_stdtable[] = { |
