diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2018-09-06 08:18:26 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-09-11 19:56:19 +0200 |
commit | db7f419c06d7cce892384df464d4b609a3ea70af (patch) | |
tree | ceec4f89367331cefae32c77017ea496b1b446b1 /drivers/gpu/drm/vkms/vkms_plane.c | |
parent | c27d931d402b517336fea2b25ae951bee0249f65 (diff) |
drm/vkms: Compute CRC with Cursor Plane
This patch compute CRC for output frame with cursor and primary plane.
Blend cursor with primary plane and compute CRC on the resulted frame.
This currently passes cursor-size-change, and cursor-64x64-[onscreen,
offscreen, sliding, random, dpms, rapid-movement] from igt
kms_cursor_crc tests.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/b1749f5c90da5721a481f12740e2e370edb4a752.1536210181.git.hamohammed.sa@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_plane.c')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_plane.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index 428247d403dc..7041007396ae 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -85,16 +85,22 @@ static void vkms_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *old_state) { struct vkms_plane_state *vkms_plane_state; + struct drm_framebuffer *fb = plane->state->fb; struct vkms_crc_data *crc_data; - if (!plane->state->crtc || !plane->state->fb) + if (!plane->state->crtc || !fb) return; vkms_plane_state = to_vkms_plane_state(plane->state); + crc_data = vkms_plane_state->crc_data; memcpy(&crc_data->src, &plane->state->src, sizeof(struct drm_rect)); - memcpy(&crc_data->fb, plane->state->fb, sizeof(struct drm_framebuffer)); + memcpy(&crc_data->dst, &plane->state->dst, sizeof(struct drm_rect)); + memcpy(&crc_data->fb, fb, sizeof(struct drm_framebuffer)); drm_framebuffer_get(&crc_data->fb); + crc_data->offset = fb->offsets[0]; + crc_data->pitch = fb->pitches[0]; + crc_data->cpp = fb->format->cpp[0]; } static int vkms_plane_atomic_check(struct drm_plane *plane, |