diff options
author | Roman Marchenko <r.marchenko@samsung.com> | 2016-01-21 14:52:06 +0200 |
---|---|---|
committer | Roman Marchenko <r.marchenko@samsung.com> | 2016-01-21 14:55:02 +0200 |
commit | afbf6ad960d2f46ea0dbea03892559f6a12c427d (patch) | |
tree | b7f6c5663250f42adde4d3f36df38c517504133d | |
parent | 5b93a9aa05e3700ae653edf465f0e5728791d94e (diff) | |
download | libdrm-afbf6ad960d2f46ea0dbea03892559f6a12c427d.tar.gz libdrm-afbf6ad960d2f46ea0dbea03892559f6a12c427d.tar.bz2 libdrm-afbf6ad960d2f46ea0dbea03892559f6a12c427d.zip |
sprd: add a checking hw overlay settingsubmit/tizen_ivi/20160217.000006submit/tizen_ivi/20160217.000000submit/tizen_common/20160218.142243submit/tizen/20160125.010454accepted/tizen/wearable/20160125.070204accepted/tizen/tv/20160125.070125accepted/tizen/mobile/20160125.070059accepted/tizen/ivi/20160218.025312
Need to set overlay again if hw overlay setting was changed.
Change-Id: I983622a8c7f53387bcb255ce89144ede967f26d8
Signed-off-by: Roman Marchenko <r.marchenko@samsung.com>
-rwxr-xr-x | sprd/sprd_drm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sprd/sprd_drm.c b/sprd/sprd_drm.c index 21d325f7..8a5c582d 100755 --- a/sprd/sprd_drm.c +++ b/sprd/sprd_drm.c @@ -1062,6 +1062,8 @@ static int sprd_drm_connector_overlay_set(struct sprd_drm_mode_connector * conn, int x, int y, int w, int h, struct sprd_drm_framebuffer *fb, int zpos) { overlay_info ovi; + overlay_info *prev_ovi; + static overlay_info prev_ovis[2]; overlay_display ov_disp; ovi.layer_index = ZPOS_TO_LYR_ID(zpos); @@ -1089,11 +1091,13 @@ static int sprd_drm_connector_overlay_set(struct sprd_drm_mode_connector * conn, ov_disp.layer_index = ovi.layer_index; if (ovi.layer_index == SPRD_LAYER_OSD) { ov_disp.osd_handle = fb->names[0]; + prev_ovi = &prev_ovis[1]; } else { ov_disp.img_handle = fb->names[0]; + prev_ovi = &prev_ovis[0]; } - if (!(conn->activated_layers & zpos)) + if (!(conn->activated_layers & zpos) || memcmp (prev_ovi, &ovi, sizeof(overlay_info)) != 0) { SPRD_DRM_DEBUG("SPRD_FB_SET_OVERLAY(%d) rect:%dx%d+%d+%d size:%dx%d\n", ovi.layer_index, w, h, x, y, ovi.size.hsize, ovi.size.vsize); if (ioctl(conn->fb_fd, SPRD_FB_SET_OVERLAY, &ovi) == -1) { @@ -1101,6 +1105,7 @@ static int sprd_drm_connector_overlay_set(struct sprd_drm_mode_connector * conn, strerror (errno)); return -EACCES; } + memcpy (prev_ovi, &ovi, sizeof(overlay_info)); } //commit last setting immediately |