summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_fb.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm/ecore_drm_fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c
index f705fa2483..7f3d32360e 100644
--- a/src/lib/ecore_drm/ecore_drm_fb.c
+++ b/src/lib/ecore_drm/ecore_drm_fb.c
@@ -40,6 +40,7 @@ _ecore_drm_fb_create2(int fd, Ecore_Drm_Fb *fb)
40{ 40{
41 struct drm_mode_fb_cmd2 cmd; 41 struct drm_mode_fb_cmd2 cmd;
42 uint32_t hdls[4], pitches[4], offsets[4], fmt; 42 uint32_t hdls[4], pitches[4], offsets[4], fmt;
43 uint64_t modifiers[4];
43 44
44#define _fourcc_code(a,b,c,d) \ 45#define _fourcc_code(a,b,c,d) \
45 ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ 46 ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
@@ -49,6 +50,7 @@ _ecore_drm_fb_create2(int fd, Ecore_Drm_Fb *fb)
49 hdls[0] = fb->hdl; 50 hdls[0] = fb->hdl;
50 pitches[0] = fb->stride; 51 pitches[0] = fb->stride;
51 offsets[0] = 0; 52 offsets[0] = 0;
53 modifiers[0] = 0;
52 54
53 memset(&cmd, 0, sizeof(struct drm_mode_fb_cmd2)); 55 memset(&cmd, 0, sizeof(struct drm_mode_fb_cmd2));
54 cmd.fb_id = 0; 56 cmd.fb_id = 0;
@@ -59,6 +61,7 @@ _ecore_drm_fb_create2(int fd, Ecore_Drm_Fb *fb)
59 memcpy(cmd.handles, hdls, 4 * sizeof(hdls[0])); 61 memcpy(cmd.handles, hdls, 4 * sizeof(hdls[0]));
60 memcpy(cmd.pitches, pitches, 4 * sizeof(pitches[0])); 62 memcpy(cmd.pitches, pitches, 4 * sizeof(pitches[0]));
61 memcpy(cmd.offsets, offsets, 4 * sizeof(offsets[0])); 63 memcpy(cmd.offsets, offsets, 4 * sizeof(offsets[0]));
64 memcpy(cmd.modifier, modifiers, 4 * sizeof(modifiers[0]));
62 65
63 if (drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &cmd)) 66 if (drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &cmd))
64 return EINA_FALSE; 67 return EINA_FALSE;