summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-31 11:12:05 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-07-31 11:12:05 -0500
commitacc76cadd3b10e882d3bb1b82fb96ee58fce2b71 (patch)
tree3b72607d86ee8564349da9e133583fce75f8d0e9 /src/lib/ecore_drm2
parentdf658a6d152c9211bce5754c0606192d5c078463 (diff)
ecore_drm2: Stop making dumb fbs and mmapping for gbm fds
We were doing this so E could do screenshots in a hackish way, E has been fixed so this hack here no longer needs to live.
Diffstat (limited to 'src/lib/ecore_drm2')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index f8202fdab3..3a13c3dbbb 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -93,9 +93,7 @@ err:
93EAPI Ecore_Drm2_Fb * 93EAPI Ecore_Drm2_Fb *
94ecore_drm2_fb_gbm_create(int fd, int width, int height, int depth, int bpp, unsigned int format, unsigned int handle, unsigned int stride, void *bo) 94ecore_drm2_fb_gbm_create(int fd, int width, int height, int depth, int bpp, unsigned int format, unsigned int handle, unsigned int stride, void *bo)
95{ 95{
96 struct drm_mode_map_dumb marg;
97 Ecore_Drm2_Fb *fb; 96 Ecore_Drm2_Fb *fb;
98 int ret;
99 97
100 EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), NULL); 98 EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), NULL);
101 99
@@ -125,16 +123,6 @@ ecore_drm2_fb_gbm_create(int fd, int width, int height, int depth, int bpp, unsi
125 goto err; 123 goto err;
126 } 124 }
127 } 125 }
128
129 /* mmap it if we can so screenshots are easy */
130 memset(&marg, 0, sizeof(struct drm_mode_map_dumb));
131 marg.handle = fb->handles[0];
132 ret = sym_drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, &marg);
133 if (!ret)
134 {
135 fb->mmap = mmap(NULL, fb->sizes[0], PROT_WRITE, MAP_SHARED, fd, marg.offset);
136 if (fb->mmap == MAP_FAILED) fb->mmap = NULL;
137 }
138 return fb; 126 return fb;
139 127
140err: 128err: