Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242307
b: refs/heads/master
c: 19b01b5
h: refs/heads/master
i:
  242305: f61a0bc
  242303: 5d7b8e2
v: v3
  • Loading branch information
Ilija Hadzic authored and Dave Airlie committed Mar 20, 2011
1 parent 92eafab commit c32c053
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 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: b74ad5ae14def5e81ad0be3dddb96e485b861b1b
refs/heads/master: 19b01b5fbf0b78930b3b06ee6080539c17b5d1fd
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (dev->driver->dumb_create)
req->value = 1;
break;
case DRM_CAP_HIGH_CRTC:
req->value = 1;
break;
default:
return -EINVAL;
}
Expand Down
15 changes: 10 additions & 5 deletions trunk/drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
{
union drm_wait_vblank *vblwait = data;
int ret = 0;
unsigned int flags, seq, crtc;
unsigned int flags, seq, crtc, high_crtc;

if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled))
return -EINVAL;
Expand All @@ -1134,16 +1134,21 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
return -EINVAL;

if (vblwait->request.type &
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK)) {
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK)) {
DRM_ERROR("Unsupported type value 0x%x, supported mask 0x%x\n",
vblwait->request.type,
(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK));
(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
_DRM_VBLANK_HIGH_CRTC_MASK));
return -EINVAL;
}

flags = vblwait->request.type & _DRM_VBLANK_FLAGS_MASK;
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;

high_crtc = (vblwait->request.type & _DRM_VBLANK_HIGH_CRTC_MASK);
if (high_crtc)
crtc = high_crtc >> _DRM_VBLANK_HIGH_CRTC_SHIFT;
else
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
if (crtc >= dev->num_crtcs)
return -EINVAL;

Expand Down
3 changes: 3 additions & 0 deletions trunk/include/drm/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ enum drm_vblank_seq_type {
_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
_DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
};
#define _DRM_VBLANK_HIGH_CRTC_SHIFT 16
#define _DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000

#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
Expand Down Expand Up @@ -753,6 +755,7 @@ struct drm_event_vblank {
};

#define DRM_CAP_DUMB_BUFFER 0x1
#define DRM_CAP_HIGH_CRTC 0x2

/* typedef area */
#ifndef __KERNEL__
Expand Down

0 comments on commit c32c053

Please sign in to comment.