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_main.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 16 | ||||
| -rw-r--r-- | drivers/gpu/drm/ast/ast_tables.h | 1 | 
6 files changed, 13 insertions, 17 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;  	.subdevice = PCI_ANY_ID,		\  	.driver_data = (unsigned long) info } -static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { +static const struct pci_device_id pciidlist[] = {  	AST_VGA_DEVICE(PCI_CHIP_AST2000, NULL),  	AST_VGA_DEVICE(PCI_CHIP_AST2100, NULL),  	/*	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)  {  	int ret; -	ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0); +	ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);  	if (ret) {  		if (ret != -ERESTARTSYS && ret != -EBUSY)  			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,  	*blue = ast_crtc->lut_b[regno] << 8;  } -static struct drm_fb_helper_funcs ast_fb_helper_funcs = { +static const struct drm_fb_helper_funcs ast_fb_helper_funcs = {  	.gamma_set = ast_fb_gamma_set,  	.gamma_get = ast_fb_gamma_get,  	.fb_probe = astfb_create, @@ -328,8 +328,10 @@ int ast_fbdev_init(struct drm_device *dev)  		return -ENOMEM;  	ast->fbdev = afbdev; -	afbdev->helper.funcs = &ast_fb_helper_funcs;  	spin_lock_init(&afbdev->dirty_lock); + +	drm_fb_helper_prepare(dev, &afbdev->helper, &ast_fb_helper_funcs); +  	ret = drm_fb_helper_init(dev, &afbdev->helper,  				 1, 1);  	if (ret) { diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index a2cc6be97983..b792194e0d9c 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -67,6 +67,7 @@ static int ast_detect_chip(struct drm_device *dev)  {  	struct ast_private *ast = dev->dev_private;  	uint32_t data, jreg; +	ast_open_key(ast);  	if (dev->pdev->device == PCI_CHIP_AST1180) {  		ast->chip = AST1100; @@ -104,7 +105,7 @@ static int ast_detect_chip(struct drm_device *dev)  			}  			ast->vga2_clone = false;  		} else { -			ast->chip = 2000; +			ast->chip = AST2000;  			DRM_INFO("AST 2000 detected\n");  		}  	} 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)  static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector)  {  	int enc_id = connector->encoder_ids[0]; -	struct drm_mode_object *obj; -	struct drm_encoder *encoder; -  	/* pick the encoder ids */ -	if (enc_id) { -		obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); -		if (!obj) -			return NULL; -		encoder = obj_to_encoder(obj); -		return encoder; -	} +	if (enc_id) +		return drm_encoder_find(connector->dev, enc_id);  	return NULL;  } @@ -829,7 +821,7 @@ static void ast_connector_destroy(struct drm_connector *connector)  {  	struct ast_connector *ast_connector = to_ast_connector(connector);  	ast_i2c_destroy(ast_connector->i2c); -	drm_sysfs_connector_remove(connector); +	drm_connector_unregister(connector);  	drm_connector_cleanup(connector);  	kfree(connector);  } @@ -871,7 +863,7 @@ static int ast_connector_init(struct drm_device *dev)  	connector->interlace_allowed = 0;  	connector->doublescan_allowed = 0; -	drm_sysfs_connector_add(connector); +	drm_connector_register(connector);  	connector->polled = DRM_CONNECTOR_POLL_CONNECT; 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[] = {  	{0x25, 0x65, 0x80},					/* 16: VCLK88.75    */  	{0x77, 0x58, 0x80},					/* 17: VCLK119      */  	{0x32, 0x67, 0x80},				    /* 18: VCLK85_5     */ +	{0x6a, 0x6d, 0x80},					/* 19: VCLK97_75	*/  };  static struct ast_vbios_stdtable vbios_stdtable[] = {  | 
