diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 3bbb871b25d5..490bc7ceef60 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
@@ -226,9 +226,13 @@ struct radeon_virt_surface { | |||
226 | #define RADEON_FLUSH_EMITED (1 < 0) | 226 | #define RADEON_FLUSH_EMITED (1 < 0) |
227 | #define RADEON_PURGE_EMITED (1 < 1) | 227 | #define RADEON_PURGE_EMITED (1 < 1) |
228 | 228 | ||
229 | struct drm_radeon_master_private { | ||
230 | drm_local_map_t *sarea; | ||
231 | drm_radeon_sarea_t *sarea_priv; | ||
232 | }; | ||
233 | |||
229 | typedef struct drm_radeon_private { | 234 | typedef struct drm_radeon_private { |
230 | drm_radeon_ring_buffer_t ring; | 235 | drm_radeon_ring_buffer_t ring; |
231 | drm_radeon_sarea_t *sarea_priv; | ||
232 | 236 | ||
233 | u32 fb_location; | 237 | u32 fb_location; |
234 | u32 fb_size; | 238 | u32 fb_size; |
@@ -409,6 +413,9 @@ extern int radeon_driver_open(struct drm_device *dev, | |||
409 | extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, | 413 | extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, |
410 | unsigned long arg); | 414 | unsigned long arg); |
411 | 415 | ||
416 | extern int radeon_master_create(struct drm_device *dev, struct drm_master *master); | ||
417 | extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master); | ||
418 | extern void radeon_cp_dispatch_flip(struct drm_device *dev, struct drm_master *master); | ||
412 | /* r300_cmdbuf.c */ | 419 | /* r300_cmdbuf.c */ |
413 | extern void r300_init_reg_flags(struct drm_device *dev); | 420 | extern void r300_init_reg_flags(struct drm_device *dev); |
414 | 421 | ||
@@ -1335,8 +1342,9 @@ do { \ | |||
1335 | } while (0) | 1342 | } while (0) |
1336 | 1343 | ||
1337 | #define VB_AGE_TEST_WITH_RETURN( dev_priv ) \ | 1344 | #define VB_AGE_TEST_WITH_RETURN( dev_priv ) \ |
1338 | do { \ | 1345 | do { \ |
1339 | drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; \ | 1346 | struct drm_radeon_master_private *master_priv = file_priv->master->driver_priv; \ |
1347 | drm_radeon_sarea_t *sarea_priv = master_priv->sarea_priv; \ | ||
1340 | if ( sarea_priv->last_dispatch >= RADEON_MAX_VB_AGE ) { \ | 1348 | if ( sarea_priv->last_dispatch >= RADEON_MAX_VB_AGE ) { \ |
1341 | int __ret = radeon_do_cp_idle( dev_priv ); \ | 1349 | int __ret = radeon_do_cp_idle( dev_priv ); \ |
1342 | if ( __ret ) return __ret; \ | 1350 | if ( __ret ) return __ret; \ |