Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196495
b: refs/heads/master
c: bc35afd
h: refs/heads/master
i:
  196493: 8ea3dfc
  196491: b591bfd
  196487: bd45377
  196479: a81a123
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed May 18, 2010
1 parent 954c19c commit 2ab8ed7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61dd98fad58f945ed720ba132681acb58fcee015
refs/heads/master: bc35afdb182d4c48c889fe27ba7a5d7ea0c8194d
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
* - 2.1.0 - add square tiling interface
* - 2.2.0 - add r6xx/r7xx const buffer support
* - 2.3.0 - add MSPOS + 3D texture + r500 VAP regs
* - 2.4.0 - add crtc id query
*/
#define KMS_DRIVER_MAJOR 2
#define KMS_DRIVER_MINOR 3
#define KMS_DRIVER_MINOR 4
#define KMS_DRIVER_PATCHLEVEL 0
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
int radeon_driver_unload_kms(struct drm_device *dev);
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,15 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
{
struct radeon_device *rdev = dev->dev_private;
struct drm_radeon_info *info;
struct radeon_mode_info *minfo = &rdev->mode_info;
uint32_t *value_ptr;
uint32_t value;
struct drm_crtc *crtc;
int i, found;

info = data;
value_ptr = (uint32_t *)((unsigned long)info->value);
value = *value_ptr;
switch (info->request) {
case RADEON_INFO_DEVICE_ID:
value = dev->pci_device;
Expand All @@ -116,6 +120,20 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
case RADEON_INFO_ACCEL_WORKING:
value = rdev->accel_working;
break;
case RADEON_INFO_CRTC_FROM_ID:
for (i = 0, found = 0; i < rdev->num_crtc; i++) {
crtc = (struct drm_crtc *)minfo->crtcs[i];
if (crtc && crtc->base.id == value) {
value = i;
found = 1;
break;
}
}
if (!found) {
DRM_DEBUG("unknown crtc id %d\n", value);
return -EINVAL;
}
break;
default:
DRM_DEBUG("Invalid request %d\n", info->request);
return -EINVAL;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/drm/radeon_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ struct drm_radeon_cs {
#define RADEON_INFO_NUM_GB_PIPES 0x01
#define RADEON_INFO_NUM_Z_PIPES 0x02
#define RADEON_INFO_ACCEL_WORKING 0x03
#define RADEON_INFO_CRTC_FROM_ID 0x04

struct drm_radeon_info {
uint32_t request;
Expand Down

0 comments on commit 2ab8ed7

Please sign in to comment.