diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-08 18:13:41 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-01-08 18:13:41 -0500 |
commit | e5202a2289d746a94703ad937157d398fb2607cf (patch) | |
tree | b0b8869adfa0e4c0dc05f7a11588e5e21a580755 /drivers/gpu/drm/drm_irq.c | |
parent | b1940cd21c0f4abdce101253e860feff547291b0 (diff) | |
parent | 7552e7dd9527c41f891c87854418896eaf309c20 (diff) |
Merge tag 'topic/core-stuff-2014-12-19' of git://anongit.freedesktop.org/drm-intel into drm-next
Misc drm patches with mostly polish patches from Thierry, with a bit of
generic mode validation from Ville and a few other oddball things.
* tag 'topic/core-stuff-2014-12-19' of git://anongit.freedesktop.org/drm-intel: (25 commits)
drm: Include drm_crtc_helper.h in DocBook
drm: Make drm_crtc_helper.h standalone includible
drm: Move IRQ related fields to proper section
drm: Remove stale comment
drm: Do basic sanity checks for user modes
drm: Perform basic sanity checks on probed modes
drm: Reorganize probed mode validation
drm/doc: Remove duplicate "by"
drm/info: Remove unused code
drm/cache: Use wbinvd helpers
drm/plane-helper: Test for plane disable earlier
drm/doc: Document drm_add_modes_noedid() usage
drm: bit of spell-check / editorializing.
drm: Prefer sizeof(type) over sizeof type
drm: Remove useless else block
drm: Remove unneeded braces for single statement blocks
drm: Do not assign in if condition
drm: Prefer kmalloc_array() over kmalloc() with multiply
drm: Prefer kcalloc() over kzalloc() with multiply
drm: Miscellaneous checkpatch whitespace cleanups
...
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 4d79dad9d44f..75647e7f012b 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -778,7 +778,7 @@ static struct timeval get_drm_timestamp(void) | |||
778 | 778 | ||
779 | /** | 779 | /** |
780 | * drm_get_last_vbltimestamp - retrieve raw timestamp for the most recent | 780 | * drm_get_last_vbltimestamp - retrieve raw timestamp for the most recent |
781 | * vblank interval | 781 | * vblank interval |
782 | * @dev: DRM device | 782 | * @dev: DRM device |
783 | * @crtc: which CRTC's vblank timestamp to retrieve | 783 | * @crtc: which CRTC's vblank timestamp to retrieve |
784 | * @tvblank: Pointer to target struct timeval which should receive the timestamp | 784 | * @tvblank: Pointer to target struct timeval which should receive the timestamp |
@@ -933,6 +933,7 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc, | |||
933 | { | 933 | { |
934 | struct timeval now; | 934 | struct timeval now; |
935 | unsigned int seq; | 935 | unsigned int seq; |
936 | |||
936 | if (crtc >= 0) { | 937 | if (crtc >= 0) { |
937 | seq = drm_vblank_count_and_time(dev, crtc, &now); | 938 | seq = drm_vblank_count_and_time(dev, crtc, &now); |
938 | } else { | 939 | } else { |
@@ -1422,7 +1423,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1422 | unsigned int seq; | 1423 | unsigned int seq; |
1423 | int ret; | 1424 | int ret; |
1424 | 1425 | ||
1425 | e = kzalloc(sizeof *e, GFP_KERNEL); | 1426 | e = kzalloc(sizeof(*e), GFP_KERNEL); |
1426 | if (e == NULL) { | 1427 | if (e == NULL) { |
1427 | ret = -ENOMEM; | 1428 | ret = -ENOMEM; |
1428 | goto err_put; | 1429 | goto err_put; |
@@ -1431,7 +1432,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1431 | e->pipe = pipe; | 1432 | e->pipe = pipe; |
1432 | e->base.pid = current->pid; | 1433 | e->base.pid = current->pid; |
1433 | e->event.base.type = DRM_EVENT_VBLANK; | 1434 | e->event.base.type = DRM_EVENT_VBLANK; |
1434 | e->event.base.length = sizeof e->event; | 1435 | e->event.base.length = sizeof(e->event); |
1435 | e->event.user_data = vblwait->request.signal; | 1436 | e->event.user_data = vblwait->request.signal; |
1436 | e->base.event = &e->event.base; | 1437 | e->base.event = &e->event.base; |
1437 | e->base.file_priv = file_priv; | 1438 | e->base.file_priv = file_priv; |
@@ -1451,12 +1452,12 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, | |||
1451 | goto err_unlock; | 1452 | goto err_unlock; |
1452 | } | 1453 | } |
1453 | 1454 | ||
1454 | if (file_priv->event_space < sizeof e->event) { | 1455 | if (file_priv->event_space < sizeof(e->event)) { |
1455 | ret = -EBUSY; | 1456 | ret = -EBUSY; |
1456 | goto err_unlock; | 1457 | goto err_unlock; |
1457 | } | 1458 | } |
1458 | 1459 | ||
1459 | file_priv->event_space -= sizeof e->event; | 1460 | file_priv->event_space -= sizeof(e->event); |
1460 | seq = drm_vblank_count_and_time(dev, pipe, &now); | 1461 | seq = drm_vblank_count_and_time(dev, pipe, &now); |
1461 | 1462 | ||
1462 | if ((vblwait->request.type & _DRM_VBLANK_NEXTONMISS) && | 1463 | if ((vblwait->request.type & _DRM_VBLANK_NEXTONMISS) && |