diff options
author | Dave Airlie <airlied@redhat.com> | 2018-12-05 22:43:22 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-12-05 22:43:56 -0500 |
commit | 1f9a5dce3548d54d810b23e4e0b1d8c6d73a52d4 (patch) | |
tree | 1d257e265325b04909278b52fe18cea616bf674f /drivers/gpu/drm/drm_atomic_uapi.c | |
parent | fb878d106b7738ae7cdb513f98876b22bd6a485f (diff) | |
parent | 9a01135b98b9d5a7033c544245da7aad0d886758 (diff) |
Merge tag 'vmwgfx-next-2018-12-05' of git://people.freedesktop.org/~thomash/linux into drm-next
Pull request of 2018-12-05
Page flip with damage by Deepak and others,
Various vmwgfx minor fixes anc cleanups.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Hellstrom <thellstrom@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181205103554.3675-1-thellstrom@vmware.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_uapi.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_uapi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 30a6d1edd5fe..c40889888a16 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c | |||
@@ -517,6 +517,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, | |||
517 | { | 517 | { |
518 | struct drm_device *dev = plane->dev; | 518 | struct drm_device *dev = plane->dev; |
519 | struct drm_mode_config *config = &dev->mode_config; | 519 | struct drm_mode_config *config = &dev->mode_config; |
520 | bool replaced = false; | ||
521 | int ret; | ||
520 | 522 | ||
521 | if (property == config->prop_fb_id) { | 523 | if (property == config->prop_fb_id) { |
522 | struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val); | 524 | struct drm_framebuffer *fb = drm_framebuffer_lookup(dev, NULL, val); |
@@ -570,6 +572,14 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane, | |||
570 | state->color_encoding = val; | 572 | state->color_encoding = val; |
571 | } else if (property == plane->color_range_property) { | 573 | } else if (property == plane->color_range_property) { |
572 | state->color_range = val; | 574 | state->color_range = val; |
575 | } else if (property == config->prop_fb_damage_clips) { | ||
576 | ret = drm_atomic_replace_property_blob_from_id(dev, | ||
577 | &state->fb_damage_clips, | ||
578 | val, | ||
579 | -1, | ||
580 | sizeof(struct drm_rect), | ||
581 | &replaced); | ||
582 | return ret; | ||
573 | } else if (plane->funcs->atomic_set_property) { | 583 | } else if (plane->funcs->atomic_set_property) { |
574 | return plane->funcs->atomic_set_property(plane, state, | 584 | return plane->funcs->atomic_set_property(plane, state, |
575 | property, val); | 585 | property, val); |
@@ -625,6 +635,9 @@ drm_atomic_plane_get_property(struct drm_plane *plane, | |||
625 | *val = state->color_encoding; | 635 | *val = state->color_encoding; |
626 | } else if (property == plane->color_range_property) { | 636 | } else if (property == plane->color_range_property) { |
627 | *val = state->color_range; | 637 | *val = state->color_range; |
638 | } else if (property == config->prop_fb_damage_clips) { | ||
639 | *val = (state->fb_damage_clips) ? | ||
640 | state->fb_damage_clips->base.id : 0; | ||
628 | } else if (plane->funcs->atomic_get_property) { | 641 | } else if (plane->funcs->atomic_get_property) { |
629 | return plane->funcs->atomic_get_property(plane, state, property, val); | 642 | return plane->funcs->atomic_get_property(plane, state, property, val); |
630 | } else { | 643 | } else { |