[E-devel] Goodbye
As some of you already know, today is my last day working for Samsung, and I no longer have a financial incentive to contribute to EFL. One of my primary reasons for leaving this position is that it was tied to a continued requirement to work on EFL, and I've grown weary of doing that, so I won't be lingering as a community developer. Over the years there have been times when I've felt EFL was on the cusp of outgrowing its hobby project roots and making a shift towards grown-up standards (incorporating peer review, CI, a push for better documentation), followed by events that felt like major setbacks on that path. Some days it felt like we were reducing the insurmountable mountain of technical debt, and other days hopelessly watching it increase. EFL is currently in a situation where leadership is frequently at odds with the majority of contributors, and this leads to developers finding themselves worrying that work they've been paid to do (and maybe sometimes have even done well) will be unilaterally reverted, possibly with threats of commit right revocation. This makes contributing pointlessly stressful, and drives developers away. I hope I've left my small corners of the project a little better than I found them, and I thank you all for an opportunity to contribute. I've met some excellent people in my time here, and hope to keep in touch. I'll still be around on all the regular IRC servers, feel free to contact me*. Best of luck, Derek * Just not about EFL. Ever. Seriously. ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EFL 1.21.0 alpha1 released
I've created a phab ticket for this at T7120 and am testing a fix for it now. On 2018-07-10 12:36 AM, Simon Lees wrote: > > On 06/07/18 23:57, Stefan Schmidt wrote: >> This alpha release for 1.21 starts the freeze period and stabilization >> phase for the 1.21 release cycle. There are still problems to fix and we >> appreciate any tester of this to let us know about problems seen. This >> goes for packaging, testing with efl based applications, integration >> into your systems, etc. >> >> http://download.enlightenment.org/rel/libs/efl/efl-1.21.0-alpha1.tar.xz >> fd27ff6ee75438f761cc50a182f20caf92f324f58a4258c404815a71521a43d7 >> > OK I got past the missing file, but now it hangs on creating > docs, it think. > anyone have success building 1.21.0 alpha 1 from the snapshot > tar.gz? > the tar.xz on the main site news section is missing a file so > it doesnt compile at all. > AJSlye, missing files in the first tarball is pretty common, > its just normally I build test and find the missing files rather then > you :-) > it's missing window_v6.x > frrom src/lib/ecore_wl2/ > ok i'll ping stefan when he's up > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] More new project tags
Hello, I've just added two new project tags: "Performance" for tracking performance problems and regressions "Refactoring" to help try to track the copy+paste abuse in various parts of the tree and help us clean up a bit. Thanks, Derek -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EFL Freeze
On 2018-06-08 11:44 AM, Christopher Michael wrote: > On 06/08/2018 11:17 AM, Mike Blumenkrantz wrote: >> Hello, >> >> Stefan is off for this entire month, so let's try organizing the >> release a >> bit while he's gone! >> >> We had previously agreed to start the freeze "after Cedric's branches >> merged". That branch was merged some time ago, and it seems we are >> already >> in bug fixing mode. >> >> After speaking a bit with bu5hm4n/Marcel, who has been handling a lot of >> the bug fixing, I propose the following: >> >> * We consider the freeze to have started as of last Friday (1 June 2018), >> and proceed from there. >> * During the freeze period, all newly-submitted features (ie. anything >> submitted on or after the freeze start date) must go through patch review >> and receive 2+ approvals from core developers; if employed by Samsung, >> the >> developers must not work for the same office. > > I was under the impression that one of the points of a freeze is that no > new features could be added and we can focus on bug fixes. Your mention > of newly-submitted features "after the freeze start date" is a little > misleading I read that as a way to handle any potential features already in the review queue that didn't beat the retro-active freeze date. Though, there was one time when I've had to add API during freeze to fix a major wayland related bug. My opinion, fwiw, is that features proposed after June 1 would need a very strong justification at this point, and anything after today would have to be an exceptional situation (absolutely required to fix a bug or massive oversight, a showstopper). Thanks, Derek >> * Feature patches submitted prior to the freeze date which are still >> under >> review and have received review comments prior to the freeze date can be >> merged/landed through normal patch review. >> >> Marcel has also been working on improvements to our bug handling workflow >> which will be explained in a forthcoming mail. I believe that these >> methods >> should enable us to be in a good position to execute a release on or near >> the time of Stefan's return. >> >> If nobody disagrees with the basic premise of beginning the freeze, >> https://phab.enlightenment.org/T6926 is a great place to start looking >> for >> things to work on. >> > > No disagreements here. > > Cheers, > Chris > >> >> regards, >> >> Mike > > > > -- > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] EFL Freeze
On 2018-06-08 10:22 AM, Daniel Kolesa wrote: > On Fri, Jun 8, 2018, at 17:17, Mike Blumenkrantz wrote: >> Hello, >> >> Stefan is off for this entire month, so let's try organizing the release a >> bit while he's gone! >> >> We had previously agreed to start the freeze "after Cedric's branches >> merged". That branch was merged some time ago, and it seems we are already >> in bug fixing mode. >> >> After speaking a bit with bu5hm4n/Marcel, who has been handling a lot of >> the bug fixing, I propose the following: >> >> * We consider the freeze to have started as of last Friday (1 June 2018), >> and proceed from there. >> * During the freeze period, all newly-submitted features (ie. anything >> submitted on or after the freeze start date) must go through patch review >> and receive 2+ approvals from core developers; if employed by Samsung, the >> developers must not work for the same office. >> * Feature patches submitted prior to the freeze date which are still under >> review and have received review comments prior to the freeze date can be >> merged/landed through normal patch review. >> >> Marcel has also been working on improvements to our bug handling workflow >> which will be explained in a forthcoming mail. I believe that these methods >> should enable us to be in a good position to execute a release on or near >> the time of Stefan's return. >> >> If nobody disagrees with the basic premise of beginning the freeze, >> https://phab.enlightenment.org/T6926 is a great place to start looking for >> things to work on. >> > > +1 +1 Thanks, Derek > D5 > >> >> regards, >> >> Mike >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> enlightenment-devel mailing list >> enlightenment-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "ecore-evas-x: set draw_block until the window receives a configure event"
On 2018-05-29 12:08 PM, Carsten Haitzler (The Rasterman) wrote: > On Tue, 29 May 2018 10:13:33 -0400 Mike Blumenkrantz > said: > >> While it is true that a mail was sent by JackDanielz related to this patch, >> the elapsed time between that mail and this revert is roughly 1.5 hours on >> a Saturday afternoon during a federal holiday weekend. If inactivity from a >> patch author is going to be used as reasoning for a revert, I think that >> the time period given should be a reasonable one. > > it's the severity of the break. a totally blank screen. impossible to recover > from without going to a text console and finding a better working revision. > when > a break is severe enough then a revert asap is what needs doing with people > already finding it and complaining after an hour or so. > >> As stated in the original thread, testing for this patch occurred on a >> number of machines, all with a similar quirk: modesetting occurs at the >> start of every session. This happened to work around the issue exhibited in >> some sessions. It's a bit unlucky, but that's the sort of result that can >> be expected when there is no unit testing for the component being modified. > > see below... > >> Questioning the review process in your case seems like a bit of a slippery >> slope considering that the patch was submitted over 3 weeks ago with you as >> a reviewer, and it was mentioned more than once in another ticket that you >> were active in at that time. > > i didn't notice it... but my point is that it's quite severe and review didn't > find it. but a review should involve trying the code out and giving it a test > for possible failure modes. what kind of review is going on? is it just a scan > "oh that looks good to me?"... if so what is the point if it's not catching > problems by at least trying it out (decently)? this also goes for just > compiling the code. > > whilst i was checking some older revisions i found a commit that went through > review, was approved AND pushed... and it didn't compile because it was > missing a ) - not even in an ifdef for some specific os or display system. it > never compiled. sure. a few commits after was another reviewed patch that > fixed > this. what kind of review is going on that lets basic stuff like this through > (you and cedric were not involved with this one)? this was a few weeks ago. This happened to me recently, so you're probably citing my patches here. I made a last minute "trivial" change to a patch set and screwed it up. It slipped past review, and it landed that way. My bad. 100% However, review and testing aren't strictly the same thing. Reviewers shouldn't have to ensure code compiles without warnings - compilers are excellent tools for that, and the author of the code is expected to have run one. A reviewer is supposed to look for high level issues and goodness of fit (does this match project style, should this code be in the project at all). There are far worse problems than build breaks. In general a build break is fairly easy to resolve, and usually the person responsible will fix it as quickly as possible (though there of course are times when that is not the case). EFL contains a large amount of idiosyncratic code, and quite frequently fixing an obvious bug will unmask multiple other bugs. At that point EFL blame culture kicks in and the author is accused of being a "borker", that their patches are terrible, that they have destroyed [key functionality] etc etc. The point of code review isn't to stop 100% of build breaks - it's to reduce the chance that unmaintainable flaky code lands by having peers review it to provide opinions. Perhaps one of the reviewers will remember some savage hack in another part of the tree that's going to fall over now. "Basic testing" in E/EFL is essentially undefined as there are so many different engines, gadgets, possible monitor layouts, target GPUs, etc etc etc, that something that manifests in 0 seconds for you might never happen at all for me unless I remember to fiddle with options, turn on things I don't usually use, or whatever. Without more comprehensive automated testing every developer becomes responsible for an intractable amount of "basic testing". tl;dr. yup, I broke the build for a couple of hours a few weeks ago with a "reviewed" patch - I'm really sorry about that. To use that as proof that review isn't worthwhile or not rigorous seems very shortsighted. Thanks, Derek >> Had the commit log for this revert been only "this patch causes this >> regression" with a simple description of the issue, it's unlikely that this >> mail would exist. Instead, however, it seems like this revert was being >> used to bash both patch review and testing--something which makes little >> sense considering that you declined to attempt either when it was >> explicitly requested of you. I don't think it's fair for you to >> (indirectly) criticize Cedric for trying to do the work that you did not do. > >
Re: [E-devel] [EGIT] [core/efl] feature/security 01/01: edje: Update code to use memcpy as per review
On 2018-05-10 01:50 PM, Carsten Haitzler (The Rasterman) wrote: > On Thu, 10 May 2018 09:11:48 -0700 Christopher Michael >> said: > > and this also improves nothing. if anything now it's harder to read as keyl is > the strlen +2 (with enough pace for :\ on the end) and the buffer is keyl > +1... > so you have to wrap your head around why memcpy is using an odd value for > length... somestringlen + 1 would make sense (strlen + nul), but now it just > smells like its a bug (though it's not). It's actually significantly better than the previous revision for a couple of reasons, most imporantly that it restores the previous behaviour of null terminating the string. This has been discussed in the phabricator differentials mentioned in the commits. I think this kind of thing shouldn't be done in a "feature" branch, but rather a dev one. You're listed as a reviewer on the differential, so you probably got the same confusing email I did that gave me the false impression this landed on master, it has not... Maybe we can take further review to the relevant phab tickets to keep it all in one place? Thanks, Derek > come on dh... you know better... :) > >> devilhorns pushed a commit to branch feature/security. >> >> http://git.enlightenment.org/core/efl.git/commit/?id=d45812f4ed38a6869822508896cfbeb2dd30ef58 >> >> commit d45812f4ed38a6869822508896cfbeb2dd30ef58 >> Author: Chris Michael >> Date: Thu May 10 12:11:29 2018 -0400 >> >> edje: Update code to use memcpy as per review >> --- >> src/bin/edje/edje_cc_out.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c >> index c953b8def3..6f8ef86021 100644 >> --- a/src/bin/edje/edje_cc_out.c >> +++ b/src/bin/edje/edje_cc_out.c >> @@ -4184,8 +4184,8 @@ data_process_string(Edje_Part_Collection *pc, const >> char *prefix, char *s, void key = alloca(keyl + 1); >> if (!key) return; >> >> - strncpy(key, prefix, keyl + 1); >> - strncat(key, ":\"", strlen(":\"")); >> + memcpy(key, prefix, keyl - 1); >> + strncat(key, ":\"", strlen(":\"") + 1); >> >> quote = 0; >> escape = 0; >> >> -- >> >> > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] feature/wayland/multi-output 01/11: ecore-drm2: Re-enable all available outputs
I just installed the python stuff with "pip" like the git-phab docs suggest, is pip not available on Arch? On 2018-05-08 02:29 PM, Christopher Michael wrote: > Yea, I am sure it would be painless here also if my distro provided > packages for all the python stuff that this requires. I found some of > the missing packages inside of the Arch AUR ... but not enough of them > to make this work :( > > Chris > > On 05/08/2018 12:12 PM, Derek Foreman wrote: >> FWIW, I just tried this here on Fedora and it was pretty painless. >> >> This is a *major* improvement over arc diff. >> >> Thanks, >> Derek >> >> On 2018-05-04 10:09 AM, Mike Blumenkrantz wrote: >>> git-phab is the only thing I'm aware of which handles pushing >>> patchsets to >>> phab without merging all the patches into a single patch. What >>> dependencies >>> were missing on your distro? >>> >>> On Fri, May 4, 2018 at 9:54 AM Christopher Michael >>> <cp.mich...@samsung.com> >>> wrote: >>> >>>> On 05/04/2018 09:27 AM, Mike Blumenkrantz wrote: >>>>> Would you mind also pushing this branch to phab for easier reviewing? >>>> I've >>>>> created some temporary docs for doing this here: >>>>> https://phab.enlightenment.org/w/arcanist/ >>>>> >>>> >>>> Is there another way to deal with this ?? I tried getting git-phab >>>> setup >>>> here, but Arch does not readily available all the dependencies >>>> needed to >>>> install the phabricator python module >>>> >>>> Just wondering if there was an easier/cleaner way to do this ?? >>>> >>>> Cheers, >>>> Chris >>>> >>>> >>>>> On Fri, May 4, 2018 at 7:06 AM Christopher Michael < >>>> devilho...@comcast.net> >>>>> wrote: >>>>> >>>>>> devilhorns pushed a commit to branch feature/wayland/multi-output. >>>>>> >>>>>> >>>>>> >>>> http://git.enlightenment.org/core/efl.git/commit/?id=67d0042ca2be59b1f673c9ad8f789333108207cf >>>> >>>>>> >>>>>> commit 67d0042ca2be59b1f673c9ad8f789333108207cf >>>>>> Author: Chris Michael <cp.mich...@samsung.com> >>>>>> Date: Tue Feb 6 11:50:08 2018 -0500 >>>>>> >>>>>> ecore-drm2: Re-enable all available outputs >>>>>> --- >>>>>> src/lib/ecore_drm2/ecore_drm2_outputs.c | 6 -- >>>>>> 1 file changed, 6 deletions(-) >>>>>> >>>>>> diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c >>>>>> b/src/lib/ecore_drm2/ecore_drm2_outputs.c >>>>>> index e39f26a6da..5f332e752d 100644 >>>>>> --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c >>>>>> +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c >>>>>> @@ -762,12 +762,6 @@ _output_create(Ecore_Drm2_Device *dev, const >>>>>> drmModeRes *res, const drmModeConne >>>>>> >>>>>> if (!eina_list_count(dev->outputs)) >>>>>> output->primary = EINA_TRUE; >>>>>> - else >>>>>> - { >>>>>> - /* temporarily disable other outputs which are not >>>>>> primary */ >>>>>> - output->connected = EINA_FALSE; >>>>>> - output->enabled = EINA_FALSE; >>>>>> - } >>>>>> >>>>>> dev->outputs = eina_list_append(dev->outputs, output); >>>>>> >>>>>> >>>>>> -- >>>>>> >>>> > >> > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] feature/wayland/multi-output 01/11: ecore-drm2: Re-enable all available outputs
FWIW, I just tried this here on Fedora and it was pretty painless. This is a *major* improvement over arc diff. Thanks, Derek On 2018-05-04 10:09 AM, Mike Blumenkrantz wrote: > git-phab is the only thing I'm aware of which handles pushing patchsets to > phab without merging all the patches into a single patch. What dependencies > were missing on your distro? > > On Fri, May 4, 2018 at 9:54 AM Christopher Michael> wrote: > >> On 05/04/2018 09:27 AM, Mike Blumenkrantz wrote: >>> Would you mind also pushing this branch to phab for easier reviewing? >> I've >>> created some temporary docs for doing this here: >>> https://phab.enlightenment.org/w/arcanist/ >>> >> >> Is there another way to deal with this ?? I tried getting git-phab setup >> here, but Arch does not readily available all the dependencies needed to >> install the phabricator python module >> >> Just wondering if there was an easier/cleaner way to do this ?? >> >> Cheers, >> Chris >> >> >>> On Fri, May 4, 2018 at 7:06 AM Christopher Michael < >> devilho...@comcast.net> >>> wrote: >>> devilhorns pushed a commit to branch feature/wayland/multi-output. >> http://git.enlightenment.org/core/efl.git/commit/?id=67d0042ca2be59b1f673c9ad8f789333108207cf commit 67d0042ca2be59b1f673c9ad8f789333108207cf Author: Chris Michael Date: Tue Feb 6 11:50:08 2018 -0500 ecore-drm2: Re-enable all available outputs --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index e39f26a6da..5f332e752d 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -762,12 +762,6 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne if (!eina_list_count(dev->outputs)) output->primary = EINA_TRUE; - else - { -/* temporarily disable other outputs which are not primary */ -output->connected = EINA_FALSE; -output->enabled = EINA_FALSE; - } dev->outputs = eina_list_append(dev->outputs, output); -- >> >> >> > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] master 01/02: gl_drm: Move the gl symbol check to immediately after display init
On 2018-03-07 11:26 PM, Carsten Haitzler (The Rasterman) wrote: On Wed, 07 Mar 2018 13:25:27 -0800 Derek Foreman <der...@osg.samsung.com> said: this brings back memories of problems with checking for extension symbols before a context is set up. the context may change the symbols (procaddress returned functions) as for example the same symbol for gles1.1 might vary for 2.0 and then 3.0 ... i know we've had these issue because that that's why the checks happen after context init. are you sure this is right? I think so, but I'm not sure all of this stuff is working as intended. As far as I can tell from the spec, we need an initialized display to query these strings (or NO_DISPLAY to query client extensions, which we really should be doing too). It's the GL_EXTENSIONS, not EGL that need a bound context. It was my commit that split up and moved the gl symbols for this engine in commit eda81c6dffd84f so I think I was overly zealous there. I think before that maybe were were using an invalid/no display and getting just the client strings, which are quite different. (We actually should be using client strings to determine if we can use eglGetPlatformDisplay) I've tested here and I get exactly the same string before and after the recent change on my intel hardware. Haven't checked all the procaddress pointers. Other compositors do the same thing (weston), so I think it's right this way. What we probably should be doing is: query egl client extensions create display (with platform base if it's in client exts) init display query egl extensions create context (perhaps using IMG's priority ext) makecurrent query gl extensions but I'm having a really hard time understanding the guts of evas_gl_symbols() as it seems to expect the EGL_EXTENSIONS string to be passed in (it looks for EGL_KHR_image_base), but it also looks for stuff like GL_OES_mapbuffer which would be in the gl extension string you can't get until you have a context bound. So am I supposed to call this function twice, once with EGL extensions and once with GL extensions? or strcat the strings (which means I have to call after my context is bound?) or ?? Thanks, Derek derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f8658d25fa604f885ee23b20e94a2892d340bceb commit f8658d25fa604f885ee23b20e94a2892d340bceb Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Mar 7 13:11:45 2018 -0600 gl_drm: Move the gl symbol check to immediately after display init We don't actually need a context first, just an initialized display. --- src/modules/evas/engines/gl_drm/evas_outbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index aff5de87bf..b1235355cc 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -226,6 +226,8 @@ _evas_outbuf_egl_setup(Outbuf *ob) return EINA_FALSE; } + eng_gl_symbols(ob->egl.disp); + if (!eglGetConfigs(ob->egl.disp, NULL, 0, ) || (ncfg == 0)) { ERR("eglGetConfigs() fail. code=%#x", eglGetError()); @@ -334,8 +336,6 @@ _evas_outbuf_egl_setup(Outbuf *ob) goto err; } - eng_gl_symbols(ob->egl.disp); - ob->gl_context = glsym_evas_gl_common_context_new(); if (!ob->gl_context) goto err; -- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Creating Enlightenment Gadgets
On 2018-01-14 12:37 AM, Carsten Haitzler wrote: On Sat, 13 Jan 2018 09:06:49 -0600 Derek Foreman <der...@osg.samsung.com> said: On 2018-01-13 12:37 AM, Carsten Haitzler wrote: On Fri, 12 Jan 2018 19:48:15 + Mike Blumenkrantz <michael.blumenkra...@gmail.com> said: On Fri, Jan 12, 2018 at 9:45 AM Carsten Haitzler <ras...@rasterman.com> wrote: On Fri, 12 Jan 2018 13:48:46 + Stephen Houston <smhousto...@gmail.com> said: Both of these cases are solved by rendering the buffers (both gl and software) directly in the outer compositor; see https://phab.enlightenment.org/T6592 on the gadgets workboard for this task which is already nearing completion. that doesn't change anything. some work somewhere has to either copy the data to video memory every change OR the the gpu will likely have to composite and thus access data over a bus (eg over pci bus). if it's an embedded system all memory is equal, but subsurface are going to unlikely help because you'll not have enough hw layers to assign to a host of gadgets. there will generally maybe be 2-5 ... maybe on a good day 8 or 10 layers, and these are far better used for application windows (e.g. separating desktop, active/focused window or window being moved/dragged, etc. etc.). it's still a gadget rendering to a buffer THEN that buffer having to be copied again ... always. at all times. Hey Raster, The trick here is that a wl_shm or dmabuf will never actually be rendered by the *nested* compositor. someone has to render it to the final buffer/screen. either the MAIN compositor has to do this or it's assigned to a hw layer (thus a hardware compositor does it). in the end it adds up to an "always there extra buffer or set of buffers that are swapped". with modules where e is doing all the rendering there is no such buffer (unless we use map or proxies and force it as a choice). i'm just pointing out that there is a cost and it's non-free. but it's also "always there", as opposed to if rendering is done in enlightenment where it can be a choice turned on and off at will (or on the fly). The nested compositor will simply created a proxy buffer and use the existing "hardware" plane infrastructure to place this on a subsurface (I'm calling these virtual hardware planes). It won't even open the file descriptors, it'll just create parent compositor objects for them and proxy along placement and damage requests. yup. i got that... but i directly addressed that. the rendering pipeline here in a wayland sense is: COPY src texture/image data -> client visible buffer 0buffer swapped/sent to compositor (zero copy) COPY compositor read buffer -> write/render to compositor backbuffer 0compositor display backbuffer Yes, true, wl_shm will always take that hit. Any time we can render into dmabuf instead we can then source the buffer directly as a texture if the compositor is using gl, and burn fill rate instead of cpu cycles. This is all damage tracked, of course, for "minimal" updates - but it is, as you say, not 100% efficient for bandwidth or for RAM. What we will lose is: COPY src texture/image data -> client visible buffer 0buffer swapped/sent to compositor (zero copy) COPY nested compositor renders 0nested compositor buffer swapped/sent to compositor COPY compositor read buffer -> write/render to compositor backbuffer 0compositor display backbuffer where gadgets inside e are: COPY src texture/image data -> write/render to compositor backbuffer 0compositor display backbuffer if you have enough hw layers for each and every gadget buffer (which i doubt given that mostly hw has maybe 2 or 3 layers, sometimes 5 or maybe 8), those layers would be far more effectively spent on mouse cursor and focused client windows etc... thus the first pipeline is what will be really happening. yes. if the buffer gets assigned to a hw layer it's COPY src texture/image data -> client visible buffer 0buffer swapped/sent to compositor (zero copy) 0compositor assigns buffer to hw layer though hw layers aren't totally free either. the hw is dma scanning them every refresh to the screeen in addition to all other hw layers... :) it depends where your memory is and so on as to how this impacts things. Right - and most non-rpi hardware I've had my hands on appears to support 1 small ARGB plane (cursor) and 1 XRGB capable plane (intended for video, also generally supports YUV stuffs). The lack of ARGB on the full size plane makes it useless for general clients, as they usually want to render drop shadows... There are a few technical hurdles and @optimizations required to get us there, but that's the tl;dr. When finished, this should prevent all "double draw" performance losses as well as allowing some surprising tricks like GL clients proxying dmabuf GPU rendered buffers through a SW rendering nested compositor
Re: [E-devel] Creating Enlightenment Gadgets
non-technical debate and address one point> On 2018-01-13 12:37 AM, Carsten Haitzler wrote: On Fri, 12 Jan 2018 19:48:15 + Mike Blumenkrantzsaid: On Fri, Jan 12, 2018 at 9:45 AM Carsten Haitzler wrote: On Fri, 12 Jan 2018 13:48:46 + Stephen Houston said: Both of these cases are solved by rendering the buffers (both gl and software) directly in the outer compositor; see https://phab.enlightenment.org/T6592 on the gadgets workboard for this task which is already nearing completion. that doesn't change anything. some work somewhere has to either copy the data to video memory every change OR the the gpu will likely have to composite and thus access data over a bus (eg over pci bus). if it's an embedded system all memory is equal, but subsurface are going to unlikely help because you'll not have enough hw layers to assign to a host of gadgets. there will generally maybe be 2-5 ... maybe on a good day 8 or 10 layers, and these are far better used for application windows (e.g. separating desktop, active/focused window or window being moved/dragged, etc. etc.). it's still a gadget rendering to a buffer THEN that buffer having to be copied again ... always. at all times. Hey Raster, The trick here is that a wl_shm or dmabuf will never actually be rendered by the *nested* compositor. The nested compositor will simply created a proxy buffer and use the existing "hardware" plane infrastructure to place this on a subsurface (I'm calling these virtual hardware planes). It won't even open the file descriptors, it'll just create parent compositor objects for them and proxy along placement and damage requests. There are a few technical hurdles and @optimizations required to get us there, but that's the tl;dr. When finished, this should prevent all "double draw" performance losses as well as allowing some surprising tricks like GL clients proxying dmabuf GPU rendered buffers through a SW rendering nested compositor to a GL rendering parent compositor, which can directly use them as textures. Thanks, Derek -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/enlightenment] master 01/01: Revert "Set close on exec for stdin"
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=a85a602a39642285b5ebabebfb089b5c662ddee9 commit a85a602a39642285b5ebabebfb089b5c662ddee9 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Sep 26 14:19:24 2017 -0500 Revert "Set close on exec for stdin" This reverts commit 40e8bb044c049d7a3a16f61aebef6ea6977509ce. EFL master solves this properly EFL stable currently has a bug that solves this accidentally so there's a window of about 3 commits in git where it's a problem, and nobody should run those commits in production :) This fix caused some problems when restarting E, as stdin would cloexec and then the following startup would try to set cloexec on an invalid fd and generate an err that generated a cri because of an invalid log domain. Someone should probably figure out the log domain thing. --- src/bin/e_main.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/bin/e_main.c b/src/bin/e_main.c index a69371126..98676ca18 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -233,16 +233,6 @@ main(int argc, char **argv) #endif TS("Begin Startup"); - /* When running as a wayland compositor, if a child process has -* access to stdin it can issue some pretty sketchy ioctl()s -* and mess with the console. So let's just set close_on_exec. -* It may be better to fix this in EFL's ecore_exe_run in some -* way, but it will be a while until a stable EFL release has -* it sorted... -*/ - eina_file_close_on_exec(STDIN_FILENO, EINA_TRUE); - /* */ - /* trap deadly bug signals and allow some form of sane recovery */ /* or ability to gdb attach and debug at this point - better than your */ /* wm/desktop vanishing and not knowing what happened */ --
[EGIT] [core/enlightenment] master 01/01: Stop queuing wl_buffer release events
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f4f08ee99a4f852bc0db1520638dacb3ed8eacea commit f4f08ee99a4f852bc0db1520638dacb3ed8eacea Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Sep 26 11:41:19 2017 -0500 Stop queuing wl_buffer release events Now we just kick them out immediately. --- src/bin/e_pixmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index 7a43dc27f..fa3cbfa31 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -150,7 +150,7 @@ _e_pixmap_wl_resource_release(E_Comp_Wl_Buffer *buffer) return; } - wl_resource_queue_event(buffer->resource, WL_BUFFER_RELEASE); + wl_buffer_send_release(buffer->resource); } static void --
[EGIT] [core/efl] master 01/01: efl_wl: Stop queuing buffer release events
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0ad6c47ec2838d50d17fcb7b026a061043afc3ab commit 0ad6c47ec2838d50d17fcb7b026a061043afc3ab Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Sep 26 11:39:19 2017 -0500 efl_wl: Stop queuing buffer release events This was an optimization that caused more pain than benefit in the long term. Weston no longer does it, so we're just following suit. --- src/lib/efl_wl/efl_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 8a1a7c2b7c..6be0f3a340 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -1298,7 +1298,7 @@ comp_surface_buffer_detach(Comp_Buffer **pbuffer) wl_list_remove(>destroy_listener.link); //if (buffer->dbg) fprintf(stderr, "BUFFER(%d) RELEASE\n", wl_resource_get_id(buffer->res)); if (buffer->pool) wl_shm_pool_unref(buffer->pool); - wl_resource_queue_event(buffer->res, WL_BUFFER_RELEASE); + wl_buffer_send_release(buffer->res); free(buffer); *pbuffer = NULL; } --
[EGIT] [core/enlightenment] master 01/01: use safer ecore_exe flags that close stdin/out/err more often
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=51c492fcad7330efa9d5310af9ffd43d0c5bc5e8 commit 51c492fcad7330efa9d5310af9ffd43d0c5bc5e8 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Sep 25 10:10:49 2017 -0500 use safer ecore_exe flags that close stdin/out/err more often commit b9d166f804718ae14e5158496baeab5e29864f82 introduced safer exe functions that both prevent a child from having E's stdin/stdout/stderr and ensure the child's fd 0 (and 1 and 2) are "valid" file descriptors (to work around some buggy software that assumes 0 is an invalid file descriptor) This commit uses the safer functions when launching child programs from the desktop menu as well. ref T5606 @fix --- src/bin/e_exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c index 73d7d6c94..a65e4e3a1 100644 --- a/src/bin/e_exec.c +++ b/src/bin/e_exec.c @@ -458,7 +458,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining) desktop->path); return NULL; } -exe = ecore_exe_run(exec, inst); +exe = e_util_exe_safe_run(exec, inst); if (chdir(buf)) { e_util_dialog_show @@ -496,11 +496,11 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining) } } else -exe = ecore_exe_run(exec, inst); +exe = e_util_exe_safe_run(exec, inst); efreet_desktop_free(tdesktop); } else - exe = ecore_exe_run(exec, inst); + exe = e_util_exe_safe_run(exec, inst); } else if (desktop && desktop->url) { --
[EGIT] [core/enlightenment] master 02/02: Set close on exec for stdin
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=40e8bb044c049d7a3a16f61aebef6ea6977509ce commit 40e8bb044c049d7a3a16f61aebef6ea6977509ce Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 22 20:57:07 2017 -0500 Set close on exec for stdin ref T5606 --- src/bin/e_main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 98676ca18..a69371126 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -233,6 +233,16 @@ main(int argc, char **argv) #endif TS("Begin Startup"); + /* When running as a wayland compositor, if a child process has +* access to stdin it can issue some pretty sketchy ioctl()s +* and mess with the console. So let's just set close_on_exec. +* It may be better to fix this in EFL's ecore_exe_run in some +* way, but it will be a while until a stable EFL release has +* it sorted... +*/ + eina_file_close_on_exec(STDIN_FILENO, EINA_TRUE); + /* */ + /* trap deadly bug signals and allow some form of sane recovery */ /* or ability to gdb attach and debug at this point - better than your */ /* wm/desktop vanishing and not knowing what happened */ --
[EGIT] [core/enlightenment] master 01/02: Fix wayland frame callback failure
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=077ae0695507975e793fc6dce631f692391895fe commit 077ae0695507975e793fc6dce631f692391895fe Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 22 17:00:25 2017 -0500 Fix wayland frame callback failure Turns out ecore_animator_add() can randomly pick the wrong canvas to use as a tick source. Using EFL_EVENT_ANIMATOR_TICK on the compositor evas instead will ensure we don't accidentally pick an internal window for a tick source. Fix T6070 --- src/bin/e_comp_wl.c | 22 +++--- src/bin/e_comp_wl.h | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 1575ad406..e33b289e1 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2126,8 +2126,8 @@ _e_comp_wl_subsurface_commit_to_cache(E_Client *ec) sdata->cached.has_data = EINA_TRUE; } -static Eina_Bool -_cb_early_frame_animator(void *data) +static void +_cb_early_frame_cb(void *data, const Efl_Event *event EINA_UNUSED) { E_Client *ec; @@ -2141,11 +2141,10 @@ _cb_early_frame_animator(void *data) */ if (ec->comp_data->early_frame++ > 15) { - ec->comp_data->early_frame_animator = NULL; ec->comp_data->early_frame = 0; - return EINA_FALSE; + efl_event_callback_del(e_comp->evas, EFL_EVENT_ANIMATOR_TICK, + _cb_early_frame_cb, data); } - return EINA_TRUE; } static void @@ -2153,15 +2152,16 @@ _e_comp_wl_surface_early_frame(E_Client *ec) { if (e_comp_object_damage_exists(ec->frame)) { -ecore_animator_del(ec->comp_data->early_frame_animator); -ec->comp_data->early_frame_animator = NULL; +efl_event_callback_del(e_comp->evas, EFL_EVENT_ANIMATOR_TICK, + _cb_early_frame_cb, ec); ec->comp_data->early_frame = 0; return; } if (ec->on_post_updates) return; + if (!ec->comp_data->early_frame) + efl_event_callback_add(e_comp->evas, EFL_EVENT_ANIMATOR_TICK, + _cb_early_frame_cb, ec); ec->comp_data->early_frame = 1; - if (ec->comp_data->early_frame_animator) return; - ec->comp_data->early_frame_animator = ecore_animator_add(_cb_early_frame_animator, ec); } static void @@ -2532,8 +2532,8 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) /* make sure this is a wayland client */ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return; - ecore_animator_del(ec->comp_data->early_frame_animator); - ec->comp_data->early_frame_animator = NULL; + efl_event_callback_del(e_comp->evas, EFL_EVENT_ANIMATOR_TICK, + _cb_early_frame_cb, ec); ec->comp_data->early_frame = 0; if (ec == e_comp_wl->wl.client_ec) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index d2c300c12..199923a45 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -359,7 +359,6 @@ struct _E_Comp_Wl_Client_Data E_Comp_X_Client_Data *xwayland_data; #endif - Ecore_Animator *early_frame_animator; int early_frame; Eina_Bool mapped : 1; --
[EGIT] [core/enlightenment] master 01/01: Fix crash when processing a wayland client cursor set after death
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9566b72e865ccee156641dbb76775cefd88b36b7 commit 9566b72e865ccee156641dbb76775cefd88b36b7 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 8 14:38:08 2017 -0500 Fix crash when processing a wayland client cursor set after death It looks like the only way we can get here with NULL resource data is when we explicitly cleared it in the del hook, meaning the client is dead to us. In this case it's ok to ignore the cursor set request. ref T4988 --- src/bin/e_comp_wl_input.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 1ae189297..c3da683c2 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -83,6 +83,12 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou return; } ec = wl_resource_get_user_data(surface_resource); + /* I think this only happens when we've deleted the resource from +* the client del callback - so the client is gone and shouldn't be +* setting a cursor, but the surface still exists so stale requests +* are being processed... let's BAIL. +*/ + if (!ec) return; if (!ec->re_manage) { ec->comp_data->cursor = ec->re_manage = 1; --
[EGIT] [core/enlightenment] master 01/01: Fix video explosion on rpi3 during screen blank
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c21c282483c59de2458f473d4387bd70f2faf490 commit c21c282483c59de2458f473d4387bd70f2faf490 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Sep 5 14:35:07 2017 -0500 Fix video explosion on rpi3 during screen blank Seems like spamming dpms on when it's already on and we're rendering is antisocial, so cut that out. Fix T5977 --- src/modules/wl_drm/e_mod_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 4c956da61..e4355268e 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -643,7 +643,8 @@ _drm2_dpms(int set) if (!strcmp(name, s->info.name)) { if ((!s->config.configured) || s->config.enabled) -ecore_drm2_output_dpms_set(output, set); +if (ecore_drm2_output_dpms_get(output) != set) + ecore_drm2_output_dpms_set(output, set); } free(name); --
[EGIT] [core/efl] master 01/01: ecore_drm2: Better handling of blank time checks
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1848f9a8e60903424e0ad9ded7630dc092a44984 commit 1848f9a8e60903424e0ad9ded7630dc092a44984 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Sep 5 12:08:02 2017 -0500 ecore_drm2: Better handling of blank time checks On some systems we'll successfully complete the vblank ioctl but get a reply of 0. When that happens we can't use that time for ticking as it will break all of the entire world. Fixes immediate screen blank on rpi3. @ref T5977 --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 1f52953ffb..e64f8f03c9 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1596,6 +1596,7 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s { drmVBlank v; int ret; + Eina_Bool success; EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sec, EINA_FALSE); @@ -1605,14 +1606,13 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s v.request.type = DRM_VBLANK_RELATIVE; v.request.sequence = sequence; ret = sym_drmWaitVBlank(output->fd, ); - if (ret) + success = (ret == 0) && (v.reply.tval_sec > 0 || v.reply.tval_usec > 0); + if (!success) { ret = _blanktime_fallback(output, sequence, sec, usec); if (ret) return EINA_FALSE; return EINA_TRUE; } - if (v.reply.tval_sec < 0) return EINA_FALSE; - if (v.reply.tval_usec < 0) return EINA_FALSE; *sec = v.reply.tval_sec; *usec = v.reply.tval_usec; --
[EGIT] [core/enlightenment] master 01/01: Remove bogus EINA_UNUSED
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=cc5eec5cc3c736488d67f426260c8fbc689a0764 commit cc5eec5cc3c736488d67f426260c8fbc689a0764 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 15:13:41 2017 -0500 Remove bogus EINA_UNUSED move along, nothing to see here. --- src/bin/e_comp_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 87d93ee46..9025ba8de 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2127,7 +2127,7 @@ _e_comp_wl_subsurface_commit_to_cache(E_Client *ec) } static Eina_Bool -_cb_early_frame_animator(void *data EINA_UNUSED) +_cb_early_frame_animator(void *data) { E_Client *ec; --
[EGIT] [core/efl] master 01/01: wayland_shm: Try a little harder to verify exynos dmabuf capabilities
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6e30535a3c39efa5ce1662e3f42753dde9c48681 commit 6e30535a3c39efa5ce1662e3f42753dde9c48681 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 14:49:22 2017 -0500 wayland_shm: Try a little harder to verify exynos dmabuf capabilities Turns out the "device_open" function pretty much just tests calloc functionality, and doesn't open any device. So let's allocate a tiny bo and discard it to make sure we're actually on exynos. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index e06b11e3d7..5c9619e4a5 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -269,6 +269,7 @@ _exynos_buffer_manager_setup(int fd) { Eina_Bool fail = EINA_FALSE; void *drm_exynos_lib; + struct exynos_bo *bo; drm_exynos_lib = dlopen("libdrm_exynos.so", RTLD_LAZY | RTLD_GLOBAL); if (!drm_exynos_lib) return EINA_FALSE; @@ -285,6 +286,12 @@ _exynos_buffer_manager_setup(int fd) buffer_manager->priv = sym_exynos_device_create(fd); if (!buffer_manager->priv) goto err; + /* _device_create succeeds on any arch, test harder */ + bo = sym_exynos_bo_create(buffer_manager->priv, 32, 0); + if (!bo) goto err; + + sym_exynos_bo_destroy(bo); + buffer_manager->alloc = _exynos_alloc; buffer_manager->map = _exynos_map; buffer_manager->unmap = _exynos_unmap; --
[EGIT] [core/efl] master 01/01: elm_win: Stop hiding the mouse cusor on window out under wayland
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e368896145dd47943467679a343a533b575a1aca commit e368896145dd47943467679a343a533b575a1aca Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 13:28:36 2017 -0500 elm_win: Stop hiding the mouse cusor on window out under wayland We needed to do this to prevent burning cpu with animated cursors before we did frame callback based animating. Now the compositor will stop our frame callbacks when our cursor is implicitly visible when the pointer isn't over our window, so we don't have to use window hides for it. --- src/lib/elementary/efl_ui_win.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index b06bdaafdc..c64ce3a1bf 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -997,11 +997,7 @@ _elm_win_mouse_out(Ecore_Evas *ee) #ifdef HAVE_ELEMENTARY_WL2 if ((sd->wl.win) && (sd->pointer.ee)) - { -sd->pointer.visible = EINA_FALSE; -sd->pointer.surf = NULL; -ecore_evas_hide(sd->pointer.ee); - } + sd->pointer.visible = EINA_FALSE; #endif } --
[EGIT] [core/efl] master 01/01: ecore_wl2: Don't set up callbacks on initial commit
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1f555c897e78f2ac219ff22afe0c254675d1d633 commit 1f555c897e78f2ac219ff22afe0c254675d1d633 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 12:03:49 2017 -0500 ecore_wl2: Don't set up callbacks on initial commit We don't want to do frame callbacks until after we can actually draw stuff --- src/lib/ecore_wl2/ecore_wl2_window.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index f916ccf7f6..afffdfdfa2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1394,10 +1394,12 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) if (window->commit_pending) ERR("Commit before previous commit processed"); - window->commit_pending = EINA_TRUE; - window->callback = wl_surface_frame(window->surface); - wl_callback_add_listener(window->callback, &_frame_listener, window); - + if (!window->pending.configure) + { +window->commit_pending = EINA_TRUE; +window->callback = wl_surface_frame(window->surface); +wl_callback_add_listener(window->callback, &_frame_listener, window); + } if (flush) { wl_surface_commit(window->surface); --
[EGIT] [core/efl] master 01/01: build: Drop wayland protocol requirement to 1.9
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0b5c4e5c25b33470f9268f96c9b5fc724fbb151c commit 0b5c4e5c25b33470f9268f96c9b5fc724fbb151c Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 08:45:47 2017 -0500 build: Drop wayland protocol requirement to 1.9 Some distros are sitting at 1.9 for a long time now, and 1.10 didn't add any critical functionality for us. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4b1e469e11..9bdf7c364c 100644 --- a/configure.ac +++ b/configure.ac @@ -1992,7 +1992,7 @@ AC_ARG_ENABLE([wayland], [want_wayland="no"]) if test "${want_wayland}" = "yes"; then - EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0 wayland-protocols >= 1.10]) + EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0 wayland-protocols >= 1.9]) PKG_CHECK_MODULES([WAYLAND], [wayland-scanner >= 1.11.0], [ AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable]) --
[EGIT] [core/enlightenment] master 01/01: Drop wayland-protocols requirement to 1.9
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9c23fbaf280e8c24ce02f2bf0d38d4fb0e9d12b1 commit 9c23fbaf280e8c24ce02f2bf0d38d4fb0e9d12b1 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Sep 1 08:47:55 2017 -0500 Drop wayland-protocols requirement to 1.9 This is blocking people from using it, and we don't actually support anything 1.10 added (xdg-outputs) yet --- configure.ac | 2 +- meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 893551a4e..99be884eb 100644 --- a/configure.ac +++ b/configure.ac @@ -682,7 +682,7 @@ AC_SUBST([SOUND_CFLAGS]) AC_SUBST([SOUND_LIBS]) if test "x${e_cv_want_wayland_only}" != "xno" ;then - PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 >= 1.18 wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-protocols >= 1.10 wayland-scanner >= 1.11.0 xkbcommon uuid], + PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 >= 1.18 wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-protocols >= 1.9 wayland-scanner >= 1.11.0 xkbcommon uuid], [ have_wayland=yes have_wayland_dep=true diff --git a/meson.build b/meson.build index cdbf1f964..4753b7944 100644 --- a/meson.build +++ b/meson.build @@ -267,7 +267,7 @@ dep_elementary = dependency('elementary' , required: true) dep_wayland = [] if get_option('wayland') == true - wayland_protocols = dependency('wayland-protocols', version: '>= 1.10') + wayland_protocols = dependency('wayland-protocols', version: '>= 1.9') dir_wayland_protocols = wayland_protocols.get_pkgconfig_variable('pkgdatadir') wayland_version = '>= 1.11.0' dep_wayland = [ dependency('ecore-wl2'), @@ -284,7 +284,7 @@ if get_option('wayland') == true requires_drm = 'ecore-drm2' dep_wayland += dep_ecore_drm2 endif - requires_wayland = ' '.join([ 'wayland-protocols >= 1.10', + requires_wayland = ' '.join([ 'wayland-protocols >= 1.9', 'ecore-wl2', requires_drm, ' '.join(['wayland-server' , wayland_version]), --
[EGIT] [core/enlightenment] master 01/01: Handle wayland frame commits with no surface damage better
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=42d3e30f5ce4013934630dabbf1a9214c4f92d5a commit 42d3e30f5ce4013934630dabbf1a9214c4f92d5a Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 31 14:41:07 2017 -0500 Handle wayland frame commits with no surface damage better Previously we immediately kicked back the frame callback when a client sent a surface frame without damage. This let clients that use frames for timing proceed, but they generally just send another frame right away and spin in this way until they reach their intended render time. Now we use animators so the frame callbacks will be limited to the animator tick source's frequency. ref T5850 --- src/bin/e_comp_wl.c | 48 src/bin/e_comp_wl.h | 3 +++ 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index d5896adca..87d93ee46 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2126,6 +2126,44 @@ _e_comp_wl_subsurface_commit_to_cache(E_Client *ec) sdata->cached.has_data = EINA_TRUE; } +static Eina_Bool +_cb_early_frame_animator(void *data EINA_UNUSED) +{ + E_Client *ec; + + ec = data; + if (ec->comp_data->early_frame == 1) + e_pixmap_image_clear(ec->pixmap, 1); + + /* If some client does a surface frame and never follows with +* a render, it's just an idiot, so stop trying to help it with +* timing. +*/ + if (ec->comp_data->early_frame++ > 15) + { + ec->comp_data->early_frame_animator = NULL; + ec->comp_data->early_frame = 0; + return EINA_FALSE; + } + return EINA_TRUE; +} + +static void +_e_comp_wl_surface_early_frame(E_Client *ec) +{ + if (e_comp_object_damage_exists(ec->frame)) + { +ecore_animator_del(ec->comp_data->early_frame_animator); +ec->comp_data->early_frame_animator = NULL; +ec->comp_data->early_frame = 0; +return; + } + if (ec->on_post_updates) return; + ec->comp_data->early_frame = 1; + if (ec->comp_data->early_frame_animator) return; + ec->comp_data->early_frame_animator = ecore_animator_add(_cb_early_frame_animator, ec); +} + static void _e_comp_wl_subsurface_commit_from_cache(E_Client *ec) { @@ -2138,8 +2176,7 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec) DBG("Subsurface Commit from Cache"); _e_comp_wl_surface_state_commit(ec, >cached); - if (!e_comp_object_damage_exists(ec->frame)) - e_pixmap_image_clear(ec->pixmap, 1); + _e_comp_wl_surface_early_frame(ec); } static void @@ -2495,6 +2532,10 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) /* make sure this is a wayland client */ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return; + ecore_animator_del(ec->comp_data->early_frame_animator); + ec->comp_data->early_frame_animator = NULL; + ec->comp_data->early_frame = 0; + if (ec == e_comp_wl->wl.client_ec) e_comp_wl->wl.client_ec = NULL; e_comp_wl_extension_pointer_unconstrain(ec); @@ -3028,8 +3069,7 @@ EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec) { _e_comp_wl_surface_state_commit(ec, >comp_data->pending); - if (!e_comp_object_damage_exists(ec->frame)) - e_pixmap_image_clear(ec->pixmap, 1); + _e_comp_wl_surface_early_frame(ec); e_comp_wl_extension_pointer_constraints_commit(ec); return EINA_TRUE; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 58786b6d1..0ff222584 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -358,6 +358,9 @@ struct _E_Comp_Wl_Client_Data E_Comp_X_Client_Data *xwayland_data; #endif + Ecore_Animator *early_frame_animator; + int early_frame; + Eina_Bool mapped : 1; Eina_Bool evas_init : 1; Eina_Bool cursor : 1; --
[EGIT] [core/efl] master 01/01: ecore_wl2: Fix session recovery
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d0b8c41f920038f41446f06c3d08dc9c57adf35c commit d0b8c41f920038f41446f06c3d08dc9c57adf35c Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 31 11:11:59 2017 -0500 ecore_wl2: Fix session recovery I broke this in commit 1bb45f6e6194fa046d3d1409e1aacecc14dc4b4f We intentionally *don't* flush in window_semi_free, as this could be when there's no compositor left to flush to (in the case of session recovery). --- src/lib/ecore_wl2/ecore_wl2_window.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 30c29d759d..f916ccf7f6 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -24,7 +24,6 @@ _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window) if (window->surface) wl_surface_destroy(window->surface); window->surface = NULL; window->surface_id = -1; - ecore_wl2_display_flush(window->display); } --
[EGIT] [core/efl] master 02/02: ecore_wl2: Kill the wl idle enterer
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=57d5b5921e8a4a05f4a1b468f1cfed74d28b95f9 commit 57d5b5921e8a4a05f4a1b468f1cfed74d28b95f9 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 14:53:46 2017 -0500 ecore_wl2: Kill the wl idle enterer We do flushes when we need them now, so we don't need this somewhat non deterministic flush mechanism anymore. Anything that breaks as a result of this should be fixable by adding an ecore_wl2_display_flush() somewhere appropriate. --- src/lib/ecore_wl2/ecore_wl2_display.c | 41 --- src/lib/ecore_wl2/ecore_wl2_private.h | 1 - 2 files changed, 42 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index b11b3af6c6..4d081cc5c3 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -10,7 +10,6 @@ static Eina_Hash *_server_displays = NULL; static Eina_Hash *_client_displays = NULL; -static Eina_Bool _cb_connect_idle(void *data); static Eina_Bool _cb_connect_data(void *data, Ecore_Fd_Handler *hdl); static Eina_Bool _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync); @@ -450,8 +449,6 @@ _recovery_timer_add(Ecore_Wl2_Display *ewd) Ecore_Wl2_Window *window; eina_hash_free_buckets(ewd->globals); - ecore_idle_enterer_del(ewd->idle_enterer); - ewd->idle_enterer = NULL; ecore_main_fd_handler_del(ewd->fd_hdl); ewd->fd_hdl = NULL; @@ -541,40 +538,6 @@ _cb_globals_hash_del(void *data) free(global); } -static Eina_Bool -_cb_connect_idle(void *data) -{ - Ecore_Wl2_Display *ewd = data; - int ret = 0, code; - - ret = wl_display_get_error(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - ret = wl_display_dispatch_pending(ewd->wl.display); - code = errno; - if (ret < 0) goto err; - - ret = wl_display_flush(ewd->wl.display); - code = errno; - if ((ret < 0) && (code == EAGAIN)) - ecore_main_fd_handler_active_set(ewd->fd_hdl, - (ECORE_FD_READ | ECORE_FD_WRITE)); - - return ECORE_CALLBACK_RENEW; - -err: - if ((ret < 0) && (code != EAGAIN)) - { -ewd->idle_enterer = NULL; -_begin_recovery_maybe(ewd, code); - -return ECORE_CALLBACK_CANCEL; - } - - return ECORE_CALLBACK_RENEW; -} - static Ecore_Wl2_Global * _ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) { @@ -697,8 +660,6 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync) ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR, _cb_connect_data, ewd, NULL, NULL); - ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd); - _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); ecore_wl2_display_flush(ewd); return EINA_TRUE; @@ -721,8 +682,6 @@ _ecore_wl2_display_cleanup(Ecore_Wl2_Display *ewd) EINA_INLIST_FOREACH_SAFE(ewd->outputs, tmp, output) _ecore_wl2_output_del(output); - if (ewd->idle_enterer) ecore_idle_enterer_del(ewd->idle_enterer); - if (ewd->fd_hdl) ecore_main_fd_handler_del(ewd->fd_hdl); eina_hash_free(ewd->globals); diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index c71ae676c4..95afcd5f48 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -100,7 +100,6 @@ struct _Ecore_Wl2_Display struct xkb_context *xkb_context; - Ecore_Idle_Enterer *idle_enterer; Ecore_Fd_Handler *fd_hdl; Eina_Hash *globals; --
[EGIT] [core/efl] master 01/02: ecore_wl2: Use ecore_wl2_window_commit for all wl_surface_commits
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1bb45f6e6194fa046d3d1409e1aacecc14dc4b4f commit 1bb45f6e6194fa046d3d1409e1aacecc14dc4b4f Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 14:52:29 2017 -0500 ecore_wl2: Use ecore_wl2_window_commit for all wl_surface_commits This adds an explicit flush to every surface commit. --- src/lib/ecore_wl2/ecore_wl2_display.c | 1 + src/lib/ecore_wl2/ecore_wl2_window.c | 7 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index d96405c5a8..b11b3af6c6 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -700,6 +700,7 @@ _ecore_wl2_display_connect(Ecore_Wl2_Display *ewd, Eina_Bool sync) ewd->idle_enterer = ecore_idle_enterer_add(_cb_connect_idle, ewd); _ecore_wl2_display_event(ewd, ECORE_WL2_EVENT_CONNECT); + ecore_wl2_display_flush(ewd); return EINA_TRUE; } diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 81d8568f09..30c29d759d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -24,6 +24,7 @@ _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window) if (window->surface) wl_surface_destroy(window->surface); window->surface = NULL; window->surface_id = -1; + ecore_wl2_display_flush(window->display); } @@ -234,7 +235,7 @@ _ecore_wl2_window_zxdg_popup_create(Ecore_Wl2_Window *win) win->pending.configure = EINA_TRUE; - wl_surface_commit(win->surface); + ecore_wl2_window_commit(win, EINA_TRUE); } static void @@ -352,7 +353,7 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window) window->aspect.w, window->aspect.h, window->aspect.aspect); } -wl_surface_commit(window->surface); +ecore_wl2_window_commit(window, EINA_TRUE); } if (window->display->wl.session_recovery) @@ -541,7 +542,7 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window) if (window->surface) { wl_surface_attach(window->surface, NULL, 0, 0); -wl_surface_commit(window->surface); +ecore_wl2_window_commit(window, EINA_TRUE); window->commit_pending = EINA_FALSE; } --
[EGIT] [core/efl] master 04/06: wayland: Store Ecore_Wl2_Display instead of wl_display in engines
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=388f8c41c88658ed8d2ae10bcec28a2b0d9a720e commit 388f8c41c88658ed8d2ae10bcec28a2b0d9a720e Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:22:49 2017 -0500 wayland: Store Ecore_Wl2_Display instead of wl_display in engines We'll need to call ecore_wl2 functions on it soon, and anything that really needs the wl_display can query it. --- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c| 6 +++--- src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h | 2 +- src/modules/evas/engines/wayland_egl/evas_engine.c| 4 ++-- src/modules/evas/engines/wayland_egl/evas_engine.h| 2 +- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 11 ++- src/modules/evas/engines/wayland_shm/evas_dmabuf.c| 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index fe45f8a0d4..6c806765f1 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -187,7 +187,7 @@ _ee_display_unset(Ecore_Evas *ee) einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas); if (!einfo) return; - einfo->info.wl_display = NULL; + einfo->info.wl2_display = NULL; einfo->info.wl2_win = NULL; wdata = ee->engine.data; @@ -2165,7 +2165,7 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) { -einfo->info.wl_display = ecore_wl2_display_get(wdata->display); +einfo->info.wl2_display = wdata->display; einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(wdata->display); einfo->info.wl_shm = ecore_wl2_display_shm_get(wdata->display); einfo->info.compositor_version = @@ -2468,7 +2468,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i wdata->sync_done = EINA_TRUE; if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) { - einfo->info.wl_display = ecore_wl2_display_get(ewd); + einfo->info.wl2_display = ewd; einfo->info.destination_alpha = EINA_TRUE; einfo->info.rotation = ee->rotation; einfo->info.depth = 32; diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h index 7be7e2e9c9..c2c0b53b35 100644 --- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h +++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h @@ -17,7 +17,7 @@ struct _Evas_Engine_Info_Wayland /* the wayland shm object used to create new shm pool */ struct wl_shm *wl_shm; struct zwp_linux_dmabuf_v1 *wl_dmabuf; -struct wl_display *wl_display; +Ecore_Wl2_Display *wl2_display; Ecore_Wl2_Window *wl2_win; int depth, rotation, edges; int compositor_version; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index c640f6ccd0..4455aebebf 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -659,7 +659,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int if (ob) { ob->info = inf; -if ((ob->info->info.wl_display != ob->disp) || +if ((ob->info->info.wl2_display != ob->wl2_disp) || (ob->info->info.wl2_win != ob->wl2_win) || /* FIXME: comment out below line. * since there is no place set the info->info.win for now, @@ -672,7 +672,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int Render_Output_Swap_Mode swap_mode = MODE_AUTO; gl_wins--; - if (!ob->info->info.wl_display) + if (!ob->info->info.wl2_display) { eng_window_free(ob); re->generic.software.ob = NULL; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.h b/src/modules/evas/engines/wayland_egl/evas_engine.h index 49218a9121..bab7cad7c9 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.h +++ b/src/modules/evas/engines/wayland_egl/evas_engine.h @@ -55,7 +55,7 @@ extern int _evas_engine_wl_egl_log_dom; struct _Outbuf { - struct wl_display *disp; + Ecore_Wl2_Display *wl2_disp; struct wl_egl_window *win; Ecore_Wl2_Window *wl2_win; int w, h; di
[EGIT] [core/efl] master 02/06: ecore_wl2: Fix small bug in flush handler
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e0d94b8234f32440f71a66249337ee541cf97c52 commit e0d94b8234f32440f71a66249337ee541cf97c52 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:16:34 2017 -0500 ecore_wl2: Fix small bug in flush handler If wl_display_flush() returns a non negative number it was successful, so we should disable the write handler then. We were theoretically always doing an extra flush on an empty buffer. This is mostly cosmetic as that's not a costly operation. --- src/lib/ecore_wl2/ecore_wl2_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 57f98cdcfc..69838f77bc 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -514,7 +514,7 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl) { ret = wl_display_flush(ewd->wl.display); code = errno; -if (ret == 0) +if (ret >= 0) ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ); if ((ret < 0) && (code != EAGAIN)) goto err; --
[EGIT] [core/efl] master 05/06: ecore_wl2: Add ecore_wl2_display_flush() api
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e7db6eec4607e78fa2e5160590f0b47b09379d93 commit e7db6eec4607e78fa2e5160590f0b47b09379d93 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:24:16 2017 -0500 ecore_wl2: Add ecore_wl2_display_flush() api Allowing engines to explicitly flush at the right times will remove some awkwardness and bugs from our current display flush paradigm --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 src/lib/ecore_wl2/ecore_wl2_display.c | 21 + 2 files changed, 33 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 069ec152b8..00fe79965e 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1943,6 +1943,18 @@ EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle) */ EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, void *buffer, int x, int y, Eina_Bool implicit); +/** + * Push buffered wayland protocol to compositor + * + * Wayland protocol is only actually sent when a flush occurs, + * so the display should be flushed at appropriate times, such + * as after a commit. + * + * @param display + * @since 1.20 + */ +EAPI void ecore_wl2_display_flush(Ecore_Wl2_Display *display); + # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 69838f77bc..d96405c5a8 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -,3 +,24 @@ ecore_wl2_display_name_get(const Ecore_Wl2_Display *display) EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL); return display->name; } + +EAPI void +ecore_wl2_display_flush(Ecore_Wl2_Display *display) +{ + int ret, code; + + EINA_SAFETY_ON_NULL_RETURN(display); + + ret = wl_display_flush(display->wl.display); + if (ret >= 0) return; + + code = errno; + if (code == EAGAIN) + { +ecore_main_fd_handler_active_set(display->fd_hdl, + (ECORE_FD_READ | ECORE_FD_WRITE)); +return; + } + + _begin_recovery_maybe(display, code); +} --
[EGIT] [core/efl] master 03/06: walyand_shm: Remove unused variable
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f2756f92e8cb0c8dd3e4861ff4914bdfa626823f commit f2756f92e8cb0c8dd3e4861ff4914bdfa626823f Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:17:13 2017 -0500 walyand_shm: Remove unused variable Nothing in here actually cares about the wl_display anymore. --- src/modules/evas/engines/wayland_shm/evas_shm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index e7acd146fc..031b90fd35 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -61,7 +61,6 @@ struct _Shm_Leaf typedef struct _Shm_Surface Shm_Surface; struct _Shm_Surface { - struct wl_display *disp; struct wl_shm *shm; int w, h; int num_buff; @@ -593,7 +592,6 @@ _evas_shm_surface_create(Surface *s, int w, int h, int num_buff) surf->w = w; surf->h = h; - surf->disp = s->info->info.wl_display; surf->shm = s->info->info.wl_shm; surf->num_buff = num_buff; surf->alpha = s->info->info.destination_alpha; --
[EGIT] [core/efl] master 01/06: ecore_drm2: Fix warning with a dirty hack
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4e41f7569bfb1ca2fa5591e96ea31df5af6fa6ad commit 4e41f7569bfb1ca2fa5591e96ea31df5af6fa6ad Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:10:33 2017 -0500 ecore_drm2: Fix warning with a dirty hack So because we include wayland-server.h we're told that wl_buffer is deprecated - however clients are still expected to use it, it's only deprecated for usage in a compositor. Making these into void pointers shuts up the warning. We need to include wayland-server.h since some of the code provided by ecore_wl2 is for compositors, but some of it is also for clients... --- src/lib/ecore_wl2/Ecore_Wl2.h | 2 +- src/lib/ecore_wl2/ecore_wl2_private.h | 2 +- src/lib/ecore_wl2/ecore_wl2_window.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index e09c42e9ce..069ec152b8 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1941,7 +1941,7 @@ EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle) * * @since 1.20 */ -EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, struct wl_buffer *buffer, int x, int y, Eina_Bool implicit); +EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, void *buffer, int x, int y, Eina_Bool implicit); # endif diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 85661ecba3..9ee07b7463 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -162,7 +162,7 @@ struct _Ecore_Wl2_Window const char *role; struct wl_surface *surface; - struct wl_buffer *buffer; + void *buffer; struct wl_callback *callback; struct www_surface *www_surface; struct zxdg_surface_v6 *zxdg_surface; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 566ea99de7..2ea2bd979d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1438,7 +1438,7 @@ ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle) } EAPI void -ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, struct wl_buffer *buffer, int x, int y, Eina_Bool implicit) +ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, void *buffer, int x, int y, Eina_Bool implicit) { EINA_SAFETY_ON_NULL_RETURN(win); EINA_SAFETY_ON_NULL_RETURN(win->surface); --
[EGIT] [core/efl] master 06/06: wayland: Force a display flush when committing surfaces
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f886a76daeab2b73eee441008e6b78d3f3d4ec02 commit f886a76daeab2b73eee441008e6b78d3f3d4ec02 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 30 12:29:48 2017 -0500 wayland: Force a display flush when committing surfaces We had a hack in place to flush the display from an idle enterer instead of after a surface commit. This led to a problem where the idle enterer dispatch order was: renderer for main canvas wayland dispatch idle enterer renderer for mouse cursor canvas The surface commit for the mouse cursor was never dispatched, so the mouse cursor animation would only update at the rate other events occurred. By flushing at the appropriate times instead we ensure a proper update. ref T5850 --- src/lib/ecore_wl2/ecore_wl2_window.c| 6 +- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 2ea2bd979d..81d8568f09 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1398,7 +1398,11 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) window->callback = wl_surface_frame(window->surface); wl_callback_add_listener(window->callback, &_frame_listener, window); - if (flush) wl_surface_commit(window->surface); + if (flush) + { +wl_surface_commit(window->surface); +ecore_wl2_display_flush(window->display); + } } EAPI Eina_Bool diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index b0249961ca..4f1823ec1f 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -547,6 +547,7 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_ end: glsym_evas_gl_preload_render_unlock(eng_preload_make_current, ob); + ecore_wl2_display_flush(ob->wl2_disp); } Evas_Engine_GL_Context * --
[EGIT] [core/enlightenment] enlightenment-0.21 17/50: Remove ecore_drm support
discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7f89c3a4e88a1699a04519780bf9e406166726e1 commit 7f89c3a4e88a1699a04519780bf9e406166726e1 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 9 10:49:24 2017 -0500 Remove ecore_drm support ecore_drm2 supersedes this, ecore_drm is deprecated, and we depend on an efl version newer than the deprecation, so none of this code should ever be built. --- src/bin/e_alert_main.c | 154 - 1 file changed, 154 deletions(-) diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index a2762c1cb..694142a4f 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -376,7 +376,6 @@ _e_alert_drm_run(void) ecore_main_loop_begin(); } -# ifdef HAVE_DRM2 static Ecore_Drm2_Device *dev = NULL; static Ecore_Drm2_Fb *buffer = NULL; static Ecore_Drm2_Output *output = NULL; @@ -524,159 +523,6 @@ _e_alert_drm_shutdown(void) evas_shutdown(); } -# else -static Ecore_Drm_Device *dev = NULL; -static Ecore_Drm_Fb *buffer; - -static int -_e_alert_drm_connect(void) -{ - fprintf(stderr, "E_Alert Drm Connect\n"); - - if (!evas_init()) - { -printf("\tCannot init evas\n"); -return 0; - } - - if (!ecore_drm_init()) - { -printf("\tCannot init ecore_drm\n"); -return 0; - } - - dev = ecore_drm_device_find(NULL, NULL); - if (!dev) - { -printf("\tCannot find drm device\n"); -return 0; - } - - if (!ecore_drm_launcher_connect(dev)) - { -printf("\tCannot connect to drm device\n"); -return 0; - } - - if (!ecore_drm_device_open(dev)) - { -printf("\tCannot open drm device\n"); -return 0; - } - - if (!ecore_drm_outputs_create(dev)) - { -printf("\tCannot create drm outputs\n"); -return 0; - } - - if (!ecore_drm_inputs_create(dev)) - { -printf("\tCannot create drm inputs\n"); -return 0; - } - - ecore_drm_outputs_geometry_get(dev, NULL, NULL, , ); - fprintf(stderr, "\tOutput Size: %d %d\n", sw, sh); - - ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, - _e_alert_drm_cb_key_down, NULL); - - return 1; -} - -static void -_e_alert_drm_create(void) -{ - int method = 0; - - fprintf(stderr, "E_Alert Drm Create\n"); - - fh = 13; - - if (!ecore_drm_device_software_setup(dev)) - { -printf("\tFailed to setup software mode\n"); -return; - } - - buffer = ecore_drm_fb_create(dev, sw, sh); - memset(buffer->mmap, 0, buffer->size); - - method = evas_render_method_lookup("buffer"); - if (method <= 0) - { -fprintf(stderr, "\tCould not get evas render method\n"); -return; - } - - canvas = evas_new(); - if (!canvas) - { -fprintf(stderr, "\tFailed to create new canvas\n"); -return; - } - - evas_output_method_set(canvas, method); - evas_output_size_set(canvas, sw, sh); - evas_output_viewport_set(canvas, 0, 0, sw, sh); - - Evas_Engine_Info_Buffer *einfo; - einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); - if (!einfo) - { -printf("\tFailed to get evas engine info\n"); -evas_free(canvas); -return; - } - - einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; - einfo->info.dest_buffer = buffer->mmap; - einfo->info.dest_buffer_row_bytes = (sw * sizeof(int)); - einfo->info.use_color_key = 0; - einfo->info.alpha_threshold = 0; - einfo->info.func.new_update_region = NULL; - einfo->info.func.free_update_region = NULL; - evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); - - _e_alert_drm_draw_outline(); - _e_alert_drm_draw_title_outline(); - _e_alert_drm_draw_title(); - _e_alert_drm_draw_text(); - _e_alert_drm_draw_button_outlines(); -} - -static void -_e_alert_drm_display(void) -{ - Eina_List *updates; - - printf("E_Alert Drm Display\n"); - - updates = evas_render_updates(canvas); - evas_render_updates_free(updates); - - ecore_drm_fb_send(dev, buffer, NULL, NULL); -} - -static void -_e_alert_drm_shutdown(void) -{ - printf("E_Alert Drm Shutdown\n"); - - evas_free(canvas); - - if (dev) - { -ecore_drm_device_close(dev); -ecore_drm_launcher_disconnect(dev); -ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); - evas_shutdown(); -} -# endif #endif int --
[EGIT] [core/efl] master 13/15: ecore_wl2: Refactor out code to send window configure complete event
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9df39b56163ab299153a987f1525ceb174b16273 commit 9df39b56163ab299153a987f1525ceb174b16273 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:42:41 2017 -0500 ecore_wl2: Refactor out code to send window configure complete event --- src/lib/ecore_wl2/ecore_wl2_window.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index b0be628334..ee063dfee2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -79,14 +79,10 @@ _ecore_wl2_window_deactivate_send(Ecore_Wl2_Window *window) } static void -_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial) +_configure_complete(Ecore_Wl2_Window *window) { - Ecore_Wl2_Window *window; Ecore_Wl2_Event_Window_Configure_Complete *ev; - window = data; - window->configure_serial = serial; - if (!window->pending.configure) return; window->pending.configure = EINA_FALSE; ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete)); @@ -94,6 +90,19 @@ _zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA ev->win = window->id; ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL); + +} + +static void +_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial) +{ + Ecore_Wl2_Window *window; + + window = data; + window->configure_serial = serial; + if (!window->pending.configure) return; + + _configure_complete(window); } static const struct zxdg_surface_v6_listener _zxdg_surface_listener = --
[EGIT] [core/efl] master 10/15: wayland_shm: Don't attach null buffers from surface_post
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5f0fa084673d1e531ff17d1af96e62203ed65c2c commit 5f0fa084673d1e531ff17d1af96e62203ed65c2c Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:12:19 2017 -0500 wayland_shm: Don't attach null buffers from surface_post This is protected against elsewhere. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 2 -- src/modules/evas/engines/wayland_shm/evas_shm.c| 2 -- 2 files changed, 4 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 24063eafd0..aa6ff2e5b4 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -703,8 +703,6 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, _evas_surface_damage(wls, surface->compositor_version, b->w, b->h, rects, count); } - else - wl_surface_attach(wls, NULL, 0, 0); ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); } diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index 90f1eb2b8c..feeb4bf12c 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -555,8 +555,6 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei _evas_surface_damage(wls, surf->compositor_version, leaf->w, leaf->h, rects, count); } - else - wl_surface_attach(wls, NULL, 0, 0); ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); --
[EGIT] [core/efl] master 05/15: ecore_wl2: Add new APIs ecore_wl2_window_frame_callback_add/del()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8f038b25914b9df738809a4150cf3aa5c6d0798e commit 8f038b25914b9df738809a4150cf3aa5c6d0798e Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 17:46:49 2017 -0500 ecore_wl2: Add new APIs ecore_wl2_window_frame_callback_add/del() Abstract frame callbacks through ecore_wl2_window so we can add them in multiple places without having the wayland compositor generate more than one. Also allows us to keep a callback registered over hide/unhide of a window easily. --- src/lib/ecore_wl2/Ecore_Wl2.h | 23 +++ src/lib/ecore_wl2/ecore_wl2_private.h | 8 ++ src/lib/ecore_wl2/ecore_wl2_window.c | 53 +++ 3 files changed, 84 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index dad9652709..21b623e24a 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -361,6 +361,8 @@ typedef struct Ecore_Wl2_Event_Aux_Message typedef void (*Ecore_Wl2_Bind_Cb)(struct wl_client *client, void *data, uint32_t version, uint32_t id); typedef void (*Ecore_Wl2_Unbind_Cb)(struct wl_resource *resource); +typedef void (*Ecore_Wl2_Frame_Cb)(Ecore_Wl2_Window *win, uint32_t timestamp, void *data); +typedef struct _Ecore_Wl2_Frame_Cb_Handle Ecore_Wl2_Frame_Cb_Handle; EAPI extern int ECORE_WL2_EVENT_DISCONNECT; /** @since 1.18 */ EAPI extern int ECORE_WL2_EVENT_CONNECT; /** @since 1.18 */ @@ -1902,6 +1904,27 @@ EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); */ EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); +/** + * Add a callback that fires when the window's surface_frame callback fires + * + * @window the window to add a callback on + * @cb The callback + * @data user data to provide to the callback handler + * + * @since 1.20 + */ +EAPI Ecore_Wl2_Frame_Cb_Handle *ecore_wl2_window_frame_callback_add(Ecore_Wl2_Window *window, Ecore_Wl2_Frame_Cb cb, void *data); + +/** + * delete a callback that fires when the window's surface_frame callback fires + * + * @window the window to add a callback on + * @cb The callback handle + * + * @since 1.20 + */ +EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle); + # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 4ee29752e6..240e9062ad 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -140,6 +140,13 @@ struct _Ecore_Wl2_Aux_Hint const char *hint, *val; }; +struct _Ecore_Wl2_Frame_Cb_Handle +{ + Ecore_Wl2_Window *win; + Ecore_Wl2_Frame_Cb cb; + void *data; +}; + struct _Ecore_Wl2_Window { EINA_INLIST; @@ -184,6 +191,7 @@ struct _Ecore_Wl2_Window Eina_Inlist *subsurfs; Eina_List *supported_aux_hints; + Eina_List *frame_callbacks; Eina_Bool moving : 1; Eina_Bool minimized : 1; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 23eaafc960..c6d0ed4709 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -538,6 +538,12 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window) window->commit_pending = EINA_FALSE; } + if (window->callback) + { +wl_callback_destroy(window->callback); +window->callback = NULL; + } + window->configure_serial = 0; window->zxdg_configure_ack = NULL; window->zxdg_set_min_size = NULL; @@ -573,6 +579,9 @@ ecore_wl2_window_free(Ecore_Wl2_Window *window) _ecore_wl2_window_aux_hint_free(window); + if (window->callback) wl_callback_destroy(window->callback); + window->callback = NULL; + if (window->uuid && window->surface && window->display->wl.session_recovery) zwp_e_session_recovery_destroy_uuid(window->display->wl.session_recovery, window->surface, window->uuid); @@ -1344,6 +1353,26 @@ ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_toplevel, w, h, aspect); } +static void +_frame_cb(void *data, struct wl_callback *callback, uint32_t timestamp) +{ + Ecore_Wl2_Frame_Cb_Handle *cb; + Ecore_Wl2_Window *window; + Eina_List *l, *ll; + + window = data; + window->commit_pending = EINA_FALSE; + wl_callback_destroy(callback); + window->callback = NULL; + EINA_LIST_FOREACH_SAFE(window->frame_callbacks, l, ll, cb) + cb->cb(window, timestamp, cb->data); +} + +static struct wl_callback_listener _frame_listener = +{ + _frame_cb +}; + EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) { EINA_SAFETY_ON_NULL_RETURN(window); @@ -13
[EGIT] [core/efl] master 03/15: ecore_wl2: Add API ecore_wl2_window_commit()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=11d3bf7939fa2f2934efd0cf73172a3c6075f3af commit 11d3bf7939fa2f2934efd0cf73172a3c6075f3af Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 17:44:13 2017 -0500 ecore_wl2: Add API ecore_wl2_window_commit() Abstract wl_surface commits in ecore_wl2_window. --- src/lib/ecore_wl2/Ecore_Wl2.h | 18 ++ src/lib/ecore_wl2/ecore_wl2_private.h | 3 +++ src/lib/ecore_wl2/ecore_wl2_window.c | 15 +++ 3 files changed, 36 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 06e5c84ac7..1a558a2bdb 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1873,6 +1873,24 @@ EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer); */ EAPI void ecore_wl2_session_recovery_disable(void); +/** + * Commit the surface of a wayland window. + * + * If flush is set this generates a wl_surface_commit(), otherwise it is + * expected that some other call in the very near future (such as + * eglSwapBuffers) will cause an implicit flush. + * + * A surface that has been commit will be in the "pending" state until + * the compositor tells us it's time to draw again via a frame callback. + * + * @surface surface to commit + * @flush EINA_TRUE if we need to flush immediately. + * + * @since 1.20 + */ +EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); + +/** # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 431d40880e..4ee29752e6 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -155,6 +155,7 @@ struct _Ecore_Wl2_Window const char *role; struct wl_surface *surface; + struct wl_callback *callback; struct www_surface *www_surface; struct zxdg_surface_v6 *zxdg_surface; struct zxdg_toplevel_v6 *zxdg_toplevel; @@ -199,6 +200,8 @@ struct _Ecore_Wl2_Window Eina_Bool focus_skip : 1; Eina_Bool floating : 1; + Eina_Bool commit_pending : 1; + struct { Eina_Bool configure : 1; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 6ee7af6af8..422b330443 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -535,6 +535,7 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window) { wl_surface_attach(window->surface, NULL, 0, 0); wl_surface_commit(window->surface); +window->commit_pending = EINA_FALSE; } window->configure_serial = 0; @@ -1342,3 +1343,17 @@ ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int if (window->display->wl.efl_hints && window->zxdg_toplevel) efl_hints_set_aspect(window->display->wl.efl_hints, window->zxdg_toplevel, w, h, aspect); } + +EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + EINA_SAFETY_ON_NULL_RETURN(window->surface); + + if (window->commit_pending) ERR("Commit before previous commit processed"); + + window->commit_pending = EINA_TRUE; + window->callback = wl_surface_frame(window->surface); + wl_callback_add_listener(window->callback, &_frame_listener, window); + + if (flush) wl_surface_commit(window->surface); +} --
[EGIT] [core/efl] master 09/15: ecore_wl2: Add ecore_wl2_window_buffer_attach API
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=51768ff62bad8ff6de6f941943d953a516e86f8e commit 51768ff62bad8ff6de6f941943d953a516e86f8e Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:10:59 2017 -0500 ecore_wl2: Add ecore_wl2_window_buffer_attach API Let ecore_wl2 track some buffer related state so we can more easily sync things between ecore_evas and the evas_engines. --- src/lib/ecore_wl2/Ecore_Wl2.h | 18 ++ src/lib/ecore_wl2/ecore_wl2_private.h | 2 ++ src/lib/ecore_wl2/ecore_wl2_window.c | 12 3 files changed, 32 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 21b623e24a..e09c42e9ce 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1925,6 +1925,24 @@ EAPI Ecore_Wl2_Frame_Cb_Handle *ecore_wl2_window_frame_callback_add(Ecore_Wl2_Wi */ EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle); +/** + * Attach a buffer to a window + * + * Note that the GL stack my attach buffers to a surface - we should call this + * function at that time (with a NULL buffer) to track whether a surface + * has a valid buffer. That is, call with implicit true and buffer NULL at + * the time of glSwapBuffers. + * + * @window the target window + * @buffer the buffer to attach + * @x x offset from corner + * @y y offset from corner + * @implicit true if an external library is doing the actual attaching + * + * @since 1.20 + */ +EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, struct wl_buffer *buffer, int x, int y, Eina_Bool implicit); + # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 240e9062ad..85661ecba3 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -162,6 +162,7 @@ struct _Ecore_Wl2_Window const char *role; struct wl_surface *surface; + struct wl_buffer *buffer; struct wl_callback *callback; struct www_surface *www_surface; struct zxdg_surface_v6 *zxdg_surface; @@ -225,6 +226,7 @@ struct _Ecore_Wl2_Window int *available_rots; unsigned int count; } wm_rot; + Eina_Bool has_buffer : 1; }; struct _Ecore_Wl2_Output diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index c6d0ed4709..b0be628334 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1417,3 +1417,15 @@ EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle) handle->win->frame_callbacks = eina_list_remove(handle->win->frame_callbacks, handle); free(handle); } + +EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, struct wl_buffer *buffer, int x, int y, Eina_Bool implicit) +{ + EINA_SAFETY_ON_NULL_RETURN(win); + EINA_SAFETY_ON_NULL_RETURN(win->surface); + + /* FIXME: Haven't given any thought to x and y since we always use 0... */ + if (!implicit) wl_surface_attach(win->surface, buffer, x, y); + win->buffer = buffer; + if (!implicit && !buffer) win->has_buffer = EINA_FALSE; + else win->has_buffer = EINA_TRUE; +} --
[EGIT] [core/efl] master 11/15: wayland_shm: Use ecore_wl2_window_buffer_attach
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3290e6da1026f87e71508d57ffca697c1e8df02f commit 3290e6da1026f87e71508d57ffca697c1e8df02f Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:12:57 2017 -0500 wayland_shm: Use ecore_wl2_window_buffer_attach No longer calling wl_surface_attach directly. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 12 src/modules/evas/engines/wayland_shm/evas_shm.c| 6 -- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index aa6ff2e5b4..ce408210c1 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -479,6 +479,7 @@ _create_succeeded(void *data, struct zwp_linux_buffer_params_v1 *params, struct wl_buffer *new_buffer) { + Ecore_Wl2_Window *win; struct wl_surface *wls; Dmabuf_Buffer *b = data; @@ -500,8 +501,9 @@ _create_succeeded(void *data, if (b != b->surface->pre) return; /* This buffer was drawn into before it had a handle */ - wls = ecore_wl2_window_surface_get(b->surface->surface->info->info.wl2_win); - wl_surface_attach(wls, b->wl_buffer, 0, 0); + win = b->surface->surface->info->info.wl2_win; + wls = ecore_wl2_window_surface_get(win); + ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE); _evas_surface_damage(wls, b->surface->compositor_version, b->w, b->h, NULL, 0); ecore_wl2_window_commit(b->surface->surface->info->info.wl2_win, EINA_TRUE); @@ -672,6 +674,7 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, struct wl_surface *wls; Dmabuf_Surface *surface; Dmabuf_Buffer *b; + Ecore_Wl2_Window *win; surface = s->surf.dmabuf; b = surface->current; @@ -696,10 +699,11 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, } surface->pre = NULL; - wls = ecore_wl2_window_surface_get(s->info->info.wl2_win); + win = s->info->info.wl2_win; + wls = ecore_wl2_window_surface_get(win); if (!hidden) { -wl_surface_attach(wls, b->wl_buffer, 0, 0); +ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE); _evas_surface_damage(wls, surface->compositor_version, b->w, b->h, rects, count); } diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index feeb4bf12c..e7acd146fc 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -536,6 +536,7 @@ _evas_shm_surface_data_get(Surface *s, int *w, int *h) void _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) { + Ecore_Wl2_Window *win; struct wl_surface *wls; Shm_Surface *surf; Shm_Leaf *leaf; @@ -546,11 +547,12 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei leaf = surf->current; if (!leaf) return; - wls = ecore_wl2_window_surface_get(s->info->info.wl2_win); + win = s->info->info.wl2_win; + wls = ecore_wl2_window_surface_get(win); if (!hidden) { -wl_surface_attach(wls, leaf->data->buffer, 0, 0); +ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE); _evas_surface_damage(wls, surf->compositor_version, leaf->w, leaf->h, rects, count); --
[EGIT] [core/efl] master 01/15: wayland: Make the wayland evas engines dependent on ecore_wl2
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccc4ffc80d0ca401dd58fc4fc573ab110f5cbd8e commit ccc4ffc80d0ca401dd58fc4fc573ab110f5cbd8e Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 16:27:24 2017 -0500 wayland: Make the wayland evas engines dependent on ecore_wl2 Seems like the best place to put some common code. --- src/Makefile_Evas.am | 4 src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 37e1167829..adac717ab6 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -1239,9 +1239,11 @@ modules_evas_engines_wayland_egl_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/ -I$(top_srcdir)/src/modules/evas/engines/wayland_egl \ -I$(top_srcdir)/src/modules/evas/engines/wayland_common \ @EVAS_CFLAGS@ \ +@ECORE_WL2_CFLAGS@ \ @evas_engine_wayland_egl_cflags@ modules_evas_engines_wayland_egl_module_la_LIBADD = \ @USE_EVAS_LIBS@ \ +@USE_ECORE_WL2_LIBS@ \ @evas_engine_wayland_egl_libs@ modules_evas_engines_wayland_egl_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@ modules_evas_engines_wayland_egl_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ @@ -1294,9 +1296,11 @@ modules_evas_engines_wayland_shm_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/ -I$(top_srcdir)/src/static_libs/libdrm \ -I$(top_srcdir)/src/modules/evas/engines/wayland_common \ @EVAS_CFLAGS@ \ +@ECORE_WL2_CFLAGS@ \ @evas_engine_wayland_shm_cflags@ modules_evas_engines_wayland_shm_module_la_LIBADD = \ @USE_EVAS_LIBS@ \ +@USE_ECORE_WL2_LIBS@ \ @evas_engine_wayland_shm_libs@ modules_evas_engines_wayland_shm_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@ modules_evas_engines_wayland_shm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h index 0722339a0a..4a3ca6b690 100644 --- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h +++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h @@ -1,6 +1,8 @@ #ifndef _EVAS_ENGINE_WAYLAND_COMMON_H # define _EVAS_ENGINE_WAYLAND_COMMON_H +#include "Ecore_Wl2.h" + typedef struct _Evas_Engine_Info_Wayland Evas_Engine_Info_Wayland; struct _Evas_Engine_Info_Wayland --
[EGIT] [core/efl] master 04/15: ecore_wl2: Add API ecore_wl2_window_pending_get()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b599b1b90006f74979ae3c8527ed2c91082ef3be commit b599b1b90006f74979ae3c8527ed2c91082ef3be Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 17:45:41 2017 -0500 ecore_wl2: Add API ecore_wl2_window_pending_get() Lets us test if a commit has been requested but the compositor hasn't yet told use to draw new content for it. --- src/lib/ecore_wl2/Ecore_Wl2.h| 11 +++ src/lib/ecore_wl2/ecore_wl2_window.c | 7 +++ 2 files changed, 18 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 1a558a2bdb..dad9652709 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1891,6 +1891,17 @@ EAPI void ecore_wl2_session_recovery_disable(void); EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); /** + * Check if a wayland window's surface is in the pending state. + * + * A surface is pending if it's been commit but we haven't received a + * frame callback for it yet. This mean's we're not ready to draw yet. + * + * @return whether the window's surface is pending or not. + * + * @since 1.20 + */ +EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); + # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 422b330443..23eaafc960 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1357,3 +1357,10 @@ EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) if (flush) wl_surface_commit(window->surface); } + +EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); + + return window->commit_pending; +} --
[EGIT] [core/efl] master 15/15: wayland: Tick like a boss
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8c917daa069f0c646d4f9a92cb372f3da5ecfb16 commit 8c917daa069f0c646d4f9a92cb372f3da5ecfb16 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 18 14:13:11 2017 -0500 wayland: Tick like a boss Instead of the clever but awful manual_render_set hack, actually do ticks based on frame callbacks. Fix T5850 --- .../engines/wayland/ecore_evas_wayland_common.c| 97 ++ .../engines/wayland/ecore_evas_wayland_private.h | 3 +- 2 files changed, 64 insertions(+), 36 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 4fac885900..fe45f8a0d4 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -35,6 +35,58 @@ static void _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int /* local functions */ static void +_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data) +{ + Ecore_Evas *ee = data; + Ecore_Evas_Engine_Wl_Data *edata; + + edata = ee->engine.data; + + if (!edata->ticking) return; + + ecore_evas_animator_tick(ee, NULL, ecore_loop_time_get()); +} + +static void +_ecore_evas_wl_common_animator_register(Ecore_Evas *ee) +{ + Ecore_Evas_Engine_Wl_Data *edata; + + edata = (Ecore_Evas_Engine_Wl_Data *)ee->engine.data; + + EINA_SAFETY_ON_TRUE_RETURN(edata->ticking); + + edata->frame = ecore_wl2_window_frame_callback_add(edata->win, + _anim_cb_tick, ee); + if (!ecore_wl2_window_pending_get(edata->win) && !ee->in_async_render) + ecore_wl2_window_commit(edata->win, EINA_TRUE); + edata->ticking = EINA_TRUE; +} + +static void +_ecore_evas_wl_common_animator_unregister(Ecore_Evas *ee) +{ + Ecore_Evas_Engine_Wl_Data *edata; + + edata = ee->engine.data; + edata->ticking = EINA_FALSE; + ecore_wl2_window_frame_callback_del(edata->frame); + edata->frame = NULL; +} + +static void +_ecore_evas_wl_common_evas_changed(Ecore_Evas *ee, Eina_Bool changed) +{ + Ecore_Evas_Engine_Wl_Data *edata; + + if (changed) return; + + edata = (Ecore_Evas_Engine_Wl_Data *)ee->engine.data; + if (edata->ticking && !ecore_wl2_window_pending_get(edata->win)) + ecore_wl2_window_commit(edata->win, EINA_TRUE); +} + +static void _ecore_evas_wl_common_state_update(Ecore_Evas *ee) { if (ee->func.fn_state_change) ee->func.fn_state_change(ee); @@ -158,8 +210,6 @@ _ecore_evas_wl_common_cb_disconnect(void *data EINA_UNUSED, int type EINA_UNUSED Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data; if (wdata->display != ev->display) continue; -if (wdata->anim_callback) wl_callback_destroy(wdata->anim_callback); -wdata->anim_callback = NULL; wdata->sync_done = EINA_FALSE; wdata->defer_show = EINA_TRUE; ee->visible = EINA_FALSE; @@ -475,7 +525,6 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_ wdata->win->zxdg_configure_ack(wdata->win->zxdg_surface, wdata->win->configure_serial); wdata->win->configure_serial = 0; - ecore_wl2_window_commit(wdata->win, EINA_TRUE); } return ECORE_CALLBACK_RENEW; } @@ -553,6 +602,8 @@ _ecore_evas_wl_common_cb_window_configure_complete(void *data EINA_UNUSED, int t if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) ERR("Failed to set Evas Engine Info for '%s'", ee->driver); + ecore_evas_manual_render_set(ee, 0); + return ECORE_CALLBACK_PASS_ON; } @@ -1210,7 +1261,8 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee) ee_list = eina_list_remove(ee_list, ee); eina_list_free(wdata->regen_objs); - if (wdata->anim_callback) wl_callback_destroy(wdata->anim_callback); + if (wdata->frame) ecore_wl2_window_frame_callback_del(wdata->frame); + wdata->frame = NULL; ecore_event_handler_del(wdata->sync_handler); if (wdata->win) ecore_wl2_window_free(wdata->win); ecore_wl2_display_disconnect(wdata->display); @@ -1635,46 +1687,21 @@ _ecore_evas_wl_common_ignore_events_set(Ecore_Evas *ee, int ignore) } static void -_anim_cb_animate(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED) -{ - Ecore_Evas *ee = data; - Ecore_Evas_Engine_Wl_Data *wdata; - - wdata = ee->engine.data; - wl_callback_destroy(callback); - wdata->anim_callback = NULL; - ecore_evas_manual_render_set(ee, 0); -} - -static const struct wl_callback
[EGIT] [core/efl] master 14/15: ecore_wl2: Send configure complete when windows don't need configure
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=913e216ea348920b4e3fc75eacbac9835e8718c8 commit 913e216ea348920b4e3fc75eacbac9835e8718c8 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:43:50 2017 -0500 ecore_wl2: Send configure complete when windows don't need configure The intent of the "configure complete" event is to indicate that the window is configured and ready to receive buffers. For "windows" like mouse cursors, that's immediate - let them know. --- src/lib/ecore_wl2/ecore_wl2_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index ee063dfee2..c9e77daa53 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -524,7 +524,7 @@ ecore_wl2_window_show(Ecore_Wl2_Window *window) _ecore_wl2_window_show_send(window); } else - window->pending.configure = EINA_FALSE; + _configure_complete(window); } EAPI void --
[EGIT] [core/efl] master 07/15: wayland: Switch to ecore_wl2_window_commit()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a8c44938f33c54e6efab6a45b536d82ef72b0702 commit a8c44938f33c54e6efab6a45b536d82ef72b0702 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 18:48:58 2017 -0500 wayland: Switch to ecore_wl2_window_commit() Use ecore_wl2_window_commit() instead of directly calling wl_surface_commit --- src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 2 +- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 4 ++-- src/modules/evas/engines/wayland_shm/evas_shm.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 51a55e417b..4fac885900 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -475,7 +475,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_ wdata->win->zxdg_configure_ack(wdata->win->zxdg_surface, wdata->win->configure_serial); wdata->win->configure_serial = 0; - wl_surface_commit(wdata->win->surface); + ecore_wl2_window_commit(wdata->win, EINA_TRUE); } return ECORE_CALLBACK_RENEW; } diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 40867d3a96..24063eafd0 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -504,7 +504,7 @@ _create_succeeded(void *data, wl_surface_attach(wls, b->wl_buffer, 0, 0); _evas_surface_damage(wls, b->surface->compositor_version, b->w, b->h, NULL, 0); - wl_surface_commit(wls); + ecore_wl2_window_commit(b->surface->surface->info->info.wl2_win, EINA_TRUE); b->surface->pre = NULL; b->busy = EINA_FALSE; } @@ -706,7 +706,7 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, else wl_surface_attach(wls, NULL, 0, 0); - wl_surface_commit(wls); + ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); } static Dmabuf_Buffer * diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index 2edb9ee985..90f1eb2b8c 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -558,7 +558,7 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei else wl_surface_attach(wls, NULL, 0, 0); - wl_surface_commit(wls); + ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); leaf->busy = EINA_TRUE; leaf->drawn = EINA_TRUE; --
[EGIT] [core/efl] master 06/15: wayland_shm: Remove direct access to wl_surface
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=972633e7e8bf59d3df4f4c810e7403a05b9f5174 commit 972633e7e8bf59d3df4f4c810e7403a05b9f5174 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 18:21:22 2017 -0500 wayland_shm: Remove direct access to wl_surface Querying it through Ecore_Wl2_Window now --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 25 +++--- src/modules/evas/engines/wayland_shm/evas_engine.c | 8 +++ src/modules/evas/engines/wayland_shm/evas_engine.h | 4 ++-- src/modules/evas/engines/wayland_shm/evas_outbuf.c | 4 ++-- src/modules/evas/engines/wayland_shm/evas_shm.c| 18 +++- 5 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 2bc5e7ba4a..40867d3a96 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -72,7 +72,6 @@ struct _Dmabuf_Surface Surface *surface; struct wl_display *wl_display; struct zwp_linux_dmabuf_v1 *dmabuf; - struct wl_surface *wl_surface; int compositor_version; Dmabuf_Buffer *current; @@ -480,6 +479,7 @@ _create_succeeded(void *data, struct zwp_linux_buffer_params_v1 *params, struct wl_buffer *new_buffer) { + struct wl_surface *wls; Dmabuf_Buffer *b = data; b->wl_buffer = new_buffer; @@ -500,10 +500,11 @@ _create_succeeded(void *data, if (b != b->surface->pre) return; /* This buffer was drawn into before it had a handle */ - wl_surface_attach(b->surface->wl_surface, b->wl_buffer, 0, 0); - _evas_surface_damage(b->surface->wl_surface, b->surface->compositor_version, + wls = ecore_wl2_window_surface_get(b->surface->surface->info->info.wl2_win); + wl_surface_attach(wls, b->wl_buffer, 0, 0); + _evas_surface_damage(wls, b->surface->compositor_version, b->w, b->h, NULL, 0); - wl_surface_commit(b->surface->wl_surface); + wl_surface_commit(wls); b->surface->pre = NULL; b->busy = EINA_FALSE; } @@ -668,6 +669,7 @@ _evas_dmabuf_surface_assign(Surface *s) static void _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) { + struct wl_surface *wls; Dmabuf_Surface *surface; Dmabuf_Buffer *b; @@ -694,16 +696,17 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, } surface->pre = NULL; + wls = ecore_wl2_window_surface_get(s->info->info.wl2_win); if (!hidden) { -wl_surface_attach(surface->wl_surface, b->wl_buffer, 0, 0); -_evas_surface_damage(surface->wl_surface, surface->compositor_version, +wl_surface_attach(wls, b->wl_buffer, 0, 0); +_evas_surface_damage(wls, surface->compositor_version, b->w, b->h, rects, count); } else - wl_surface_attach(surface->wl_surface, NULL, 0, 0); + wl_surface_attach(wls, NULL, 0, 0); - wl_surface_commit(surface->wl_surface); + wl_surface_commit(wls); } static Dmabuf_Buffer * @@ -758,17 +761,16 @@ _evas_dmabuf_surface_destroy(Surface *s) } Eina_Bool -_evas_dmabuf_surface_surface_set(Surface *s, struct wl_shm *wl_shm EINA_UNUSED, struct zwp_linux_dmabuf_v1 *wl_dmabuf, struct wl_surface *wl_surface) +_evas_dmabuf_surface_surface_set(Surface *s, struct wl_shm *wl_shm EINA_UNUSED, struct zwp_linux_dmabuf_v1 *wl_dmabuf) { Dmabuf_Surface *surf; surf = s->surf.dmabuf; - if ((surf->dmabuf == wl_dmabuf) && (surf->wl_surface == wl_surface)) + if ((surf->dmabuf == wl_dmabuf)) return EINA_FALSE; surf->dmabuf = wl_dmabuf; - surf->wl_surface = wl_surface; return EINA_TRUE; } @@ -788,7 +790,6 @@ _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff) surf->surface = s; surf->wl_display = s->info->info.wl_display; surf->dmabuf = s->info->info.wl_dmabuf; - surf->wl_surface = ecore_wl2_window_surface_get(s->info->info.wl2_win); surf->alpha = s->info->info.destination_alpha; surf->compositor_version = s->info->info.compositor_version; diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index 14c1ede348..fbcab307ec 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -175,12 +175,10 @@ eng_update(void *engine, void *data, void *info, unsigned int w, unsigned int h) { Evas_Engine_Info_Wayland *einfo = info; Render_Engine *re = data; - struct wl_surface *surf; - surf = ecore_wl2_window_surface_g
[EGIT] [core/efl] master 02/15: wayland: Put Ecore_Wl2_Win instead of wl_surface into the engines
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e3b9fbaed8e5e5f3730d3a8aa406873f8df60744 commit e3b9fbaed8e5e5f3730d3a8aa406873f8df60744 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 17:07:31 2017 -0500 wayland: Put Ecore_Wl2_Win instead of wl_surface into the engines We'll need to track some state in a common way, so attaching it to the window seems like a good idea. --- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 10 +- .../evas/engines/wayland_common/Evas_Engine_Wayland.h| 2 +- src/modules/evas/engines/wayland_egl/evas_engine.c | 12 src/modules/evas/engines/wayland_egl/evas_engine.h | 2 +- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 9 ++--- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 2 +- src/modules/evas/engines/wayland_shm/evas_engine.c | 6 -- src/modules/evas/engines/wayland_shm/evas_outbuf.c | 5 - src/modules/evas/engines/wayland_shm/evas_shm.c | 2 +- 9 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index ad307edd51..51a55e417b 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -136,7 +136,7 @@ _ee_display_unset(Ecore_Evas *ee) if (!einfo) return; einfo->info.wl_display = NULL; - einfo->info.wl_surface = NULL; + einfo->info.wl2_win = NULL; wdata = ee->engine.data; if (!strcmp(ee->driver, "wayland_egl")) @@ -1663,7 +1663,7 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_ einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(evas); if (!einfo) return; - surf = einfo->info.wl_surface; + surf = ecore_wl2_window_surface_get(einfo->info.wl2_win); if (!surf) return; wdata = ee->engine.data; @@ -2018,7 +2018,7 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee) einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas); if (einfo) { - einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win); + einfo->info.wl2_win = wdata->win; einfo->info.hidden = wdata->win->pending.configure; //EINA_FALSE; einfo->www_avail = !!wdata->win->www_surface; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) @@ -2147,7 +2147,7 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) ecore_wl2_display_compositor_version_get(wdata->display); einfo->info.destination_alpha = EINA_TRUE; einfo->info.rotation = ee->rotation; -einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win); +einfo->info.wl2_win = wdata->win; if (wdata->reset_pending) { @@ -2447,7 +2447,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i einfo->info.destination_alpha = EINA_TRUE; einfo->info.rotation = ee->rotation; einfo->info.depth = 32; - einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win); + einfo->info.wl2_win = wdata->win; einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(ewd); einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd); einfo->info.compositor_version = diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h index 4a3ca6b690..7be7e2e9c9 100644 --- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h +++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h @@ -18,7 +18,7 @@ struct _Evas_Engine_Info_Wayland struct wl_shm *wl_shm; struct zwp_linux_dmabuf_v1 *wl_dmabuf; struct wl_display *wl_display; -struct wl_surface *wl_surface; +Ecore_Wl2_Window *wl2_win; int depth, rotation, edges; int compositor_version; Eina_Bool destination_alpha : 1; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 02766aaf1d..1e329836d4 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -279,11 +279,13 @@ evgl_eng_native_window_create(void *data) Render_Engine *re; Outbuf *ob; struct wl_egl_window *win; + struct wl_surface *wls; if (!(re = (Render_Engine *)data)) return NULL; if (!(ob = eng_get_ob(re))) return NULL; - if (!(win
[EGIT] [core/efl] master 08/15: wayland_egl: Add ecore_wl2_window_commit
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=90a032587a73545265a5790e3e72f0712e741978 commit 90a032587a73545265a5790e3e72f0712e741978 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 18:50:15 2017 -0500 wayland_egl: Add ecore_wl2_window_commit Use ecore_wl2_window_commmit() in addition to eglSwapBuffers in order to set up a frame callback and handle pending update tracking. --- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 9cfd52bba2..10d47b4f1e 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -516,6 +516,8 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_ glsym_evas_gl_common_context_done(ob->gl_context); eglSwapInterval(ob->egl_disp, 0); + ecore_wl2_window_commit(ob->wl2_win, EINA_FALSE); + if ((glsym_eglSwapBuffersWithDamage) && (surface_damage) && (ob->swap_mode != MODE_FULL)) { --
[EGIT] [core/efl] master 12/15: wayland_egl: Call ecore_wl2_window_buffer_attach
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f95f17ae37fe19359c1fb1a8fc691c3c4250e660 commit f95f17ae37fe19359c1fb1a8fc691c3c4250e660 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 17 15:20:44 2017 -0500 wayland_egl: Call ecore_wl2_window_buffer_attach This lets ecore_wl2 know that there's a buffer attached - even if we don't know what it is because it's hidden by gl. --- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 10d47b4f1e..435b5b2e32 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -516,6 +516,7 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_ glsym_evas_gl_common_context_done(ob->gl_context); eglSwapInterval(ob->egl_disp, 0); + ecore_wl2_window_buffer_attach(ob->wl2_win, NULL, 0, 0, EINA_TRUE); ecore_wl2_window_commit(ob->wl2_win, EINA_FALSE); if ((glsym_eglSwapBuffersWithDamage) && (surface_damage) && --
Re: [E-devel] [EGIT] [core/efl] master 01/01: efl_wl: Update to latest dmabuf protocol version
On 2017-08-14 11:05 AM, Mykyta Biliavskyi wrote: Hi Derek, On Thu, 2017-08-10 at 09:38 -0700, Derek Foreman wrote: derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=49bdba8505232371 db4609c0ad963ecb0896f275 commit 49bdba8505232371db4609c0ad963ecb0896f275 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 10 11:36:38 2017 -0500 efl_wl: Update to latest dmabuf protocol version Weston's dmabuf code continues to be modular enough that we can pull it in with little change. This updates us to version 3 of the protocol. Currently only contains stubs for format queries. after that commit I couldn't build upstream EFL. Configure flags: ./autogen.sh --prefix="/usr/" --enable-xinput22 --enable-image- loader-webp --enable-harfbuzz --enable-multisense --disable-tslib -- disable-static --enable-valgrind --enable-xine --enable-wayland -- enable-elput --enable-drm --with-opengl=es --enable-egl Build error: CC lib/efl_wl/lib_efl_wl_libefl_wl_la-efl_wl.lo CC lib/efl_wl/lib_efl_wl_libefl_wl_la-dmabuf.lo CC lib/efl_wl/lib_efl_wl_libefl_wl_la-linux-dmabuf-unstable-v1- protocol.lo lib/efl_wl/dmabuf.c: In function 'params_create_common': lib/efl_wl/dmabuf.c:313:4: error: 'ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER' undeclared (first use in this function); did you mean Ooooh, sorry! I've "fixed" this now - you're now going to get the expected configure time error that your wayland-protocols version is too old. You'll need to upgrade wayland-protocols to version 1.10. Thanks, Derek 'ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT'? ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER, ^~ ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT lib/efl_wl/dmabuf.c:313:4: note: each undeclared identifier is reported only once for each function it appears in lib/efl_wl/dmabuf.c: At top level: lib/efl_wl/dmabuf.c:350:2: warning: excess elements in struct initializer params_create_immed ^~~ lib/efl_wl/dmabuf.c:350:2: note: (near initialization for 'zwp_linux_buffer_params_implementation') lib/efl_wl/dmabuf.c: In function 'bind_linux_dmabuf': lib/efl_wl/dmabuf.c:499:16: error: 'ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION' undeclared (first use in this function); did you mean 'ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION'? if (version < ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION) ^~ ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION lib/efl_wl/dmabuf.c:523:4: warning: implicit declaration of function 'zwp_linux_dmabuf_v1_send_modifier'; did you mean 'zwp_linux_dmabuf_v1_send_format'? [-Wimplicit-function-declaration] zwp_linux_dmabuf_v1_send_modifier(resource, formats[i], ^ zwp_linux_dmabuf_v1_send_format make[4]: *** [Makefile:33685: lib/efl_wl/lib_efl_wl_libefl_wl_la- dmabuf.lo] Error 1 I am on nvidia, there output of the nvidia-smi: $ nvidia-smi Mon Aug 14 19:03:38 2017 + -+ | NVIDIA-SMI 384.59 Driver Version: 384.59| |---+--+--- ---+ | GPU NamePersistence-M| Bus-IdDisp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU- Util Compute M. | |===+==+=== ===| | 0 GeForce GT 650M Off | :01:00.0 N/A | N/A | | N/A 62CP0N/A / N/A |418MiB / 1999MiB | N/A Default | +---+--+--- ---+ Maybe you know wat is wrong. Thanks. NikaWhite. --- src/lib/efl_wl/dmabuf.c | 110 src/lib/efl_wl/dmabuf.h | 3 ++ src/lib/efl_wl/efl_wl.c | 12 ++ 3 files changed, 108 insertions(+), 17 deletions(-) diff --git a/src/lib/efl_wl/dmabuf.c b/src/lib/efl_wl/dmabuf.c index a451179d53..273d141b05 100644 --- a/src/lib/efl_wl/dmabuf.c +++ b/src/lib/efl_wl/dmabuf.c @@ -43,6 +43,8 @@ #include __attribute__ ((visibility("hidden"))) Eina_Bool comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf); +__attribute__ ((visibility("hidden"))) void comp_dmabuf_formats_query(void *c, int **formats, int *num_formats); +__attribute__ ((visibility("hidden"))) void comp_dmabuf_modifiers_query(void *c, int format, uint64_t **modifiers, int *num_modifiers); static void linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer) @@ -55,7 +57,6 @@ linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer) } buffer->attributes.n_planes = 0; - free(buffer); } @@ -123,7
[EGIT] [core/efl] master 01/01: wayland: bump wayland protocol version requirement
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=87c9b111d1bbf4988caead460710a3481911cd81 commit 87c9b111d1bbf4988caead460710a3481911cd81 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 11:23:26 2017 -0500 wayland: bump wayland protocol version requirement We need a newer version for recent dmabuf changes. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ecf877dd2d..d1945db2aa 100644 --- a/configure.ac +++ b/configure.ac @@ -1990,7 +1990,7 @@ AC_ARG_ENABLE([wayland], [want_wayland="no"]) if test "${want_wayland}" = "yes"; then - EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0 wayland-protocols >= 1.7]) + EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0 wayland-protocols >= 1.10]) PKG_CHECK_MODULES([WAYLAND], [wayland-scanner >= 1.11.0], [ AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable]) --
[EGIT] [core/enlightenment] master 01/01: Bump wayland-protocols requirement
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=55e13da6549e92f859d9807351e3ce0764f3c66f commit 55e13da6549e92f859d9807351e3ce0764f3c66f Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 11:20:19 2017 -0500 Bump wayland-protocols requirement We need a newer version for the dmabuf changes, so let's just depend on the latest released. --- configure.ac | 2 +- meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d6028d946..07021c435 100644 --- a/configure.ac +++ b/configure.ac @@ -682,7 +682,7 @@ AC_SUBST([SOUND_CFLAGS]) AC_SUBST([SOUND_LIBS]) if test "x${e_cv_want_wayland_only}" != "xno" ;then - PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 >= 1.18 wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-protocols >= 1.7 wayland-scanner >= 1.11.0 xkbcommon uuid], + PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 >= 1.18 wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-protocols >= 1.10 wayland-scanner >= 1.11.0 xkbcommon uuid], [ have_wayland=yes have_wayland_dep=true diff --git a/meson.build b/meson.build index 1617ed263..07e62da82 100644 --- a/meson.build +++ b/meson.build @@ -267,7 +267,7 @@ dep_elementary = dependency('elementary' , required: true) dep_wayland = [] if get_option('wayland') == true - wayland_protocols = dependency('wayland-protocols', version: '>= 1.7') + wayland_protocols = dependency('wayland-protocols', version: '>= 1.10') dir_wayland_protocols = wayland_protocols.get_pkgconfig_variable('pkgdatadir') wayland_version = '>= 1.11.0' dep_wayland = [ dependency('ecore-wl2'), @@ -284,7 +284,7 @@ if get_option('wayland') == true requires_drm = 'ecore-drm2' dep_wayland += dep_ecore_drm2 endif - requires_wayland = ' '.join([ 'wayland-protocols >= 1.7', + requires_wayland = ' '.join([ 'wayland-protocols >= 1.10', 'ecore-wl2', requires_drm, ' '.join(['wayland-server' , wayland_version]), --
[EGIT] [core/efl] master 02/03: ecore_evas_drm: Let ecore_drm2 track pending page flips
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e893d7de7deb54a0ef730318e3bee4cb9b754da6 commit e893d7de7deb54a0ef730318e3bee4cb9b754da6 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 11 14:51:30 2017 -0500 ecore_evas_drm: Let ecore_drm2 track pending page flips Since the engines can call the flip functions, we need to protect the ticker from missing those flips. Thus, we let ecore_drm2, which obviously sees all flips, track them. --- .../ecore_evas/engines/drm/ecore_evas_drm.c| 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index f2da72ff6f..80d78077d4 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -59,7 +59,6 @@ typedef struct _Ecore_Evas_Engine_Drm_Data Ecore_Drm2_Device *dev; Ecore_Drm2_Output *output; Evas_Device *seat; - Eina_Bool pending : 1; Eina_Bool ticking : 1; Eina_Bool once : 1; } Ecore_Evas_Engine_Drm_Data; @@ -608,8 +607,6 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se ret = ecore_drm2_fb_flip_complete(edata->output); - edata->pending = EINA_FALSE; - if (edata->ticking) { double t = (double)sec + ((double)usec / 100); @@ -618,10 +615,7 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se ecore_evas_animator_tick(ee, NULL, t - edata->offset); } else if (ret) - { -edata->pending = EINA_TRUE; -ecore_drm2_fb_flip(NULL, edata->output); - } + ecore_drm2_fb_flip(NULL, edata->output); } static void @@ -632,11 +626,8 @@ _drm_evas_changed(Ecore_Evas *ee, Eina_Bool changed) if (changed) return; edata = ee->engine.data; - if (edata->ticking && !edata->pending) - { -edata->pending = EINA_TRUE; -ecore_drm2_fb_flip(NULL, edata->output); - } + if (edata->ticking && !ecore_drm2_output_pending_get(edata->output)) + ecore_drm2_fb_flip(NULL, edata->output); } static void @@ -679,11 +670,8 @@ _drm_animator_register(Ecore_Evas *ee) } } - if (!edata->pending && !ee->in_async_render) - { -edata->pending = EINA_TRUE; -ecore_drm2_fb_flip(NULL, edata->output); - } + if (!ecore_drm2_output_pending_get(edata->output) && !ee->in_async_render) + ecore_drm2_fb_flip(NULL, edata->output); } static void --
[EGIT] [core/efl] master 01/03: ecore_drm2: Add query for pending pageflip
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eec565cc0fe9eca6aea73fc8963f0ebbb2bbc154 commit eec565cc0fe9eca6aea73fc8963f0ebbb2bbc154 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 11 14:48:41 2017 -0500 ecore_drm2: Add query for pending pageflip We've been tracking this in ecore_evas, but ecore_evas isn't the only caller, and it doesn't know about flips initiated by the evas engines. --- src/lib/ecore_drm2/Ecore_Drm2.h | 12 src/lib/ecore_drm2/ecore_drm2_outputs.c | 10 ++ 2 files changed, 22 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 031a3dac88..e1609adac2 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -1059,6 +1059,18 @@ EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int se EAPI int ecore_drm2_device_fd_get(Ecore_Drm2_Device *device); +/** + * Check if there's a pageflip in progress for an output + * + * Checks whether an output has submit a flip but not yet had + * a callback completion event for that flip yet. + * + * @param output + * @return Whether there's a flip in progress or not + * @since 1.20 + */ +EAPI Eina_Bool ecore_drm2_output_pending_get(Ecore_Drm2_Output *output); + # endif #endif diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 29e26c80bc..1f52953ffb 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1637,3 +1637,13 @@ ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, in if (x) *x = output->x; if (y) *y = output->y; } + +EAPI Eina_Bool +ecore_drm2_output_pending_get(Ecore_Drm2_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + + if (output->pending.fb) return EINA_TRUE; + + return EINA_FALSE; +} --
[EGIT] [core/efl] master 03/03: ecore_evas_drm: Tick from the animator registration callback
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cb57ea7587e7d00aa429e19996129c48619d3f11 commit cb57ea7587e7d00aa429e19996129c48619d3f11 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 11 17:02:23 2017 -0500 ecore_evas_drm: Tick from the animator registration callback If we're not ticking already when a new animator is started then we have to wait for a vblank to get a tick. That's not great. If we can, use the time of the last vblank to generate an immediate tick to avoid this latency. --- .../ecore_evas/engines/drm/ecore_evas_drm.c| 37 +- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 80d78077d4..0c95ec9ae8 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -54,6 +54,7 @@ typedef struct _Ecore_Evas_Engine_Drm_Data int depth, bpp; unsigned int format; double offset; + double tick_job_timestamp; Ecore_Drm2_Context ctx; Ecore_Fd_Handler *hdlr; Ecore_Drm2_Device *dev; @@ -61,6 +62,7 @@ typedef struct _Ecore_Evas_Engine_Drm_Data Evas_Device *seat; Eina_Bool ticking : 1; Eina_Bool once : 1; + Ecore_Job *tick_job; } Ecore_Evas_Engine_Drm_Data; static int _drm_init_count = 0; @@ -631,6 +633,18 @@ _drm_evas_changed(Ecore_Evas *ee, Eina_Bool changed) } static void +_tick_job(void *data) +{ + Ecore_Evas_Engine_Drm_Data *edata; + Ecore_Evas *ee; + + ee = data; + edata = ee->engine.data; + edata->tick_job = NULL; + ecore_evas_animator_tick(ee, NULL, edata->tick_job_timestamp); +} + +static void _drm_animator_register(Ecore_Evas *ee) { double t; @@ -642,7 +656,6 @@ _drm_animator_register(Ecore_Evas *ee) ERR("Attempt to schedule tick for manually rendered canvas"); edata = ee->engine.data; - edata->ticking = EINA_TRUE; /* Some graphics stacks appear to lie about their clock sources * so attempt to measure the difference between our clock and the @@ -670,8 +683,24 @@ _drm_animator_register(Ecore_Evas *ee) } } + if (edata->tick_job) ERR("Double animator register"); + else + if (!edata->ticking && + !(ecore_drm2_output_pending_get(edata->output) || ee->in_async_render)) + { +r = ecore_drm2_output_blanktime_get(edata->output, 0, , ); +if (r) + { + edata->tick_job_timestamp = (double)sec + + ((double)usec / 100); + edata->tick_job = ecore_job_add(_tick_job, ee); + } + } + if (!ecore_drm2_output_pending_get(edata->output) && !ee->in_async_render) ecore_drm2_fb_flip(NULL, edata->output); + + edata->ticking = EINA_TRUE; } static void @@ -681,6 +710,12 @@ _drm_animator_unregister(Ecore_Evas *ee) edata = ee->engine.data; edata->ticking = EINA_FALSE; + if (edata->tick_job) + { +ERR("Animator unregister before first tick"); +ecore_job_del(edata->tick_job); +edata->tick_job = NULL; + } } static double --
[EGIT] [core/enlightenment] master 01/01: Remove more pre-ecore-drm2 stuff
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=022dd52cd90cbbf33daa51dd90805b9634b8a6b0 commit 022dd52cd90cbbf33daa51dd90805b9634b8a6b0 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 10 13:28:15 2017 -0500 Remove more pre-ecore-drm2 stuff We no longer need a HAVE_DRM2 define since it's become synonymous with HAVE_WL_DRM. --- configure.ac | 1 - meson.build | 7 --- src/bin/e_alert_main.c| 14 -- src/bin/e_comp_wl_input.c | 10 +- src/bin/e_drm2.x | 2 -- 5 files changed, 5 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 776e0795a..c90544e8b 100644 --- a/configure.ac +++ b/configure.ac @@ -779,7 +779,6 @@ define([CHECK_MODULE_WL_DRM], AC_E_CHECK_PKG(WL_DRM, [ ecore-drm2 >= $efl_ecore_drm2_version elput >= $efl_version ecore >= $efl_version eina >= $efl_version ], [ WL_DRM=true - AC_DEFINE_UNQUOTED([HAVE_DRM2],[1],[enable ecore-drm2 support]) ], [WL_DRM=false]) else WL_DRM=false diff --git a/meson.build b/meson.build index a23cdbaaa..65bfe914e 100644 --- a/meson.build +++ b/meson.build @@ -244,13 +244,6 @@ if get_option('mount-eeze') == true endif endif -if get_option('wayland') == true - if get_option('wl-drm') -dep_ecore_drm2 = dependency('ecore-drm2', required : true) -config_h.set('HAVE_DRM2', '1') - endif -endif - dep_rt = cc.find_library('rt', required: false) dep_eina = dependency('eina', required: true, version: efl_version) dep_eet = dependency('eet' , required: true) diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index a1784bf4b..faa7151c2 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -1,6 +1,6 @@ #include "config.h" -#ifdef HAVE_DRM2 +#ifdef HAVE_WL_DRM # define EFL_BETA_API_SUPPORT #endif @@ -23,11 +23,7 @@ #endif #ifdef HAVE_WL_DRM # include -# ifdef HAVE_DRM2 -# include -# else -# include -# endif +# include # include # include #endif @@ -35,7 +31,6 @@ #include "e_drm2.x" #ifdef HAVE_WL_DRM -# ifdef HAVE_DRM2 /* DRM_FORMAT_XRGB and fourcc_code borrowed from * @@ -60,12 +55,11 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ -# define fourcc_code(a, b, c, d) \ +# define fourcc_code(a, b, c, d) \ ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) -# define DRM_FORMAT_XRGB \ +# define DRM_FORMAT_XRGB \ fourcc_code('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */ -# endif #endif #define WINDOW_WIDTH 320 diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 9d1c9de62..1ae189297 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -3,11 +3,7 @@ #include "e.h" #include #ifdef HAVE_WL_DRM -# ifdef HAVE_DRM2 -# include -# else -# include -# endif +#include #endif E_API int E_EVENT_TEXT_INPUT_PANEL_VISIBILITY_CHANGE = -1; @@ -670,7 +666,6 @@ _e_comp_wl_input_context_keymap_set(struct xkb_keymap *keymap, struct xkb_contex if (!e_comp->ee) return; //set the values to the drm devices #ifdef HAVE_WL_DRM -# ifdef HAVE_DRM2 if (strstr(ecore_evas_engine_name_get(e_comp->ee), "drm")) { Ecore_Drm2_Device *dev; @@ -680,7 +675,6 @@ _e_comp_wl_input_context_keymap_set(struct xkb_keymap *keymap, struct xkb_contex ecore_drm2_device_keyboard_info_set(dev, context, keymap, e_comp_wl ? e_comp_wl->kbd.choosen_group : choosen_group); } -# endif #endif } @@ -688,7 +682,6 @@ E_API void e_comp_wl_input_keymap_index_set(xkb_layout_index_t index) { #ifdef HAVE_WL_DRM -# ifdef HAVE_DRM2 if (e_comp && e_comp->ee && strstr(ecore_evas_engine_name_get(e_comp->ee), "drm")) { Ecore_Drm2_Device *dev; @@ -697,7 +690,6 @@ e_comp_wl_input_keymap_index_set(xkb_layout_index_t index) if (dev) ecore_drm2_device_keyboard_group_set(dev, index); } -# endif #endif if (e_comp_wl) { diff --git a/src/bin/e_drm2.x b/src/bin/e_drm2.x index 1f852a0da..8d620e000 100644 --- a/src/bin/e_drm2.x +++ b/src/bin/e_drm2.x @@ -1,4 +1,3 @@ -# ifdef HAVE_DRM2 # include static int crude_hack_fd; @@ -114,4 +113,3 @@ e_drm2_fb_create(Ecore_Drm2_Device *device, int width, int height, int depth, in } #undef E_DRM2_EFL_VERSION_MINIMUM -#endif --
[EGIT] [core/efl] master 01/01: efl_wl: Update to latest dmabuf protocol version
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=49bdba8505232371db4609c0ad963ecb0896f275 commit 49bdba8505232371db4609c0ad963ecb0896f275 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 10 11:36:38 2017 -0500 efl_wl: Update to latest dmabuf protocol version Weston's dmabuf code continues to be modular enough that we can pull it in with little change. This updates us to version 3 of the protocol. Currently only contains stubs for format queries. --- src/lib/efl_wl/dmabuf.c | 110 src/lib/efl_wl/dmabuf.h | 3 ++ src/lib/efl_wl/efl_wl.c | 12 ++ 3 files changed, 108 insertions(+), 17 deletions(-) diff --git a/src/lib/efl_wl/dmabuf.c b/src/lib/efl_wl/dmabuf.c index a451179d53..273d141b05 100644 --- a/src/lib/efl_wl/dmabuf.c +++ b/src/lib/efl_wl/dmabuf.c @@ -43,6 +43,8 @@ #include __attribute__ ((visibility("hidden"))) Eina_Bool comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf); +__attribute__ ((visibility("hidden"))) void comp_dmabuf_formats_query(void *c, int **formats, int *num_formats); +__attribute__ ((visibility("hidden"))) void comp_dmabuf_modifiers_query(void *c, int format, uint64_t **modifiers, int *num_modifiers); static void linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer) @@ -55,7 +57,6 @@ linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer) } buffer->attributes.n_planes = 0; - free(buffer); } @@ -123,7 +124,7 @@ params_add(struct wl_client *client, buffer->attributes.offset[plane_idx] = offset; buffer->attributes.stride[plane_idx] = stride; buffer->attributes.modifier[plane_idx] = ((uint64_t)modifier_hi << 32) | -modifier_lo; +modifier_lo; buffer->attributes.n_planes++; } @@ -154,12 +155,13 @@ destroy_linux_dmabuf_wl_buffer(struct wl_resource *resource) } static void -params_create(struct wl_client *client, - struct wl_resource *params_resource, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags) +params_create_common(struct wl_client *client, +struct wl_resource *params_resource, +uint32_t buffer_id, +int32_t width, +int32_t height, +uint32_t format, +uint32_t flags) { struct linux_dmabuf_buffer *buffer; int i; @@ -275,7 +277,7 @@ params_create(struct wl_client *client, buffer->buffer_resource = wl_resource_create(client, _buffer_interface, -1, 0); +1, buffer_id); if (!buffer->buffer_resource) { wl_resource_post_no_memory(params_resource); goto err_buffer; @@ -285,7 +287,10 @@ params_create(struct wl_client *client, _dmabuf_buffer_implementation, buffer, destroy_linux_dmabuf_wl_buffer); - zwp_linux_buffer_params_v1_send_created(params_resource, + /* send 'created' event when the request is not for an immediate +* import, ie buffer_id is zero */ + if (buffer_id == 0) + zwp_linux_buffer_params_v1_send_created(params_resource, buffer->buffer_resource); return; @@ -295,17 +300,54 @@ err_buffer: buffer->user_data_destroy_func(buffer); err_failed: - zwp_linux_buffer_params_v1_send_failed(params_resource); + if (buffer_id == 0) + zwp_linux_buffer_params_v1_send_failed(params_resource); + else + /* since the behavior is left implementation defined by the +* protocol in case of create_immed failure due to an unknown cause, +* we choose to treat it as a fatal error and immediately kill the +* client instead of creating an invalid handle and waiting for it +* to be used. +*/ + wl_resource_post_error(params_resource, + ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER, + "importing the supplied dmabufs failed"); err_out: linux_dmabuf_buffer_destroy(buffer); } +static void +params_create(struct wl_client *client, + struct wl_resource *params_resource, + int32_t width, + int32_t height, + uint32_t format, + uint32_t flags) +{ + params_create_common(client, params_resource, 0, width, height, format, +
[EGIT] [core/enlightenment] master 01/01: Resynch with weston's dmabuf implementation
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1cdbcb0d943a38c0b2115bf3054ea85ea5595817 commit 1cdbcb0d943a38c0b2115bf3054ea85ea5595817 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 10 11:29:20 2017 -0500 Resynch with weston's dmabuf implementation Weston's dmabuf implementation continues to be modular enough that we can pull it in with minimal change. This updates us to version 3 of the protocol - required by recent mesa to use dmabuf buffers instead of wl_drm ones. Currently only contains stubs for format query. --- src/bin/e_comp_wl_dmabuf.c | 112 + src/bin/e_comp_wl_dmabuf.h | 5 +- src/bin/e_pixmap.c | 17 +++ src/bin/e_pixmap.h | 3 ++ 4 files changed, 117 insertions(+), 20 deletions(-) diff --git a/src/bin/e_comp_wl_dmabuf.c b/src/bin/e_comp_wl_dmabuf.c index 6efba605d..61cb0fe1b 100644 --- a/src/bin/e_comp_wl_dmabuf.c +++ b/src/bin/e_comp_wl_dmabuf.c @@ -51,7 +51,6 @@ linux_dmabuf_buffer_destroy(struct linux_dmabuf_buffer *buffer) } buffer->attributes.n_planes = 0; - free(buffer); } @@ -119,7 +118,7 @@ params_add(struct wl_client *client, buffer->attributes.offset[plane_idx] = offset; buffer->attributes.stride[plane_idx] = stride; buffer->attributes.modifier[plane_idx] = ((uint64_t)modifier_hi << 32) | -modifier_lo; +modifier_lo; buffer->attributes.n_planes++; } @@ -150,12 +149,13 @@ destroy_linux_dmabuf_wl_buffer(struct wl_resource *resource) } static void -params_create(struct wl_client *client, - struct wl_resource *params_resource, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags) +params_create_common(struct wl_client *client, +struct wl_resource *params_resource, +uint32_t buffer_id, +int32_t width, +int32_t height, +uint32_t format, +uint32_t flags) { struct linux_dmabuf_buffer *buffer; int i; @@ -271,7 +271,7 @@ params_create(struct wl_client *client, buffer->buffer_resource = wl_resource_create(client, _buffer_interface, -1, 0); +1, buffer_id); if (!buffer->buffer_resource) { wl_resource_post_no_memory(params_resource); goto err_buffer; @@ -281,7 +281,10 @@ params_create(struct wl_client *client, _dmabuf_buffer_implementation, buffer, destroy_linux_dmabuf_wl_buffer); - zwp_linux_buffer_params_v1_send_created(params_resource, + /* send 'created' event when the request is not for an immediate +* import, ie buffer_id is zero */ + if (buffer_id == 0) + zwp_linux_buffer_params_v1_send_created(params_resource, buffer->buffer_resource); return; @@ -291,17 +294,54 @@ err_buffer: buffer->user_data_destroy_func(buffer); err_failed: - zwp_linux_buffer_params_v1_send_failed(params_resource); + if (buffer_id == 0) + zwp_linux_buffer_params_v1_send_failed(params_resource); + else + /* since the behavior is left implementation defined by the +* protocol in case of create_immed failure due to an unknown cause, +* we choose to treat it as a fatal error and immediately kill the +* client instead of creating an invalid handle and waiting for it +* to be used. +*/ + wl_resource_post_error(params_resource, + ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER, + "importing the supplied dmabufs failed"); err_out: linux_dmabuf_buffer_destroy(buffer); } +static void +params_create(struct wl_client *client, + struct wl_resource *params_resource, + int32_t width, + int32_t height, + uint32_t format, + uint32_t flags) +{ + params_create_common(client, params_resource, 0, width, height, format, +flags); +} + +static void +params_create_immed(struct wl_client *client, + struct wl_resource *params_resource, + uint32_t buffer_id, + int32_t width, + int32_t height, + uint32_t format, + uint32_t flags) +{ + params
[EGIT] [core/efl] master 08/11: ecore_drm2: Add ecore_drm2_output_info_get
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1b853dcfadfdea9e10bf4bca0ea7a24d990af68f commit 1b853dcfadfdea9e10bf4bca0ea7a24d990af68f Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 3 18:26:18 2017 -0500 ecore_drm2: Add ecore_drm2_output_info_get We've got too many ways to query output information, so let's add more. (this will soon replace all of them) --- src/lib/ecore_drm2/Ecore_Drm2.h | 15 +++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 19 +++ 2 files changed, 34 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 0468cbca5e..ef35304c35 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -718,6 +718,21 @@ EAPI unsigned int ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output EAPI void ecore_drm2_output_resolution_get(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh); /** + * Get the geometry and refresh rate for a given output + * + * @param output + * @param *x + * @param *y + * @param *w + * @param *h + * @param *refresh + * + * @ingroup Ecore_Drm2_Output_Group + * @since 1.21 + */ +EAPI void ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh); + +/** * Get if an output can be used on a given crtc * * This function will loop the possible crtcs of an encoder to determine if diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 7c460c0c7f..f3f13081b0 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1664,3 +1664,22 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s *usec = v.reply.tval_usec; return EINA_TRUE; } + +EAPI void +ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh) +{ + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + if (refresh) *refresh = 0; + + EINA_SAFETY_ON_NULL_RETURN(output); + EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode); + + if (w) *w = output->current_mode->width; + if (h) *h = output->current_mode->height; + if (refresh) *refresh = output->current_mode->refresh; + if (x) *x = output->x; + if (y) *y = output->y; +} --
[EGIT] [core/efl] master 01/11: ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8ff59b2c55a58331625b6d997918e64eddc84b10 commit 8ff59b2c55a58331625b6d997918e64eddc84b10 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 15:48:40 2017 -0500 ecore_drm2: Pass Ecore_Drm2_Device instead of fd to most functions Intended to simplify the upcoming commit that merges device find and device open into a single function that returns a device. The fd is something callers shouldn't really need to get their hands on, right now there are still a few places where it's needed, but those will be gone soon too. --- src/lib/ecore_drm2/Ecore_Drm2.h| 26 - src/lib/ecore_drm2/ecore_drm2.c| 6 ++-- src/lib/ecore_drm2/ecore_drm2_device.c | 8 + src/lib/ecore_drm2/ecore_drm2_fb.c | 34 -- .../ecore_evas/engines/drm/ecore_evas_drm.c| 13 - src/modules/evas/engines/drm/Evas_Engine_Drm.h | 4 ++- src/modules/evas/engines/drm/evas_engine.c | 10 +++ src/modules/evas/engines/drm/evas_engine.h | 3 +- src/modules/evas/engines/drm/evas_outbuf.c | 4 +-- .../evas/engines/gl_drm/Evas_Engine_GL_Drm.h | 3 +- src/modules/evas/engines/gl_drm/evas_engine.c | 12 src/modules/evas/engines/gl_drm/evas_engine.h | 6 ++-- src/modules/evas/engines/gl_drm/evas_outbuf.c | 4 +-- 13 files changed, 81 insertions(+), 52 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 450f1faa0c..81c3ace6a8 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -144,7 +144,7 @@ EAPI int ecore_drm2_shutdown(void); /** * Read and process pending Drm events * - * @param fd drm file descriptor + * @param dev drm device * @param ctx * * @return 0 on success, -1 otherwise @@ -156,7 +156,7 @@ EAPI int ecore_drm2_shutdown(void); * @ingroup Ecore_Drm_Init_Group * @since 1.19 */ -EAPI int ecore_drm2_event_handle(int fd, Ecore_Drm2_Context *drmctx); +EAPI int ecore_drm2_event_handle(Ecore_Drm2_Device *dev, Ecore_Drm2_Context *drmctx); /** * @defgroup Ecore_Drm2_Device_Group Drm device functions @@ -832,7 +832,7 @@ EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output /** * Create a new framebuffer object * - * @param fd + * @param dev * @param width * @param height * @param depth @@ -844,9 +844,9 @@ EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output * @ingroup Ecore_Drm2_Fb_Group * @since 1.18 */ -EAPI Ecore_Drm2_Fb *ecore_drm2_fb_create(int fd, int width, int height, int depth, int bpp, unsigned int format); +EAPI Ecore_Drm2_Fb *ecore_drm2_fb_create(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format); -EAPI Ecore_Drm2_Fb *ecore_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); +EAPI Ecore_Drm2_Fb *ecore_drm2_fb_gbm_create(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format, unsigned int handle, unsigned int stride, void *bo); /** * Get a framebuffer's mmap'd data @@ -971,7 +971,7 @@ EAPI void *ecore_drm2_fb_bo_get(Ecore_Drm2_Fb *fb); /** * Import a dmabuf object as a Framebuffer * - * @param fd + * @param dev * @param width * @param height * @param depth @@ -987,7 +987,7 @@ EAPI void *ecore_drm2_fb_bo_get(Ecore_Drm2_Fb *fb); * @since 1.20 * */ -EAPI Ecore_Drm2_Fb *ecore_drm2_fb_dmabuf_import(int fd, int width, int height, int depth, int bpp, unsigned int format, unsigned int strides[4], int dmabuf_fd[4], int dmabuf_fd_count); +EAPI Ecore_Drm2_Fb *ecore_drm2_fb_dmabuf_import(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format, unsigned int strides[4], int dmabuf_fd[4], int dmabuf_fd_count); /** * Discard a framebuffer object @@ -1094,6 +1094,18 @@ EAPI void ecore_drm2_fb_status_handler_set(Ecore_Drm2_Fb *fb, Ecore_Drm2_Fb_Stat */ EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec); +/** + * Get the fd of an Ecore_Drm2_Device + * + * Query the fd of the device. + * + * @param device + * + * @since 1.20 + */ + +EAPI int ecore_drm2_device_fd_get(Ecore_Drm2_Device *device); + # endif #endif diff --git a/src/lib/ecore_drm2/ecore_drm2.c b/src/lib/ecore_drm2/ecore_drm2.c index 526ea4a523..a4ab72042d 100644 --- a/src/lib/ecore_drm2/ecore_drm2.c +++ b/src/lib/ecore_drm2/ecore_drm2.c @@ -219,16 +219,16 @@ ecore_drm2_shutdown(void) } EAPI int -ecore_drm2_event_handle(int fd, Ecore_Drm2_Context *drmctx) +ecore_drm2_event_handle(Ecore_Drm2_Device *dev, Ecore_Drm2_Context *drmctx) { drmEventContext ctx; - EINA_SAFETY_ON_TRUE_RETURN_VAL((fd &l
[EGIT] [core/efl] master 05/11: ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_open
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d8a9b895bb3c3e70c4b56441c0c34b981381a8d0 commit d8a9b895bb3c3e70c4b56441c0c34b981381a8d0 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 3 14:56:19 2017 -0500 ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_open There's never a reason to find a device and not open it, so all callers end up calling these two functions back to back. --- src/lib/ecore_drm2/Ecore_Drm2.h| 19 ++ src/lib/ecore_drm2/ecore_drm2_device.c | 41 -- .../ecore_evas/engines/drm/ecore_evas_drm.c| 9 + 3 files changed, 19 insertions(+), 50 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 81c3ace6a8..d90ee99dc2 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -166,30 +166,17 @@ EAPI int ecore_drm2_event_handle(Ecore_Drm2_Device *dev, Ecore_Drm2_Context *drm */ /** - * Try to find a drm device on a given seat + * Try to open the Ecore_Drm2_Device for a given seat * * @param seat * @param tty - * @param sync * - * @return A newly allocated Ecore_Drm2_Device on success, NULL otherwise + * @return An Ecore_Drm2_Device or NULL on failure. * * @ingroup Ecore_Drm2_Device_Group * @since 1.18 */ -EAPI Ecore_Drm2_Device *ecore_drm2_device_find(const char *seat, unsigned int tty); - -/** - * Try to open a given Ecore_Drm2_Device - * - * @param device - * - * @return A valid file descriptor if open succeeds, -1 otherwise. - * - * @ingroup Ecore_Drm2_Device_Group - * @since 1.18 - */ -EAPI int ecore_drm2_device_open(Ecore_Drm2_Device *device); +EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tty); /** * Close an open Ecore_Drm2_Device diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index aa8917ce4e..42a21c0742 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -593,43 +593,29 @@ _drm2_atomic_state_free(Ecore_Drm2_Atomic_State *state) } EAPI Ecore_Drm2_Device * -ecore_drm2_device_find(const char *seat, unsigned int tty) +ecore_drm2_device_open(const char *seat, unsigned int tty) { - Ecore_Drm2_Device *dev; + Ecore_Drm2_Device *device; - dev = calloc(1, sizeof(Ecore_Drm2_Device)); - if (!dev) return NULL; + device = calloc(1, sizeof(Ecore_Drm2_Device)); + if (!device) return NULL; - dev->em = elput_manager_connect(seat, tty); - if (!dev->em) + device->em = elput_manager_connect(seat, tty); + if (!device->em) { ERR("Could not connect to input manager"); goto man_err; } - dev->path = _drm2_device_find(dev->em, seat); - if (!dev->path) + device->path = _drm2_device_find(device->em, seat); + if (!device->path) { ERR("Could not find drm device on seat %s", seat); goto path_err; } - return dev; - -path_err: - elput_manager_disconnect(dev->em); -man_err: - free(dev); - return NULL; -} - -EAPI int -ecore_drm2_device_open(Ecore_Drm2_Device *device) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(device, -1); - device->fd = elput_manager_open(device->em, device->path, -1); - if (device->fd < 0) goto open_err; + if (device->fd < 0) goto path_err; if (!elput_input_init(device->em)) { @@ -681,12 +667,15 @@ ecore_drm2_device_open(Ecore_Drm2_Device *device) ecore_event_handler_add(ELPUT_EVENT_DEVICE_CHANGE, _cb_device_change, device); - return device->fd; + return device; input_err: elput_manager_close(device->em, device->fd); -open_err: - return -1; +path_err: + elput_manager_disconnect(device->em); +man_err: + free(device); + return NULL; } EAPI void diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index a801445492..c8714ac1b9 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -148,15 +148,9 @@ _ecore_evas_drm_init(Ecore_Evas *ee, Ecore_Evas_Engine_Drm_Data *edata, const ch if (!device) device = "seat0"; - edata->dev = ecore_drm2_device_find(device, 0); + edata->dev = ecore_drm2_device_open(device, 0); if (!edata->dev) { -ERR("Failed to create device"); -goto dev_err; - } - - if (ecore_drm2_device_open(edata->dev) < 0) - { ERR("Failed to open device"); goto open_err; } @@ -187,7 +181,6 @@ output_err: ecore_drm2_device_close(edata->dev); open_err: ecore_drm2_device_free(edata->dev); -dev_err: ecore_drm2_shutdown(); init_err: return --_drm_init_count; --
[EGIT] [core/efl] master 09/11: ecore_drm2: Remove ecore_drm2_output_geometry_get()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=846db0e0e7ad3cff1fac4437e378c28e60c68bf2 commit 846db0e0e7ad3cff1fac4437e378c28e60c68bf2 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 8 12:02:15 2017 -0500 ecore_drm2: Remove ecore_drm2_output_geometry_get() Replaced with ecore_drm2_output_info_get() --- src/lib/ecore_drm2/Ecore_Drm2.h | 14 -- src/lib/ecore_drm2/ecore_drm2_outputs.c | 12 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 4 ++-- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index ef35304c35..d979881867 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -476,20 +476,6 @@ EAPI Eina_Bool ecore_drm2_output_backlight_get(Ecore_Drm2_Output *output); EAPI Ecore_Drm2_Output *ecore_drm2_output_find(Ecore_Drm2_Device *device, int x, int y); /** - * Get the geometry of a given output - * - * @param output - * @param x - * @param y - * @param w - * @param h - * - * @ingroup Ecore_Drm2_Output_Group - * @since 1.18 - */ -EAPI void ecore_drm2_output_geometry_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h); - -/** * Get the dpi of a given output * * @param output diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index f3f13081b0..7cf8198adc 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1118,18 +1118,6 @@ ecore_drm2_output_find(Ecore_Drm2_Device *device, int x, int y) } EAPI void -ecore_drm2_output_geometry_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h) -{ - EINA_SAFETY_ON_NULL_RETURN(output); - EINA_SAFETY_ON_TRUE_RETURN(!output->enabled); - - if (x) *x = output->x; - if (y) *y = output->y; - if (w) *w = output->current_mode->width; - if (h) *h = output->current_mode->height; -} - -EAPI void ecore_drm2_output_dpi_get(Ecore_Drm2_Output *output, int *xdpi, int *ydpi) { EINA_SAFETY_ON_NULL_RETURN(output); diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index be1bd38567..6d031daef6 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -246,7 +246,7 @@ _drm_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h) Ecore_Evas_Engine_Drm_Data *edata; edata = ee->engine.data; - ecore_drm2_output_geometry_get(edata->output, x, y, w, h); + ecore_drm2_output_info_get(edata->output, x, y, w, h, NULL); } static void @@ -490,7 +490,7 @@ _drm_fullscreen_set(Ecore_Evas *ee, Eina_Bool on) edata->w = ee->w; edata->h = ee->h; -ecore_drm2_output_geometry_get(edata->output, NULL, NULL, , ); +ecore_drm2_output_info_get(edata->output, NULL, NULL, , , NULL); if ((ow == 0) || (oh == 0)) { ow = ee->w; --
[EGIT] [core/efl] master 11/11: ecore_drm2: Remove ecore_drm2_output_resolution_get()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9fd0ed736dfed7739dbc35024c11ccd093b0b5f5 commit 9fd0ed736dfed7739dbc35024c11ccd093b0b5f5 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 8 12:03:51 2017 -0500 ecore_drm2: Remove ecore_drm2_output_resolution_get() No local callers. Superseded by ecore_drm2_output_info_get() --- src/lib/ecore_drm2/Ecore_Drm2.h | 13 - src/lib/ecore_drm2/ecore_drm2_outputs.c | 15 --- 2 files changed, 28 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index ea87c19cbb..031a3dac88 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -679,19 +679,6 @@ EAPI Eina_Bool ecore_drm2_output_cloned_get(Ecore_Drm2_Output *output); EAPI unsigned int ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output); /** - * Get the current resolution of a given output - * - * @param output - * @param *w - * @param *h - * @param *refresh - * - * @ingroup Ecore_Drm2_Output_Group - * @since 1.18 - */ -EAPI void ecore_drm2_output_resolution_get(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh); - -/** * Get the geometry and refresh rate for a given output * * @param output diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 4e7db927bf..29e26c80bc 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1393,21 +1393,6 @@ ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output) return output->conn_type; } -EAPI void -ecore_drm2_output_resolution_get(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh) -{ - if (w) *w = 0; - if (h) *h = 0; - if (refresh) *refresh = 0; - - EINA_SAFETY_ON_NULL_RETURN(output); - EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode); - - if (w) *w = output->current_mode->width; - if (h) *h = output->current_mode->height; - if (refresh) *refresh = output->current_mode->refresh; -} - EAPI Eina_Bool ecore_drm2_output_possible_crtc_get(Ecore_Drm2_Output *output, unsigned int crtc) { --
[EGIT] [core/efl] master 06/11: ecore_drm2: Merge ecore_drm2_device_free and _close
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=afd65a8a99592de563bd6c3afac015b259c6aa0c commit afd65a8a99592de563bd6c3afac015b259c6aa0c Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 3 15:07:53 2017 -0500 ecore_drm2: Merge ecore_drm2_device_free and _close There's no reason to have them be separate, all callers must do them back to back, so let's just combine them. --- src/lib/ecore_drm2/Ecore_Drm2.h | 10 -- src/lib/ecore_drm2/ecore_drm2_device.c | 8 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 2 -- 3 files changed, 20 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index d90ee99dc2..0468cbca5e 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -189,16 +189,6 @@ EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tt EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *device); /** - * Free a given Ecore_Drm2_Device - * - * @param device - * - * @ingroup Ecore_Drm2_Device_Group - * @since 1.18 - */ -EAPI void ecore_drm2_device_free(Ecore_Drm2_Device *device); - -/** * Get the type of clock used by a given Ecore_Drm2_Device * * @param device diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 42a21c0742..7ec429523b 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -682,17 +682,9 @@ EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *device) { EINA_SAFETY_ON_NULL_RETURN(device); - EINA_SAFETY_ON_TRUE_RETURN(device->fd < 0); elput_input_shutdown(device->em); elput_manager_close(device->em, device->fd); -} - -EAPI void -ecore_drm2_device_free(Ecore_Drm2_Device *device) -{ - EINA_SAFETY_ON_NULL_RETURN(device); - if (_ecore_drm2_use_atomic) _drm2_atomic_state_free(device->state); diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index c8714ac1b9..be1bd38567 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -180,7 +180,6 @@ _ecore_evas_drm_init(Ecore_Evas *ee, Ecore_Evas_Engine_Drm_Data *edata, const ch output_err: ecore_drm2_device_close(edata->dev); open_err: - ecore_drm2_device_free(edata->dev); ecore_drm2_shutdown(); init_err: return --_drm_init_count; @@ -194,7 +193,6 @@ _ecore_evas_drm_shutdown(Ecore_Evas_Engine_Drm_Data *edata) ecore_drm2_outputs_destroy(edata->dev); ecore_drm2_device_close(edata->dev); - ecore_drm2_device_free(edata->dev); ecore_drm2_shutdown(); ecore_event_evas_shutdown(); EINA_LIST_FREE(handlers, h) --
[EGIT] [core/enlightenment] master 03/04: Stop doing complicated things after a segfault
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=0b26bdc2f84a29fa832e3579dbc8b45510598c2e commit 0b26bdc2f84a29fa832e3579dbc8b45510598c2e Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 8 18:01:04 2017 -0500 Stop doing complicated things after a segfault The chance of any of this succeeded is near zero, and it sometimes ends up in a tight loop after a crash. --- src/bin/e_signals.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/src/bin/e_signals.c b/src/bin/e_signals.c index 47caba6c3..4d6f9e5dd 100644 --- a/src/bin/e_signals.c +++ b/src/bin/e_signals.c @@ -70,21 +70,7 @@ _e_crash(void) { #ifdef HAVE_WAYLAND if (e_comp->comp_type == E_PIXMAP_TYPE_WL) - { -# ifdef USE_MODULE_WL_DRM -if (!strstr(ecore_evas_engine_name_get(e_comp->ee), "drm")) return; -Ecore_Drm2_Device *dev; - -dev = ecore_evas_data_get(e_comp->ee, "device"); -if (dev) - { - ecore_drm2_outputs_destroy(dev); - ecore_drm2_device_close(dev); - } -ecore_drm2_shutdown(); -# endif return; - } #endif #ifndef HAVE_WAYLAND_ONLY _e_x_composite_shutdown(); --
[EGIT] [core/efl] master 07/11: ecore_drm2: Remove useless safety checks
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=70c1ce3be376ed29a25247b2d8c13e4d73edae64 commit 70c1ce3be376ed29a25247b2d8c13e4d73edae64 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 3 15:09:06 2017 -0500 ecore_drm2: Remove useless safety checks Now that the device is opened and found in one operation it's impossible to have fd == -1, so we can stop testing for it. --- src/lib/ecore_drm2/ecore_drm2_device.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 7ec429523b..e5a41fd9c8 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -701,7 +701,6 @@ ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *device) int ret; EINA_SAFETY_ON_NULL_RETURN_VAL(device, -1); - EINA_SAFETY_ON_TRUE_RETURN_VAL((device->fd < 0), -1); ret = sym_drmGetCap(device->fd, DRM_CAP_TIMESTAMP_MONOTONIC, ); if ((ret == 0) && (caps == 1)) @@ -717,7 +716,6 @@ ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *device, int *width, int *he int ret; EINA_SAFETY_ON_NULL_RETURN(device); - EINA_SAFETY_ON_TRUE_RETURN((device->fd < 0)); if (width) { @@ -857,7 +855,6 @@ ecore_drm2_device_prefer_shadow(Ecore_Drm2_Device *device) int ret; EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE); - EINA_SAFETY_ON_TRUE_RETURN_VAL((device->fd < 0), EINA_FALSE); ret = sym_drmGetCap(device->fd, DRM_CAP_DUMB_PREFER_SHADOW, ); if ((ret == 0) && (caps == 1)) --
[EGIT] [core/enlightenment] master 02/04: Add a compatibility layer to protect against ecore_drm2 api change
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=0fd23928f05b901957ea373d52c7b700fdd1dd8e commit 0fd23928f05b901957ea373d52c7b700fdd1dd8e Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 8 17:59:39 2017 -0500 Add a compatibility layer to protect against ecore_drm2 api change In case we roll an E release before the next EFL one, we need these API changes to be hidden. Later we can remove this... --- src/bin/Makefile.mk | 2 +- src/bin/e_alert_main.c | 14 +++-- src/bin/e_drm2.x| 117 src/modules/wl_drm/e_mod_main.c | 20 --- 4 files changed, 139 insertions(+), 14 deletions(-) diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index 60d0f744e..323f2cdf4 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -539,7 +539,7 @@ endif src_bin_enlightenment_alert_SOURCES = \ src/bin/e_alert_main.c -src_bin_enlightenment_alert_LDADD = @E_ALERT_LIBS@ +src_bin_enlightenment_alert_LDADD = @E_ALERT_LIBS@ @dlopen_libs@ src_bin_enlightenment_alert_CPPFLAGS = @E_ALERT_CFLAGS@ src_bin_enlightenment_filemanager_SOURCES = \ diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index b8c179672..ed41f4780 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -32,8 +32,11 @@ # include #endif +#include "e_drm2.x" + #ifdef HAVE_WL_DRM # ifdef HAVE_DRM2 + /* DRM_FORMAT_XRGB and fourcc_code borrowed from * * Copyright 2011 Intel Corporation @@ -389,13 +392,13 @@ _e_alert_drm_connect(void) return 0; } - if (!ecore_drm2_init()) + if (!e_drm2_compat_init() || !ecore_drm2_init()) { printf("\tCannot init ecore_drm\n"); return 0; } - dev = ecore_drm2_device_open("seat0", 0); + dev = e_drm2_device_open("seat0", 0); if (!dev) { printf("\tCannot find drm device\n"); @@ -410,7 +413,7 @@ _e_alert_drm_connect(void) } output = ecore_drm2_output_find(dev, 0, 0); - if (output) ecore_drm2_output_info_get(output, NULL, NULL, , , NULL); + if (output) e_drm2_output_info_get(output, NULL, NULL, , , NULL); fprintf(stderr, "\tOutput Size: %d %d\n", sw, sh); ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, @@ -429,7 +432,7 @@ _e_alert_drm_create(void) fh = 13; - buffer = ecore_drm2_fb_create(dev, sw, sh, 24, 32, DRM_FORMAT_XRGB); + buffer = e_drm2_fb_create(dev, sw, sh, 24, 32, DRM_FORMAT_XRGB); method = evas_render_method_lookup("buffer"); if (method <= 0) @@ -496,11 +499,12 @@ _e_alert_drm_shutdown(void) if (dev) { ecore_drm2_outputs_destroy(dev); -ecore_drm2_device_close(dev); +e_drm2_device_close(dev); } ecore_drm2_shutdown(); evas_shutdown(); + e_drm2_compat_shutdown(); } # else diff --git a/src/bin/e_drm2.x b/src/bin/e_drm2.x new file mode 100644 index 0..1f852a0da --- /dev/null +++ b/src/bin/e_drm2.x @@ -0,0 +1,117 @@ +# ifdef HAVE_DRM2 +# include + +static int crude_hack_fd; +static void *e_drm2_lib; + +void (*sym_ecore_drm2_output_crtc_size_get_120)(Ecore_Drm2_Output *output, int *w, int *h); +void (*sym_ecore_drm2_output_geometry_get_120)(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h); +void (*sym_ecore_drm2_output_resolution_get_120)(Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh); +Ecore_Drm2_Device *(*sym_ecore_drm2_device_find_120)(const char *seat, unsigned int tty); +int (*sym_ecore_drm2_device_open_120)(Ecore_Drm2_Device *device); +Ecore_Drm2_Device *(*sym_ecore_drm2_device_open_121)(const char *seat, unsigned int tty); +void (*sym_ecore_drm2_device_free_120)(Ecore_Drm2_Device *device); +void (*sym_ecore_drm2_output_info_get_121)(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh); +Ecore_Drm2_Fb *(*sym_ecore_drm2_fb_create_120)(int fd, int width, int height, int depth, int bpp, unsigned int format); +Ecore_Drm2_Fb *(*sym_ecore_drm2_fb_create_121)(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format); + +#define E_DRM2_EFL_VERSION_MINIMUM(MAJ, MIN, MIC) \ + ((eina_version->major > MAJ) || (eina_version->minor > MIN) ||\ + ((eina_version->minor == MIN) && (eina_version->micro >= MIC))) + +static Eina_Bool +e_drm2_compat_init(void) +{ +#define EDRM2SYM(sym, ver) \ + sym_##sym##_##ver = dlsym(e_drm2_lib, #sym); \ + if (!sym_##sym##_##ver) \ + { \ +dlclose(e_drm2_lib); \ +return EINA_FALSE; \ + } + + e_drm2_lib = dlopen("libecore_drm2.so", RTLD_NOW | RTLD_LOCAL); + if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99)) + { +EDRM2SYM(ecore_drm2_device_open, 121); +EDRM2SYM(ecore_drm2_output_info_get, 121); +EDRM2SYM(ecore_drm2_
[EGIT] [core/enlightenment] master 04/04: Remove ecore_drm support
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=15cb70f13ae440e47453e94ee063c48bc3b2b1e2 commit 15cb70f13ae440e47453e94ee063c48bc3b2b1e2 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Aug 9 10:49:24 2017 -0500 Remove ecore_drm support ecore_drm2 supersedes this, ecore_drm is deprecated, and we depend on an efl version newer than the deprecation, so none of this code should ever be built. --- src/bin/e_alert_main.c | 154 - 1 file changed, 154 deletions(-) diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index ed41f4780..a1784bf4b 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -376,7 +376,6 @@ _e_alert_drm_run(void) ecore_main_loop_begin(); } -# ifdef HAVE_DRM2 static Ecore_Drm2_Device *dev = NULL; static Ecore_Drm2_Fb *buffer = NULL; static Ecore_Drm2_Output *output = NULL; @@ -507,159 +506,6 @@ _e_alert_drm_shutdown(void) e_drm2_compat_shutdown(); } -# else -static Ecore_Drm_Device *dev = NULL; -static Ecore_Drm_Fb *buffer; - -static int -_e_alert_drm_connect(void) -{ - fprintf(stderr, "E_Alert Drm Connect\n"); - - if (!evas_init()) - { -printf("\tCannot init evas\n"); -return 0; - } - - if (!ecore_drm_init()) - { -printf("\tCannot init ecore_drm\n"); -return 0; - } - - dev = ecore_drm_device_find(NULL, NULL); - if (!dev) - { -printf("\tCannot find drm device\n"); -return 0; - } - - if (!ecore_drm_launcher_connect(dev)) - { -printf("\tCannot connect to drm device\n"); -return 0; - } - - if (!ecore_drm_device_open(dev)) - { -printf("\tCannot open drm device\n"); -return 0; - } - - if (!ecore_drm_outputs_create(dev)) - { -printf("\tCannot create drm outputs\n"); -return 0; - } - - if (!ecore_drm_inputs_create(dev)) - { -printf("\tCannot create drm inputs\n"); -return 0; - } - - ecore_drm_outputs_geometry_get(dev, NULL, NULL, , ); - fprintf(stderr, "\tOutput Size: %d %d\n", sw, sh); - - ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, - _e_alert_drm_cb_key_down, NULL); - - return 1; -} - -static void -_e_alert_drm_create(void) -{ - int method = 0; - - fprintf(stderr, "E_Alert Drm Create\n"); - - fh = 13; - - if (!ecore_drm_device_software_setup(dev)) - { -printf("\tFailed to setup software mode\n"); -return; - } - - buffer = ecore_drm_fb_create(dev, sw, sh); - memset(buffer->mmap, 0, buffer->size); - - method = evas_render_method_lookup("buffer"); - if (method <= 0) - { -fprintf(stderr, "\tCould not get evas render method\n"); -return; - } - - canvas = evas_new(); - if (!canvas) - { -fprintf(stderr, "\tFailed to create new canvas\n"); -return; - } - - evas_output_method_set(canvas, method); - evas_output_size_set(canvas, sw, sh); - evas_output_viewport_set(canvas, 0, 0, sw, sh); - - Evas_Engine_Info_Buffer *einfo; - einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); - if (!einfo) - { -printf("\tFailed to get evas engine info\n"); -evas_free(canvas); -return; - } - - einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; - einfo->info.dest_buffer = buffer->mmap; - einfo->info.dest_buffer_row_bytes = (sw * sizeof(int)); - einfo->info.use_color_key = 0; - einfo->info.alpha_threshold = 0; - einfo->info.func.new_update_region = NULL; - einfo->info.func.free_update_region = NULL; - evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); - - _e_alert_drm_draw_outline(); - _e_alert_drm_draw_title_outline(); - _e_alert_drm_draw_title(); - _e_alert_drm_draw_text(); - _e_alert_drm_draw_button_outlines(); -} - -static void -_e_alert_drm_display(void) -{ - Eina_List *updates; - - printf("E_Alert Drm Display\n"); - - updates = evas_render_updates(canvas); - evas_render_updates_free(updates); - - ecore_drm_fb_send(dev, buffer, NULL, NULL); -} - -static void -_e_alert_drm_shutdown(void) -{ - printf("E_Alert Drm Shutdown\n"); - - evas_free(canvas); - - if (dev) - { -ecore_drm_device_close(dev); -ecore_drm_launcher_disconnect(dev); -ecore_drm_device_free(dev); - } - - ecore_drm_shutdown(); - evas_shutdown(); -} -# endif #endif int --
[EGIT] [core/efl] master 10/11: ecore_drm2: Remove ecore_drm2_output_crtc_size_get()
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5ecfe6a8b5460fb9e16102798ceb027d3935d6af commit 5ecfe6a8b5460fb9e16102798ceb027d3935d6af Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 8 12:03:12 2017 -0500 ecore_drm2: Remove ecore_drm2_output_crtc_size_get() Replaced with ecore_drm2_output_info_get() --- src/lib/ecore_drm2/Ecore_Drm2.h | 12 src/lib/ecore_drm2/ecore_drm2_outputs.c | 19 --- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 2 +- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index d979881867..ea87c19cbb 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -516,18 +516,6 @@ EAPI unsigned int ecore_drm2_output_crtc_get(Ecore_Drm2_Output *output); EAPI Ecore_Drm2_Fb *ecore_drm2_output_latest_fb_get(Ecore_Drm2_Output *output); /** - * Get the size of the crtc for a given output - * - * @param output - * @param *w - * @param *h - * - * @ingroup Ecore_Drm2_Output_Group - * @since 1.18 - */ -EAPI void ecore_drm2_output_crtc_size_get(Ecore_Drm2_Output *output, int *w, int *h); - -/** * Get if a given output is marked as the primary output * * @param output diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 7cf8198adc..4e7db927bf 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1146,25 +1146,6 @@ ecore_drm2_output_latest_fb_get(Ecore_Drm2_Output *output) return output->next.fb; } -EAPI void -ecore_drm2_output_crtc_size_get(Ecore_Drm2_Output *output, int *w, int *h) -{ - drmModeCrtcPtr crtc; - - if (w) *w = 0; - if (h) *h = 0; - - EINA_SAFETY_ON_NULL_RETURN(output); - - crtc = sym_drmModeGetCrtc(output->fd, output->crtc_id); - if (!crtc) return; - - if (w) *w = crtc->width; - if (h) *h = crtc->height; - - sym_drmModeFreeCrtc(crtc); -} - EAPI Eina_Bool ecore_drm2_output_primary_get(Ecore_Drm2_Output *output) { diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 6d031daef6..f2da72ff6f 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -940,7 +940,7 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb); - ecore_drm2_output_crtc_size_get(edata->output, , ); + ecore_drm2_output_info_get(edata->output, NULL, NULL, , , NULL); ecore_drm2_device_calibrate(edata->dev, mw, mh); ecore_drm2_device_pointer_max_set(edata->dev, mw, mh); --
[EGIT] [core/efl] master 04/11: ecore_drm2: Remove connector bitfield
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9b9d704292258f1ee1412cc3f2f2ae638bb5237c commit 9b9d704292258f1ee1412cc3f2f2ae638bb5237c Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Aug 3 13:42:32 2017 -0500 ecore_drm2: Remove connector bitfield This is unreliable - there's no reason to expect these connector ids will be low enough to sensibly store in a bit field. --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 79 ++--- src/lib/ecore_drm2/ecore_drm2_private.h | 5 --- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index c5f0d6b995..7c460c0c7f 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -771,7 +771,6 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne output->enabled = EINA_FALSE; } - dev->alloc.conn |= (1 << output->conn_id); dev->outputs = eina_list_append(dev->outputs, output); _output_debug(output, conn); @@ -784,17 +783,38 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne return EINA_TRUE; } +static Ecore_Drm2_Output * +_output_find_by_con(Ecore_Drm2_Device *dev, uint32_t id) +{ + Ecore_Drm2_Output *output; + Eina_List *l; + + EINA_LIST_FOREACH(dev->outputs, l, output) + if (output->conn_id == id) return output; + + return NULL; +} + static void _outputs_update(Ecore_Drm2_Device *dev) { + Ecore_Drm2_Output *output; + Eina_List *l, *ll; drmModeRes *res; drmModeConnector *conn; - uint32_t connected = 0, disconnected = 0; + uint32_t *connected; int i = 0, x = 0, y = 0; res = sym_drmModeGetResources(dev->fd); if (!res) return; + connected = calloc(res->count_connectors, sizeof(uint32_t)); + if (!connected) + { +sym_drmModeFreeResources(res); +return; + } + for (i = 0; i < res->count_connectors; i++) { conn = sym_drmModeGetConnector(dev->fd, res->connectors[i]); @@ -802,9 +822,8 @@ _outputs_update(Ecore_Drm2_Device *dev) if (conn->connection != DRM_MODE_CONNECTED) goto next; -connected |= (1 << res->connectors[i]); - -if (!(dev->alloc.conn & (1 << res->connectors[i]))) +connected[i] = res->connectors[i]; +if (!_output_find_by_con(dev, res->connectors[i])) { if (dev->outputs) { @@ -827,41 +846,31 @@ next: sym_drmModeFreeResources(res); - disconnected = (dev->alloc.conn & ~connected); - if (disconnected) + EINA_LIST_FOREACH_SAFE(dev->outputs, l, ll, output) { -Ecore_Drm2_Output *output; -Eina_List *l; +Eina_Bool disconnected = EINA_TRUE; + +for (i = 0; i < res->count_connectors; i++) + if (connected[i] == output->conn_id) +{ + disconnected = EINA_FALSE; + break; +} -EINA_LIST_FOREACH(dev->outputs, l, output) +if (disconnected) { - if (disconnected & (1 << output->conn_id)) - { - disconnected &= ~(1 << output->conn_id); - output->connected = EINA_FALSE; - output->enabled = EINA_FALSE; - _output_event_send(output); - } + output->connected = EINA_FALSE; + output->enabled = EINA_FALSE; + _output_event_send(output); } - } - - connected = (dev->alloc.conn & connected); - if (connected) - { -Ecore_Drm2_Output *output; -Eina_List *l; - -EINA_LIST_FOREACH(dev->outputs, l, output) +else { - if (connected & (1 << output->conn_id)) - { - connected &= ~(1 << output->conn_id); - output->connected = EINA_TRUE; - output->enabled = EINA_TRUE; - _output_event_send(output); - } + output->connected = EINA_TRUE; + output->enabled = EINA_TRUE; + _output_event_send(output); } } + free(connected); } static void @@ -874,7 +883,7 @@ _cb_output_event(const char *device EINA_UNUSED, Eeze_Udev_Event event EINA_UNUS } static void -_output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) +_output_destroy(Ecore_Drm2_Device *dev EINA_UNUSED, Ecore_Drm2_Output *output) { Ecore_Drm2_Output_Mode *mode; Ecore_Drm2_Plane *plane; @@ -905,8 +914,6 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) free(mode); } - dev->all
[EGIT] [core/efl] master 02/11: gl_drm: Remove some stale comments
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=135ac29817d585b6700e1db09f6c2d7445a0a695 commit 135ac29817d585b6700e1db09f6c2d7445a0a695 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 15:49:24 2017 -0500 gl_drm: Remove some stale comments We do planes now, so this comment isn't helpful anymore. --- src/modules/evas/engines/gl_drm/evas_outbuf.c | 29 --- 1 file changed, 29 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index 0f3ea45e2f..dcc0256a4e 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -111,35 +111,6 @@ _evas_outbuf_buffer_swap(Outbuf *ob) else ecore_drm2_plane_fb_set(ob->priv.plane, fb); ecore_drm2_fb_flip(fb, ob->priv.output); - -/* Ecore_Drm2_Plane *plane; */ - -/* plane = ecore_drm2_plane_find(ob->priv.output, fb, ob->format); */ -/* if (plane) */ -/* { */ -/* int ret; */ -/* drmVBlank vbl = */ -/*{ */ -/* .request.type = DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT, */ -/* .request.sequence = 1, */ -/*}; */ - -/* vbl.request.type |= ecore_drm2_output_vblank_get(ob->priv.output); */ -/* vbl.request.signal = (unsigned long)ob; */ - -/* ecore_drm2_fb_dirty(fb, rects, count); */ - -/* if (!ecore_drm2_plane_fb_set(plane, fb)) */ -/*{ */ -/* ERR("Failed to set FB on Plane"); */ -/* return; */ -/*} */ - -/* ret = drmWaitVBlank(ob->fd, ); */ -/* if (ret) return; */ -/* } */ -/* else */ -/* WRN("NO PLANE FOUND"); */ } else WRN("Could not get FBO from Bo"); --
[EGIT] [core/efl] master 03/11: ecore_drm2: remove unused crtc bitfield
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2f9cb33f0b41fb82ba481ca4f9792f59e0995def commit 2f9cb33f0b41fb82ba481ca4f9792f59e0995def Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Aug 1 13:38:13 2017 -0500 ecore_drm2: remove unused crtc bitfield We'll need something like this when multi-head works, but it can't be implemented this way anyway. There's no guarantee that crtc ids will be low enough to fit sensibly in a bitfield. --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 2 -- src/lib/ecore_drm2/ecore_drm2_private.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index a6e84ee268..c5f0d6b995 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -771,7 +771,6 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne output->enabled = EINA_FALSE; } - dev->alloc.crtc |= (1 << output->crtc_id); dev->alloc.conn |= (1 << output->conn_id); dev->outputs = eina_list_append(dev->outputs, output); @@ -906,7 +905,6 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) free(mode); } - dev->alloc.crtc &= ~(1 << output->crtc_id); dev->alloc.conn &= ~(1 << output->conn_id); eina_stringshare_del(output->backlight.path); diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index a85cb0c2d5..e48449ead6 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h @@ -276,7 +276,7 @@ struct _Ecore_Drm2_Device struct { -uint32_t crtc, conn; +uint32_t conn; } alloc; struct --
[EGIT] [core/enlightenment] master 01/04: Update to recent ecore_drm2 changes
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=50169af1db71fd9aa6fed4a10b420e2b19e1a734 commit 50169af1db71fd9aa6fed4a10b420e2b19e1a734 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 16:00:26 2017 -0500 Update to recent ecore_drm2 changes --- src/bin/e_alert_main.c | 14 +++--- src/bin/e_signals.c | 1 - src/modules/wl_drm/e_mod_main.c | 19 +-- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index f2aa19c74..b8c179672 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -377,7 +377,6 @@ _e_alert_drm_run(void) static Ecore_Drm2_Device *dev = NULL; static Ecore_Drm2_Fb *buffer = NULL; static Ecore_Drm2_Output *output = NULL; -static int fd = 0; static int _e_alert_drm_connect(void) @@ -396,19 +395,13 @@ _e_alert_drm_connect(void) return 0; } - dev = ecore_drm2_device_find("seat0", 0); + dev = ecore_drm2_device_open("seat0", 0); if (!dev) { printf("\tCannot find drm device\n"); return 0; } - fd = ecore_drm2_device_open(dev); - if (fd < 0) - { -printf("\tCannot open drm device\n"); -return 0; - } if (!ecore_drm2_outputs_create(dev)) { @@ -417,7 +410,7 @@ _e_alert_drm_connect(void) } output = ecore_drm2_output_find(dev, 0, 0); - if (output) ecore_drm2_output_crtc_size_get(output, , ); + if (output) ecore_drm2_output_info_get(output, NULL, NULL, , , NULL); fprintf(stderr, "\tOutput Size: %d %d\n", sw, sh); ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, @@ -436,7 +429,7 @@ _e_alert_drm_create(void) fh = 13; - buffer = ecore_drm2_fb_create(fd, sw, sh, 24, 32, DRM_FORMAT_XRGB); + buffer = ecore_drm2_fb_create(dev, sw, sh, 24, 32, DRM_FORMAT_XRGB); method = evas_render_method_lookup("buffer"); if (method <= 0) @@ -504,7 +497,6 @@ _e_alert_drm_shutdown(void) { ecore_drm2_outputs_destroy(dev); ecore_drm2_device_close(dev); -ecore_drm2_device_free(dev); } ecore_drm2_shutdown(); diff --git a/src/bin/e_signals.c b/src/bin/e_signals.c index d0576ea66..47caba6c3 100644 --- a/src/bin/e_signals.c +++ b/src/bin/e_signals.c @@ -80,7 +80,6 @@ _e_crash(void) { ecore_drm2_outputs_destroy(dev); ecore_drm2_device_close(dev); - ecore_drm2_device_free(dev); } ecore_drm2_shutdown(); # endif diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 577d4db15..6843e92c5 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -391,15 +391,14 @@ _drm2_randr_create(void) { unsigned int refresh; - ecore_drm2_output_geometry_get(output, >config.geom.x, - >config.geom.y, NULL, NULL); - ecore_drm2_output_crtc_size_get(output, >config.geom.w, - >config.geom.h); - ecore_drm2_output_resolution_get(output, - >config.mode.w, - >config.mode.h, - ); - + ecore_drm2_output_info_get(output, + >config.geom.x, + >config.geom.y, + >config.mode.w, + >config.mode.h, + ); + s->config.mode.w = s->config.geom.w; + s->config.mode.h = s->config.geom.h; s->config.mode.refresh = refresh; s->config.enabled = ((s->config.mode.w != 0) && (s->config.mode.h != 0)); @@ -548,7 +547,7 @@ _drm2_randr_apply(void) if (!ecore_drm2_output_enabled_get(output)) continue; if (ecore_drm2_output_cloned_get(output)) continue; -ecore_drm2_output_geometry_get(output, NULL, NULL, , ); +ecore_drm2_output_info_get(output, NULL, NULL, , , NULL); pw += MAX(pw, ow); ph = MAX(ph, oh); } --
[EGIT] [core/efl] efl-1.20 01/01: ecore_drm2: Fix linker problems
derekf pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=963fedcea7ee43f20089deb17b93790ede139178 commit 963fedcea7ee43f20089deb17b93790ede139178 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 4 12:13:40 2017 -0500 ecore_drm2: Fix linker problems Accidentally used functions in the library directly instead of through the sym_* dlsym looked-up variants. Why this only caused problems in some installations may still be worth investigating - we may be pulling in libdrm at link time from some other library? --- src/lib/ecore_drm2/ecore_drm2_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 446230edb9..3545d1a299 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -77,7 +77,7 @@ _drm2_device_modeset_capable(int fd) int ret = EINA_TRUE; drmModeRes *res; - res = drmModeGetResources(fd); + res = sym_drmModeGetResources(fd); if (!res) return EINA_FALSE; @@ -86,7 +86,7 @@ _drm2_device_modeset_capable(int fd) res->count_encoders <= 0) ret = EINA_FALSE; - drmModeFreeResources(res); + sym_drmModeFreeResources(res); return ret; } --
[EGIT] [core/efl] master 01/01: ecore_drm2: Fix linker problems
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bc5ebd0a20ea656c5cd232b2a130140ad1d9d927 commit bc5ebd0a20ea656c5cd232b2a130140ad1d9d927 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Aug 4 12:13:40 2017 -0500 ecore_drm2: Fix linker problems Accidentally used functions in the library directly instead of through the sym_* dlsym looked-up variants. Why this only caused problems in some installations may still be worth investigating - we may be pulling in libdrm at link time from some other library? --- src/lib/ecore_drm2/ecore_drm2_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 446230edb9..3545d1a299 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -77,7 +77,7 @@ _drm2_device_modeset_capable(int fd) int ret = EINA_TRUE; drmModeRes *res; - res = drmModeGetResources(fd); + res = sym_drmModeGetResources(fd); if (!res) return EINA_FALSE; @@ -86,7 +86,7 @@ _drm2_device_modeset_capable(int fd) res->count_encoders <= 0) ret = EINA_FALSE; - drmModeFreeResources(res); + sym_drmModeFreeResources(res); return ret; } --
[EGIT] [core/efl] master 01/01: ecore_drm2: Stop making dumb fbs and mmapping for gbm fds
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=acc76cadd3b10e882d3bb1b82fb96ee58fce2b71 commit acc76cadd3b10e882d3bb1b82fb96ee58fce2b71 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Jul 31 11:12:05 2017 -0500 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. --- src/lib/ecore_drm2/ecore_drm2_fb.c | 12 1 file changed, 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: EAPI Ecore_Drm2_Fb * ecore_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) { - struct drm_mode_map_dumb marg; Ecore_Drm2_Fb *fb; - int ret; EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), NULL); @@ -125,16 +123,6 @@ ecore_drm2_fb_gbm_create(int fd, int width, int height, int depth, int bpp, unsi goto err; } } - - /* mmap it if we can so screenshots are easy */ - memset(, 0, sizeof(struct drm_mode_map_dumb)); - marg.handle = fb->handles[0]; - ret = sym_drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, ); - if (!ret) - { -fb->mmap = mmap(NULL, fb->sizes[0], PROT_WRITE, MAP_SHARED, fd, marg.offset); -if (fb->mmap == MAP_FAILED) fb->mmap = NULL; - } return fb; err: --
[EGIT] [core/efl] master 01/01: ecore_drm2: Remove dead code in blank time get
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=df658a6d152c9211bce5754c0606192d5c078463 commit df658a6d152c9211bce5754c0606192d5c078463 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Jul 31 10:57:56 2017 -0500 ecore_drm2: Remove dead code in blank time get When I added the fallback block I left an if statement that could never evaluate to true. Remove it. --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index ffd7a40d93..a6e84ee268 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1652,7 +1652,6 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s if (ret) return EINA_FALSE; return EINA_TRUE; } - if (ret) return EINA_FALSE; if (v.reply.tval_sec < 0) return EINA_FALSE; if (v.reply.tval_usec < 0) return EINA_FALSE; --
[EGIT] [core/efl] master 01/01: wayland-shm: Set CLOEXEC for dmabuf
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d4e69af38347db96190cd126198a146057b9a420 commit d4e69af38347db96190cd126198a146057b9a420 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Jul 31 10:55:47 2017 -0500 wayland-shm: Set CLOEXEC for dmabuf Stop leaking the render node fd to child processes. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 63e54a4999..ca253ce609 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -314,7 +314,7 @@ _buffer_manager_get(void) buffer_manager = calloc(1, sizeof(Buffer_Manager)); if (!buffer_manager) goto err_alloc; - fd = open("/dev/dri/renderD128", O_RDWR); + fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC); if (fd < 0) goto err_drm; success = _intel_buffer_manager_setup(fd); --
[EGIT] [core/efl] master 01/01: ecore_evas_drm: Only check for gpu time offset if env var set
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1a175cd53796fcbc8c8c5c181b6465e063780c47 commit 1a175cd53796fcbc8c8c5c181b6465e063780c47 Author: Derek Foreman <der...@osg.samsung.com> Date: Sat Jul 29 08:52:16 2017 -0500 ecore_evas_drm: Only check for gpu time offset if env var set Since most systems shouldn't need this, and it's possible that it's causing trouble for some systems, make it off by default. Fix T5806 --- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index ac70498e20..35cd8d83a1 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -833,6 +833,11 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo return NULL; } + if (!getenv("ECORE_EVAS_DRM_GPU_CLOCK_WRONG")) + { +edata->once = EINA_TRUE; +edata->offset = 0.0; + } edata->x = x; edata->y = y; edata->w = w; --
[EGIT] [core/efl] master 01/01: elput: Fix synthetic relative motion events based on abs events
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=33439865de327c5bac1c9a531070514e63fe3a04 commit 33439865de327c5bac1c9a531070514e63fe3a04 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 28 16:48:38 2017 -0500 elput: Fix synthetic relative motion events based on abs events libinput won't actually give us this info, and logs an error instead. We can't synthesize based on pointer position due to pointer warping. So we must track abs reports and use previous abs reports to synthesize rel events. --- src/lib/elput/elput_evdev.c | 30 +++--- src/lib/elput/elput_private.h | 2 ++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 454b4a85de..1199a09798 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -881,6 +881,23 @@ _pointer_motion_send(Elput_Device *edev) } static void +_pointer_motion_relative_fake(struct libinput_event_pointer *event, double dx, double dy) +{ + Elput_Event_Pointer_Motion *ev; + + ev = calloc(1, sizeof(Elput_Event_Pointer_Motion)); + EINA_SAFETY_ON_NULL_RETURN(ev); + + ev->time_usec = libinput_event_pointer_get_time_usec(event); + ev->dx = dx; + ev->dy = dy; + ev->dx_unaccel = dx; + ev->dy_unaccel = dy; + + ecore_event_add(ELPUT_EVENT_POINTER_MOTION, ev, NULL, NULL); +} + +static void _pointer_motion_relative(struct libinput_event_pointer *event) { Elput_Event_Pointer_Motion *ev; @@ -937,6 +954,7 @@ _pointer_motion_abs(struct libinput_device *idev, struct libinput_event_pointer { Elput_Device *edev; Elput_Pointer *ptr; + double x, y; edev = libinput_device_get_user_data(idev); if (!edev) return EINA_FALSE; @@ -944,16 +962,22 @@ _pointer_motion_abs(struct libinput_device *idev, struct libinput_event_pointer ptr = _evdev_pointer_get(edev->seat); if (!ptr) return EINA_FALSE; - ptr->seat->pointer.x = + x = edev->absx; + edev->absx = libinput_event_pointer_get_absolute_x_transformed(event, edev->ow); - ptr->seat->pointer.y = + ptr->seat->pointer.x = edev->absx; + + y = edev->absy; + edev->absy = libinput_event_pointer_get_absolute_y_transformed(event, edev->oh); + ptr->seat->pointer.y = edev->absy; + ptr->timestamp = libinput_event_pointer_get_time(event); /* TODO: these needs to run a matrix transform based on output */ _pointer_motion_send(edev); - _pointer_motion_relative(event); + _pointer_motion_relative_fake(event, edev->absx - x, edev->absy - y); return EINA_TRUE; } diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h index 709871c368..f5bc425182 100644 --- a/src/lib/elput/elput_private.h +++ b/src/lib/elput/elput_private.h @@ -231,6 +231,8 @@ struct _Elput_Device uint32_t ow, oh; + double absx, absy; + const char *path; const char *output_name; struct libinput_device *device; --
[EGIT] [core/efl] master 01/02: ecore_drm2: Add a fallback method for vblank waiting
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0584fc81a2960c47426560fa52bab675b10527b5 commit 0584fc81a2960c47426560fa52bab675b10527b5 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 28 15:25:25 2017 -0500 ecore_drm2: Add a fallback method for vblank waiting We can't depend on vblank waits being implemented by the driver, but we can count on page flips functioning, so add a fallback that does a page flip and waits for it. --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 49 + src/lib/ecore_drm2/ecore_drm2_private.h | 2 ++ 2 files changed, 51 insertions(+) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index fba4be0c8d..85504a0d6d 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1583,6 +1583,49 @@ ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output) return output->subpixel; } +static void +_blank_fallback_handler(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec, unsigned int usec, void *data EINA_UNUSED) +{ + Ecore_Drm2_Output *output; + + output = data; + output->fallback_usec = usec; + output->fallback_sec = sec; +} +static int +_blanktime_fallback(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec) +{ + drmEventContext ctx; + int ret; + + /* Too lazy to loop for > 1, and don't want to block for < 1 */ + if (sequence != 1) return -1; + + /* If we got here with a flip waiting to complete we can do nothing. */ + if (output->pending.fb) return -1; + + if (!output->current.fb) return -1; + + memset(, 0, sizeof(ctx)); + ctx.version = 2; + ctx.page_flip_handler = _blank_fallback_handler; + ctx.vblank_handler = NULL; + + ret = sym_drmModePageFlip(output->current.fb->fd, output->crtc_id, + output->current.fb->id, DRM_MODE_PAGE_FLIP_EVENT, + output); + if (ret < 0) return -1; + do + { +ret = sym_drmHandleEvent(output->current.fb->fd, ); + } while (ret != 0 && errno == EAGAIN); + if (ret < 0) return -1; + + *sec = output->fallback_sec; + *usec = output->fallback_usec; + return 0; +} + EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec) { @@ -1597,6 +1640,12 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s v.request.type = DRM_VBLANK_RELATIVE; v.request.sequence = sequence; ret = sym_drmWaitVBlank(output->fd, ); + if (ret) +{ + ret = _blanktime_fallback(output, sequence, sec, usec); + if (ret) return EINA_FALSE; + return EINA_TRUE; +} if (ret) return EINA_FALSE; if (v.reply.tval_sec < 0) return EINA_FALSE; if (v.reply.tval_usec < 0) return EINA_FALSE; diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index c8c2bf66c2..a85cb0c2d5 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h @@ -209,6 +209,8 @@ struct _Ecore_Drm2_Output int pipe; int x, y, w, h, pw, ph; + long fallback_sec, fallback_usec; + uint32_t subpixel; uint32_t crtc_id, conn_id, conn_type; uint32_t scale; --
[EGIT] [core/efl] master 02/02: ecore_evas_drm: Calculate gpu blank time offset once at startup
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2b16fc4278adfdf471c5ea488c08daeb96400a9a commit 2b16fc4278adfdf471c5ea488c08daeb96400a9a Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 28 15:24:30 2017 -0500 ecore_evas_drm: Calculate gpu blank time offset once at startup So vmware's graphics driver reports the MONOTONIC drm cap, yet uses CLOCK_REALTIME instead. This leaves us with a gigantic offset between the gpu timestamp and the times ecore_time_get() gets from CLOCK_MONOTONIC. Since ticking screws directly with loop time this results in some long distance clock jumping. This commit fixes drm/gl_drm operation under vmware. --- .../ecore_evas/engines/drm/ecore_evas_drm.c| 35 +- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 302048c3b9..ac70498e20 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -54,6 +54,7 @@ typedef struct _Ecore_Evas_Engine_Drm_Data int x, y, w, h; int depth, bpp; unsigned int format; + double offset; Ecore_Drm2_Context ctx; Ecore_Fd_Handler *hdlr; Ecore_Drm2_Device *dev; @@ -61,6 +62,7 @@ typedef struct _Ecore_Evas_Engine_Drm_Data Evas_Device *seat; Eina_Bool pending : 1; Eina_Bool ticking : 1; + Eina_Bool once : 1; } Ecore_Evas_Engine_Drm_Data; static int _drm_init_count = 0; @@ -623,7 +625,8 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se { double t = (double)sec + ((double)usec / 100); -ecore_evas_animator_tick(ee, NULL, t); +if (!edata->once) t = ecore_time_get(); +ecore_evas_animator_tick(ee, NULL, t - edata->offset); } else if (ret) { @@ -650,13 +653,43 @@ _drm_evas_changed(Ecore_Evas *ee, Eina_Bool changed) static void _drm_animator_register(Ecore_Evas *ee) { + double t; + long sec, usec; Ecore_Evas_Engine_Drm_Data *edata; + Eina_Bool r; if (ee->manual_render) ERR("Attempt to schedule tick for manually rendered canvas"); edata = ee->engine.data; edata->ticking = EINA_TRUE; + + /* Some graphics stacks appear to lie about their clock sources +* so attempt to measure the difference between our clock and the +* GPU's source of timestamps once at startup and apply that. +* If it's tiny, just assume they're the same clock and it's +* measurement error. +* +* what happen when you suspend ? +* what about drift ? +* +* If someone could relay the message to cedric that I'm not +* talking to him anymore, that would be helpful. +*/ + if (!edata->once) + { +r = ecore_drm2_output_blanktime_get(edata->output, 1, , ); +if (r) + { + t = (double)sec + ((double)usec / 100.0); + edata->offset = t - ecore_time_get(); + if (fabs(edata->offset) < 0.010) + edata->offset = 0.0; + + edata->once = EINA_TRUE; + } + } + if (!edata->pending && !ee->in_async_render) { edata->pending = EINA_TRUE; --
[EGIT] [core/enlightenment] enlightenment-0.21 16/48: Don't block wayland client updates during screen saver fade out
discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=34b3b41ebddff6c9e5a1b73fa891beb0259861cf commit 34b3b41ebddff6c9e5a1b73fa891beb0259861cf Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Jul 18 14:02:36 2017 -0500 Don't block wayland client updates during screen saver fade out We stop allowing client updates when the screensaver is on to save power, however this happens at the start of the fade-out. On wayland this stops any visible client change. If we wait until after the canvas is set to manual render instead then we get similar benefit but don't lose display updates while they're still visible. Fix T5714 --- src/bin/e_comp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 02635b8a8..da1a5d7ba 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -320,7 +320,8 @@ _e_comp_client_update(E_Client *ec) e_comp_object_render_update_add(ec->frame); } } - if ((!e_comp->saver) && e_pixmap_size_get(ec->pixmap, , )) + if (!(e_comp->saver && ecore_evas_manual_render_get(e_comp->ee)) && + e_pixmap_size_get(ec->pixmap, , )) { //INF("PX DIRTY: PX(%dx%d) CLI(%dx%d)", pw, ph, ec->client.w, ec->client.h); e_pixmap_image_refresh(ec->pixmap); --
[EGIT] [core/enlightenment] enlightenment-0.21 28/48: Fix geometry for drm outputs
discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ff915f92f25d30a7480cdc4c326399ee373e8d8d commit ff915f92f25d30a7480cdc4c326399ee373e8d8d Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Jul 27 15:20:32 2017 -0500 Fix geometry for drm outputs It appears that config.geom.x and config.geom.y specify the corner of an output in global space, but ecore_drm2_output_mode_set's x and y are offsets into the framebuffer for the corner of the display. Just pass 0, 0 and everything will be ok. --- src/modules/wl_drm/e_mod_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 12f69da23..602e10f9c 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -622,8 +622,7 @@ _drm2_randr_apply(void) if (s->config.priority > top_priority) top_priority = s->config.priority; -ecore_drm2_output_mode_set(output, mode, - s->config.geom.x, s->config.geom.y); +ecore_drm2_output_mode_set(output, mode, 0, 0); /* TODO: cannot support rotations until we support planes * and we cannot support planes until Atomic support is in */ --
[EGIT] [core/enlightenment] enlightenment-0.21 05/48: Fix xwayland selection crash
discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7ce0a2272976df53ce190a5672bb5604cc2a008a commit 7ce0a2272976df53ce190a5672bb5604cc2a008a Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 14 15:56:24 2017 -0500 Fix xwayland selection crash When creating the data manager source, passing an id of 1 overwrites the wl_display's id in the map, causing crashes the next time the client tries to interact with that object. The client in this case is Xwayland. Bad things happen. Instead pass 0 which just chooses an available map slot. Fix T5738 --- src/modules/xwayland/dnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/xwayland/dnd.c b/src/modules/xwayland/dnd.c index 505440352..391b7b1cf 100644 --- a/src/modules/xwayland/dnd.c +++ b/src/modules/xwayland/dnd.c @@ -212,7 +212,7 @@ _xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Even e_comp_wl_data_device_send_enter(e_comp_wl->ptr.ec); e_comp_canvas_feed_mouse_up(0); source = e_comp_wl_data_manager_source_create(e_comp_wl->xwl_client, - e_comp_wl->mgr.resource, 1); + e_comp_wl->mgr.resource, 0); e_comp_wl->drag_source = source; source->target = _xwayland_target_send; source->send = _xwayland_send_send; @@ -270,7 +270,7 @@ _xwl_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Event_Sele source = e_comp_wl_clipboard_source_create(NULL, 0, -1); dsource = e_comp_wl_data_manager_source_create(e_comp_wl->xwl_client, - e_comp_wl->mgr.resource, 1); + e_comp_wl->mgr.resource, 0); source->data_source.mime_types = eina_array_new(tgs->num_targets); for (i = 0; i < tgs->num_targets; i++) if (tgs->targets[i]) --
[EGIT] [core/efl] master 01/01: ecore_drm2: Allow picking a sequence number for blanktime_get
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8e500c683549e8d3afe78657c4582560a5c75eba commit 8e500c683549e8d3afe78657c4582560a5c75eba Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 28 09:40:40 2017 -0500 ecore_drm2: Allow picking a sequence number for blanktime_get This lets us do a blocking wait for a vsync. Something we should try to do as infrequently as possible, but in some cases we need it one time at startup to catch graphics driver bugs. --- src/lib/ecore_drm2/Ecore_Drm2.h | 9 +++-- src/lib/ecore_drm2/ecore_drm2_outputs.c | 3 ++- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 4be533bc66..450f1faa0c 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -1079,15 +1079,20 @@ EAPI void ecore_drm2_fb_status_handler_set(Ecore_Drm2_Fb *fb, Ecore_Drm2_Fb_Stat /** * Get the time of the last vblank * - * Query the display hardware for the time of the last vblank. + * Query the display hardware for the time of a vblank, potentially blocking. + * + * If sequence is 0 the time of the last vblank will be immediately returned, + * if it's above zero that number of vblanks will pass before the function + * returns. * * @param output + * @param sequence * @param sec * @param usec * * @since 1.20 */ -EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, long *sec, long *usec); +EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec); # endif diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index d2b3acb54b..fba4be0c8d 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1584,7 +1584,7 @@ ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output) } EAPI Eina_Bool -ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, long *sec, long *usec) +ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec) { drmVBlank v; int ret; @@ -1595,6 +1595,7 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, long *sec, long *usec memset(, 0, sizeof(v)); v.request.type = DRM_VBLANK_RELATIVE; + v.request.sequence = sequence; ret = sym_drmWaitVBlank(output->fd, ); if (ret) return EINA_FALSE; if (v.reply.tval_sec < 0) return EINA_FALSE; diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index dd46ce00d0..302048c3b9 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -680,7 +680,7 @@ _drm_last_tick_get(Ecore_Evas *ee) long sec, usec; edata = ee->engine.data; - if (!ecore_drm2_output_blanktime_get(edata->output, , )) + if (!ecore_drm2_output_blanktime_get(edata->output, 0, , )) return -1.0; return sec + usec / 100.0; --
[EGIT] [core/enlightenment] master 01/01: Fix geometry for drm outputs
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=fbceceff5a1c0fc5490d1d5c8309a0d4e7b19aa7 commit fbceceff5a1c0fc5490d1d5c8309a0d4e7b19aa7 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Jul 27 15:20:32 2017 -0500 Fix geometry for drm outputs It appears that config.geom.x and config.geom.y specify the corner of an output in global space, but ecore_drm2_output_mode_set's x and y are offsets into the framebuffer for the corner of the display. Just pass 0, 0 and everything will be ok. --- src/modules/wl_drm/e_mod_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 38c02097b..577d4db15 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -579,8 +579,7 @@ _drm2_randr_apply(void) if (s->config.priority > top_priority) top_priority = s->config.priority; -ecore_drm2_output_mode_set(output, mode, - s->config.geom.x, s->config.geom.y); +ecore_drm2_output_mode_set(output, mode, 0, 0); /* TODO: cannot support rotations until we support planes * and we cannot support planes until Atomic support is in */ --
[EGIT] [core/efl] master 01/01: elput: Close fds when asked to
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=69c6cbfdf19c032f32cbf7d39e2136856ceea5b1 commit 69c6cbfdf19c032f32cbf7d39e2136856ceea5b1 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Jul 25 16:51:21 2017 -0500 elput: Close fds when asked to Our close callback tells logind we're done with a device, but it should also actually close the fd it's passed, or we end up leaking piles of fds on VC switch. see weston commit 8f5acc2f3a29c3831af4ddd6bed57f703c98dc77 and subsequent regression in commit 72dea06d7952e3ce8dd8057f7106186da4fa2678 and pending fix in https://patchwork.freedesktop.org/patch/168992/ --- src/lib/elput/elput_logind.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index 91eaffcbda..842de225e8 100644 --- a/src/lib/elput/elput_logind.c +++ b/src/lib/elput/elput_logind.c @@ -649,6 +649,7 @@ _logind_close(Elput_Manager *em, int fd) int ret; ret = fstat(fd, ); + close(fd); if (ret < 0) return; if (!S_ISCHR(st.st_mode)) return; --
Re: [E-devel] Server down
at, 15 Jul 2017 23:32:25 + Andrew Williams < a...@andywilliams.me> said: Hi, After an hour of trying to get through to our git server I'm now giving up for the night. I understand that there is an unknown problem that needs to be gotten to the bottom of but I don't understand why those who were able to help no longer have access. Can someone in the know please communicate what is going on? I know that we are getting our hosting provided kindly for free but There are so many free hosting solutions for open source projects I don't get it - we were afraid of the stability of "the new sourceforge" but GitHub, despite high criticism for its downtime, has been unavailable for barely 2 days over the last 2 years... do you have a proxy thing for git.e.org in your ssh config. i can get to git.e.org no problems. all weekend. i didn't have issues. my email was down though (separate issue)... Andy On Sat, 15 Jul 2017 at 22:41, jaquilina < jaquil...@eagleeyet.net wrote: All I know is that beber adding my ssh key to the system and reencrypted the credentials store which could be the root cause of these issues with git over ssh Sent from Samsung tablet. Original message From: Andrew Williams <a...@andywilliams.me> Date: 15/07/2017 22:59 (GMT+01:00) To: Jonathan Aquilina <jaquil...@eagleeyet.net , Enlightenment developer list < enlightenment-devel@lists.sourceforge.net> Subject: Re: [E-devel] Server down Correction, for git I'm getting either connection closed or permission denied... every 5th or so connection makes it through. On Sat, 15 Jul 2017 at 20:46, Andrew Williams < a...@andywilliams.me> wrote: Hi, Thanks to whoever prodded it. Now git and web are working again. I use git+ssh and it is working OK (on and off actually) but I can't get in through ssh any more. Bu5hm4n and others have noted the same thing. Have permissions on SSH been altered? Thanks, Andy On Sat, 15 Jul 2017 at 15:06 Jonathan Aquilina < jaquil...@eagleeyet.net> wrote: I think that it might be worth contacting the hosting provider as I am wondering if they are doing something with their network hardware or maybe something that is causing our server to really not be happy. --- Regards, Jonathan Aquilina On 2017-07-15 15:59, Derek Foreman wrote: Somewhat related, I've been monitoring the server with "smokeping" for a few weeks now, and the majority of the blackouts start between 5AM and 5:10AM north american central time (10ish UTC I guess?) Sometimes they clear in under an hour (I don't know if this is an automatic recovery or manual intervention). During the blackouts generally the git server is partially responsive and the web server is completely borked. Today's blackout started between 5:00AM and 5:10AM CST. Currently the git server is semi responsive and the web server is hosed. I don't know if that gives any useful input into tracking down what's knocking over the house of cards (or if knowing what's knocking it over is even useful), but there ya go. :D Thanks, Derek On 2017-07-15 05:26 AM, Andrew Williams wrote: Hi, That's the server keeled over again. I would fix it but today it's rejecting my login. Can someone please help, I was in the middle of a bunch of work on docuwiki that I would like to complete? Thanks, Andy -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- http://andywilliams.me http://ajwillia.ms -- http://andywilliams.me http://ajwillia.ms -- http://andywilliams.me http://ajwillia.ms -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler) ras...@rasterman.com -- http://andywilliams.me http://ajwillia.ms -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailin
[EGIT] [core/efl] master 01/01: elput: Fix multiple open/close of drm devices
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=27f88b534a4a630db4d57814d9c6d8a3d2d8f512 commit 27f88b534a4a630db4d57814d9c6d8a3d2d8f512 Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Jul 24 16:03:10 2017 -0500 elput: Fix multiple open/close of drm devices When I added the code to probe drm devices to ensure they're modeset capable (ref 414d406b3b442216543cdaef112787696ae09898) I didn't realize elput didn't allow us to open and close more than one drm device at startup without blowing up libinput. This is a somewhat dirty hack to rough that in. The problem is that open/close the device during startup will result in an async "gone" callback from logind, which then kicks off an input shutdown. We need to try harder to only do that shutdown when it makes sense. --- src/lib/elput/elput_logind.c | 18 ++ src/lib/elput/elput_private.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index aa9006e5bb..91eaffcbda 100644 --- a/src/lib/elput/elput_logind.c +++ b/src/lib/elput/elput_logind.c @@ -84,6 +84,7 @@ _cb_device_paused(void *data, const Eldbus_Message *msg) uint32_t maj, min; em = data; + if (!em->drm_opens) return; if (eldbus_message_error_get(msg, , )) { @@ -93,6 +94,20 @@ _cb_device_paused(void *data, const Eldbus_Message *msg) if (eldbus_message_arguments_get(msg, "uus", , , )) { +/* If we opened a device during probing then we're still going + * to get a "gone" callback when we release it, so we'd better + * eat that instead of treating it like losing the drm device + * we currently have open, and crapping up libinput's internals + * for a nice deferred explosion at shutdown... + * + * FIXME: do this better? + */ +if ((em->drm_opens > 1) && (maj == 226) && !strcmp(type, "gone")) + { + em->drm_opens--; + return; + } + if (!strcmp(type, "pause")) _logind_device_pause_complete(em, maj, min); @@ -607,6 +622,9 @@ _logind_open(Elput_Manager *em, const char *path, int flags) fd = _logind_device_take(em, major(st.st_rdev), minor(st.st_rdev)); if (fd < 0) return fd; + if (major(st.st_rdev) == 226) //DRM_MAJOR + em->drm_opens++; + fl = fcntl(fd, F_GETFL); if (fl < 0) goto err; diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h index 5b38c14ab6..709871c368 100644 --- a/src/lib/elput/elput_private.h +++ b/src/lib/elput/elput_private.h @@ -279,6 +279,8 @@ struct _Elput_Manager } cached; int output_w, output_h; + int drm_opens; + Elput_Input input; Eina_Bool del : 1; }; --
[EGIT] [core/efl] master 01/02: ecore_drm2: Open elput manager before drm device
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=57e826db69bc02ab6b779a5d65b278f0288bf718 commit 57e826db69bc02ab6b779a5d65b278f0288bf718 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 16:36:06 2017 -0500 ecore_drm2: Open elput manager before drm device We're going to need to access the device as part of the find process, so we need a manager. --- src/lib/ecore_drm2/ecore_drm2_device.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index bc3eca0d0d..5552eebd47 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -570,13 +570,6 @@ ecore_drm2_device_find(const char *seat, unsigned int tty) dev = calloc(1, sizeof(Ecore_Drm2_Device)); if (!dev) return NULL; - dev->path = _drm2_device_find(seat); - if (!dev->path) - { -ERR("Could not find drm device on seat %s", seat); -goto path_err; - } - dev->em = elput_manager_connect(seat, tty); if (!dev->em) { @@ -584,11 +577,18 @@ ecore_drm2_device_find(const char *seat, unsigned int tty) goto man_err; } + dev->path = _drm2_device_find(dev->em, seat); + if (!dev->path) + { +ERR("Could not find drm device on seat %s", seat); +goto path_err; + } + return dev; -man_err: - eina_stringshare_del(dev->path); path_err: + elput_manager_disconnect(dev->em); +man_err: free(dev); return NULL; } --
[EGIT] [core/efl] master 02/02: ecore_drm2: Ensure device we find can mode set
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=414d406b3b442216543cdaef112787696ae09898 commit 414d406b3b442216543cdaef112787696ae09898 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 16:40:17 2017 -0500 ecore_drm2: Ensure device we find can mode set Some systems have dri devices that can't mode set, and if they're first in the directory they'll get picked by our code and things fall apart later. So, open the potential device and ensure it has basic functionality before selecting it. This is a little inefficient as it gets the device via elput twice before it can be used - this will be addressed later as the changes are a little more invasive to optimize. --- src/lib/ecore_drm2/ecore_drm2_device.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 5552eebd47..446230edb9 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -71,13 +71,35 @@ _cb_device_change(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_RENEW; } +static Eina_Bool +_drm2_device_modeset_capable(int fd) +{ + int ret = EINA_TRUE; + drmModeRes *res; + + res = drmModeGetResources(fd); + if (!res) + return EINA_FALSE; + + if (res->count_crtcs <= 0 || + res->count_connectors <= 0 || + res->count_encoders <= 0) + ret = EINA_FALSE; + + drmModeFreeResources(res); + + return ret; +} + static const char * -_drm2_device_find(const char *seat) +_drm2_device_find(Elput_Manager *em, const char *seat) { Eina_List *devs, *l; const char *dev, *ret = NULL; Eina_Bool found = EINA_FALSE; Eina_Bool platform = EINA_FALSE; + Eina_Bool modeset; + int fd; devs = eeze_udev_find_by_subsystem_sysname("drm", "card[0-9]*"); if (!devs) return NULL; @@ -97,6 +119,14 @@ _drm2_device_find(const char *seat) else if (strcmp(dseat, "seat0")) goto cont; +fd = elput_manager_open(em, dpath, -1); +if (fd < 0) + goto cont; +modeset = _drm2_device_modeset_capable(fd); +elput_manager_close(em, fd); +if (!modeset) + goto cont; + dparent = eeze_udev_syspath_get_parent_filtered(dev, "pci", NULL); if (!dparent) { --
[EGIT] [core/efl] master 01/01: gl_drm: half fix eglGetPlatformDisplayEXT usage
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=736c63be3449c34678cd4f875b0f41105bb827c7 commit 736c63be3449c34678cd4f875b0f41105bb827c7 Author: Derek Foreman <der...@osg.samsung.com> Date: Fri Jul 21 14:00:51 2017 -0500 gl_drm: half fix eglGetPlatformDisplayEXT usage Just because the #define is present doesn't mean the extension is, so we're BAILing on egl completely on some systems for no good reason at all. (saw this on an SGX stack) This is still wrong. I don't want to try too hard until after the upcoming release, though. We should actually be testing for the presence of client extensions before attempting to do any of this. It's entirely possible that a gl stack will return bogus functions for these from eglGetProcAddress --- src/modules/evas/engines/gl_drm/evas_outbuf.c | 34 --- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index 642ac7ad0a..f51444ccb1 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -174,12 +174,13 @@ _evas_outbuf_init(void) static int _init = 0; if (_init) return EINA_TRUE; #ifdef EGL_MESA_platform_gbm + /* FIXME: Pretty sure we should be checking if EGL_EXT_platform_base +* exists before looking these up and trusting them? +*/ dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress("eglGetPlatformDisplayEXT"); - EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglGetPlatformDisplayEXT, EINA_FALSE); dlsym_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); - EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglCreatePlatformWindowSurfaceEXT, EINA_FALSE); #endif _init = 1; return EINA_TRUE; @@ -225,13 +226,16 @@ _evas_outbuf_egl_setup(Outbuf *ob) else cfg_attr[n++] = 0; cfg_attr[n++] = EGL_NONE; + ob->egl.disp = EGL_NO_DISPLAY; #ifdef EGL_MESA_platform_gbm - ob->egl.disp = - dlsym_eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, ob->info->info.gbm, NULL); -#else - ob->egl.disp = eglGetDisplay((EGLNativeDisplayType)ob->info->info.gbm); + if (dlsym_eglGetPlatformDisplayEXT) + ob->egl.disp = dlsym_eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, + ob->info->info.gbm, + NULL); #endif - if (ob->egl.disp == EGL_NO_DISPLAY) + if (ob->egl.disp == EGL_NO_DISPLAY) + ob->egl.disp = eglGetDisplay((EGLNativeDisplayType)ob->info->info.gbm); + if (ob->egl.disp == EGL_NO_DISPLAY) { ERR("eglGetDisplay() fail. code=%#x", eglGetError()); return EINA_FALSE; @@ -288,16 +292,18 @@ _evas_outbuf_egl_setup(Outbuf *ob) } } + ob->egl.surface = EGL_NO_SURFACE; #ifdef EGL_MESA_platform_gbm - ob->egl.surface = - dlsym_eglCreatePlatformWindowSurfaceEXT(ob->egl.disp, ob->egl.config, - ob->surface, NULL); -#else - ob->egl.surface = - eglCreateWindowSurface(ob->egl.disp, ob->egl.config, -(EGLNativeWindowType)ob->surface, NULL); + if (dlsym_eglCreatePlatformWindowSurfaceEXT) + ob->egl.surface = + dlsym_eglCreatePlatformWindowSurfaceEXT(ob->egl.disp, ob->egl.config, + ob->surface, NULL); #endif if (ob->egl.surface == EGL_NO_SURFACE) + ob->egl.surface = eglCreateWindowSurface(ob->egl.disp, ob->egl.config, + (EGLNativeWindowType)ob->surface, + NULL); + if (ob->egl.surface == EGL_NO_SURFACE) { ERR("eglCreateWindowSurface() fail for %p. code=%#x", ob->surface, eglGetError()); --
[EGIT] [core/efl] master 07/08: gl_common: Prefer unextended eglCreateImage
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0255f14dc2189c71776408b00307b8488bfa4dc5 commit 0255f14dc2189c71776408b00307b8488bfa4dc5 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Jul 19 12:24:19 2017 -0500 gl_common: Prefer unextended eglCreateImage eglCreateImage is objectively better than eglCreateImageKHR - it allows attributes large enough to hold pointer values. We should use it when available and only use the older extension version as fallback. Also, eglCreateImage is core EGL functionality so don't depend on extensions to be present to use it. Theoretically we should be testing for EGL version >= 1.5 but it's probably safe not to. --- src/modules/evas/engines/gl_common/evas_gl_context.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index 922ce62366..2ead3877d4 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -322,19 +322,14 @@ evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn EIN // wrong as this is not x11 (output) layer specific like the native surface // stuff. this is generic zero-copy textures for gl - FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image_base", secsym_func_void_ptr); - FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image", secsym_func_void_ptr); - if (eglsym_eglCreateImageKHR) + FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", NULL, secsym_func_void_ptr); + FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", NULL, secsym_func_uint); + if (!eglsym_eglCreateImage || !secsym_eglDestroyImage) { +eglsym_eglCreateImage = NULL; +secsym_eglDestroyImage = NULL; +FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image_base", secsym_func_void_ptr); FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image_base", secsym_func_uint); -FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image", secsym_func_uint); - } - else - { -FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_get_all_proc_addresses", secsym_func_void_ptr); -FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_void_ptr); -FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_get_all_proc_addresses", secsym_func_uint); -FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_uint); } FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", NULL, glsym_func_void); --
[EGIT] [core/efl] master 06/08: gl_common: Remove fallback hack for wayland
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d31f5038e2f72c35b0cf270148df4b81d249a206 commit d31f5038e2f72c35b0cf270148df4b81d249a206 Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Jul 19 12:04:29 2017 -0500 gl_common: Remove fallback hack for wayland This was only necessary due to bugs in the wayland_egl and gl_drm engine that have been corrected. Wayland has no bizarre requirements making this necessary. --- .../evas/engines/gl_common/evas_gl_context.c | 40 ++ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index 3595b07821..922ce62366 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -308,12 +308,11 @@ evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn EIN FINDSYM(glsym_glRenderbufferStorageMultisample, "glRenderbufferStorageMultisample", NULL, glsym_func_void); #ifdef GL_GLES - Eina_Bool dl_fallback = EINA_FALSE; #define FINDSYMN(dst, sym, ext, typ) do { \ if (!dst) { \ if (_has_extn(ext, extsn) && GetProcAddress) \ dst = (typ) GetProcAddress(sym); \ - if ((!dst) && dl_fallback) \ + if (!dst) \ dst = (typ) dlsym(RTLD_DEFAULT, sym); \ }} while (0) @@ -323,38 +322,19 @@ evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn EIN // wrong as this is not x11 (output) layer specific like the native surface // stuff. this is generic zero-copy textures for gl - if (extsn) + FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image_base", secsym_func_void_ptr); + FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image", secsym_func_void_ptr); + if (eglsym_eglCreateImageKHR) { -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image_base", secsym_func_void_ptr); -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image", secsym_func_void_ptr); -if (eglsym_eglCreateImageKHR) - { - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image_base", secsym_func_uint); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image", secsym_func_uint); - } -else - { - FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_get_all_proc_addresses", secsym_func_void_ptr); - FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_void_ptr); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_get_all_proc_addresses", secsym_func_uint); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_uint); - } +FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image_base", secsym_func_uint); +FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image", secsym_func_uint); } else { -// FIXME: this fl_fallback is a hack for wayland gl_drm to work -// :( -dl_fallback = EINA_TRUE; -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", NULL, secsym_func_void_ptr); -if (eglsym_eglCreateImageKHR) - { - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", NULL, secsym_func_uint); - } -else - { - FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", NULL, secsym_func_void_ptr); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", NULL, secsym_func_uint); - } +FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_get_all_proc_addresses", secsym_func_void_ptr); +FINDSYMN(eglsym_eglCreateImage, "eglCreateImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_void_ptr); +FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_get_all_proc_addresses", secsym_func_uint); +FINDSYMN(secsym_eglDestroyImage, "eglDestroyImage", "EGL_KHR_client_get_all_proc_addresses", secsym_func_uint); } FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", NULL, glsym_func_void); --
[EGIT] [core/efl] master 01/08: gl_common: Stop looking for eglCreate/DestroyImageOES
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=855f59da8d2f59dd64e9a7a0f84ea67f1d06fc73 commit 855f59da8d2f59dd64e9a7a0f84ea67f1d06fc73 Author: Derek Foreman <der...@osg.samsung.com> Date: Tue Jul 18 16:10:31 2017 -0500 gl_common: Stop looking for eglCreate/DestroyImageOES These aren't a thing. the GL_OES_EGL_image_base extension doesn't exist and the GL_OES_EGL_image extension doesn't extend egl, because it's a gl extension. So let's stop being the only google match for these nonsense strings. --- src/modules/evas/engines/gl_common/evas_gl_context.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index f4aaa2ede3..3595b07821 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -327,14 +327,10 @@ evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn EIN { FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image_base", secsym_func_void_ptr); FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", "EGL_KHR_image", secsym_func_void_ptr); -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageOES", "GL_OES_EGL_image_base", secsym_func_void_ptr); -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageOES", "GL_OES_EGL_image", secsym_func_void_ptr); if (eglsym_eglCreateImageKHR) { FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image_base", secsym_func_uint); FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", "EGL_KHR_image", secsym_func_uint); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageOES", "GL_OES_EGL_image_base", secsym_func_uint); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageOES", "GL_OES_EGL_image", secsym_func_uint); } else { @@ -350,11 +346,9 @@ evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn EIN // :( dl_fallback = EINA_TRUE; FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageKHR", NULL, secsym_func_void_ptr); -FINDSYMN(eglsym_eglCreateImageKHR, "eglCreateImageOES", NULL, secsym_func_void_ptr); if (eglsym_eglCreateImageKHR) { FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageKHR", NULL, secsym_func_uint); - FINDSYMN(secsym_eglDestroyImage, "eglDestroyImageOES", NULL, secsym_func_uint); } else { --