Commit 51eab416c9b4b3ed16553d405ec4a5f67daa34cf

Authored by Dave Airlie
1 parent 1783e4bf6f

drm/vblank: update recently added vbl interface to be more future proof.

This makes the interface a bit cleaner by leaving a single gap in the
vblank bit space instead of creating two gaps.

Suggestions from Michel on mailing list/irc.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>

Showing 2 changed files with 5 additions and 4 deletions Side-by-side Diff

drivers/gpu/drm/drm_ioctl.c
... ... @@ -280,7 +280,7 @@
280 280 if (dev->driver->dumb_create)
281 281 req->value = 1;
282 282 break;
283   - case DRM_CAP_HIGH_CRTC:
  283 + case DRM_CAP_VBLANK_HIGH_CRTC:
284 284 req->value = 1;
285 285 break;
286 286 default:
... ... @@ -463,14 +463,15 @@
463 463 enum drm_vblank_seq_type {
464 464 _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
465 465 _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
  466 + /* bits 1-6 are reserved for high crtcs */
  467 + _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
466 468 _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
467 469 _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
468 470 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
469 471 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
470 472 _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
471 473 };
472   -#define _DRM_VBLANK_HIGH_CRTC_SHIFT 16
473   -#define _DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000
  474 +#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
474 475  
475 476 #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
476 477 #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
... ... @@ -755,7 +756,7 @@
755 756 };
756 757  
757 758 #define DRM_CAP_DUMB_BUFFER 0x1
758   -#define DRM_CAP_HIGH_CRTC 0x2
  759 +#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
759 760  
760 761 /* typedef area */
761 762 #ifndef __KERNEL__