Commit Graph

130 Commits

Author SHA1 Message Date
Carsten Haitzler bdbd0f4753 e cpufreq - dont emit message for min/max/cur freq if they didnt change
saves some cpu when idile and polling cpu fre and finding nothing
changed.

@optimize
2016-12-04 22:42:47 +09:00
Stephen okra Houston 975366ba7b Cpufreq: Don't check for NULL then depend on the value not being NULL. Fixes CID 1365406 2016-11-23 09:59:29 -06:00
Carsten Haitzler d2104b23af cpufreq - move cpuinfo polling into thread to not block mainloop ever
on some devices asking the cpu for info like current frequency,
governors etc. seems to be expensive and if done in the mainloop can
block for multiple ms causing framerate hiccups, so move it to a
thread...
2016-11-03 10:21:22 +09:00
Carsten Haitzler 1b73bedd4d e mod: cpufreq - handle the case where cpu has zero freqs - dont crash
it can be that if you remove setuid bits on cpufreq binary we can end
up with zero freqs on bsd. this causes a crash.

@fix
2016-03-24 12:17:35 +09:00
Mike Blumenkrantz d6802e9c42 use uint instead of int for eina_list_count() return in cpufreq (trivial)
CID 1267212
2016-02-29 10:43:02 -05:00
Mike Blumenkrantz 82a320404c enforce pstate's extremely-confusing no_turbo option in cpufreq
fix T2411
2015-06-29 16:38:17 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Mike Blumenkrantz 09ec213a31 remove e_util_zone_current_get() usage 2015-03-13 17:58:45 -04:00
Takeshi Banse 6601c09f82 cpufreq: teach cpuinfo_{min,max}_freq as available frequencies
Summary:
The intel_pstate scaling driver exposes the `scaling_cur_freq` since
kernel 3.17 [*], it would be fine that the min and max frequencies
are known even without the `scaling_available_frequencie`.

This commit teaches to use the cpuinfo_{min,max}_freq as fallback in
case the `scaling_available_frequencies` is not available within
intel pstate.

[*] https://lkml.org/lkml/2014/11/11/1060

Signed-off-by: Takeshi Banse <takebi@laafc.net>

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1686
2014-11-29 16:39:42 +09:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Chris Michael 5bbedc3013 cpufreq: Fix duplicate structure name when including EGL headers
When we include support (in the wayland compositor) for compiling with
EGL, the inclusion of the EGL headers cause a conflict with the
Status structure name in this module, so lets rename it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-25 09:42:07 -04:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Carsten Haitzler 83e7883ec9 allow cpufreq config to be accessed without a gadget - pstate necessity 2013-08-24 19:22:39 +09:00
Carsten Haitzler d73e6036c9 oops - remove fprintf debug from cpufreq. 2013-05-23 21:19:17 +09:00
Chris Michael 3e487fb2c8 Actually, lets add a newline at the end also (since 'buf' does not
contain one).

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-22 17:31:31 +01:00
Chris Michael 51db96e202 Fix "warning: format not a string literal and no format arguments
[-Wformat-security]" compiler warning.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-22 17:30:36 +01:00
Carsten Haitzler 6b532aadad add intel pstate support in cpufreq for kernel 3.9 and newer. 2013-05-21 22:07:06 +09:00
Carsten Haitzler 4752435fe1 handle trailing newline from cpu governors so they get listed right. 2013-05-21 01:25:19 +09:00
Mike Blumenkrantz a069797887 fix cpufreq gadget menu popdown 2013-03-13 07:46:56 +00:00
Maxime Villard 4a52c46268 From: Maxime Villard <rustyBSD@gmx.fr>
Subject: [E-devel] [e][PATCH] Optimizations v2
Date: Fri, 21 Dec 2012 22:17:32 +0100

Hi,
same patch as before: removed useless nullchecks and
switched some free()'s to E_FREE().



SVN revision: 81592
2012-12-21 21:31:13 +00:00
Massimo Maiurana 60a8c29681 typo
SVN revision: 80978
2012-12-14 17:40:12 +00:00
Carsten Haitzler 47e53b259e provide some help for when pkgers mess up suid bits on freqset.
SVN revision: 80801
2012-12-13 09:02:20 +00:00
Carsten Haitzler 846a80bf77 and if the governer is not known.... give its raw string as fallback.
SVN revision: 80400
2012-12-06 22:22:01 +00:00
Carsten Haitzler b2a6b20336 ooh.. a new cpufreq governor i found! :) add it to a known list.
SVN revision: 80399
2012-12-06 22:13:15 +00:00
Mike Blumenkrantz 3eebf58116 from rustyBSD:
Hi,
 here is a patch for e/src/modules/cpufreq/e_mod_main.c

 I. _cpufreq_status_check_available() always returns 1,
    so moved to void.

 II. Don't need to 'buf[sizeof(buf) - 1] = 0;', as it's
     already done by snprintf.

 III. Stuff for OpenBSD.

 IV. Fixed files descriptors leaks, and removed useless
     code.

 thanks


SVN revision: 79203
2012-11-13 07:54:03 +00:00
Sebastian Dransfeld 427b6c34df e: Cleanup
Removes unused variables, drops duplicate return or break
     statements and drops unnecessary checks.

Patch by Igor Murzov

SVN revision: 77490
2012-10-04 23:26:48 +00:00
Vincent Torri 4e95bf3f20 E17: OpenBSD support of the cpufreq module
Patch by Maxime Villard (rustyBSD)


SVN revision: 77276
2012-10-01 17:40:43 +00:00
Mike Blumenkrantz 2434f5adbe more PATH_MAX cleanups
SVN revision: 75520
2012-08-22 07:32:12 +00:00
Mike Blumenkrantz 94e2fc5257 clean up gadget right click menus to stop leaking
SVN revision: 75285
2012-08-15 07:22:04 +00:00
Mike Blumenkrantz d17c66d771 formatting
SVN revision: 75284
2012-08-15 07:04:54 +00:00
Mike Blumenkrantz 98601e4198 sed -i 's/(E_Gadcon_Client_Class/(const E_Gadcon_Client_Class/g'
SVN revision: 74474
2012-07-27 08:25:22 +00:00
Chidambar Zinnoury ff5bfe6804 e cpufreq: float the frequency so that correct decimal separator could be automagically used.
SVN revision: 73866
2012-07-15 07:42:17 +00:00
Stefan Schmidt 494c51edf7 e/modules/cpufreq: Remove trailing white spaces while being here.
SVN revision: 72006
2012-06-12 10:02:01 +00:00
Stefan Schmidt d7cb6fe467 e/modules/cpufreq: Check the return of fgets to make sure we operate on something sane
If we get NULL as reply here the buf will not contain the stuff we are looking for.

SVN revision: 72005
2012-06-12 10:01:56 +00:00
Vincent Torri 9d9ce41db0 E17: fix some warning
SVN revision: 71233
2012-05-18 13:02:20 +00:00
Boris Faure 27264671d0 e/gadcon: label() returns a const char*
Original patch by Fabien Romano from OpenBSD

SVN revision: 65204
2011-11-14 21:46:57 +00:00
Hannes Janetzek 7f457f1911 e17: add option to have gadcon client settings menu in toplevel again.
added e_menu_item_new_relative(E_Menu, E_Menu_Item *rel) which appends 
 new item to rel or prepends it when rel is NULL.

changed e_gadcon_util_client_menu_append to to take only the gadget menu
 and returns the new toplevel menu that should be shown by gcc
 depending on the setting this is a new menu with gadget menu as submenu
 or the gadet_menu with gadget menu items appended

updated e-modules-extra comes in a minute


SVN revision: 57826
2011-03-17 17:08:36 +00:00
Hannes Janetzek 00045e3e5a fix my last commit
SVN revision: 57071
2011-02-15 21:39:01 +00:00
Christopher Michael 2c593b88e5 Init some vars to NULL so we don't get warning about uninitialized
vars from gcc during compile.



SVN revision: 57069
2011-02-15 21:17:48 +00:00
Hannes Janetzek 389182f55b cpufreq: dont bury options in subsub menu. button 1 shows cpu options menu now
SVN revision: 56885
2011-02-09 22:44:29 +00:00
Mike Blumenkrantz 3d166f4860 alloc checks
SVN revision: 55735
2010-12-23 01:10:48 +00:00
Carsten Haitzler d439ed5515 fix cpufreq poll - it kepts saying there is a new freq, making the
animator spin etc. etc.



SVN revision: 55533
2010-12-13 08:04:10 +00:00
Carsten Haitzler 6ba9d4926e happy lucky fun improvement in cpufreq gadget - dial moves smoothly
now... and uses map... like clock... and i added 2 more mini dialos
for min and max freq if u have multiple cores at differetn frequencies
:) red one now has a white tip for easier visbility and shows average
of all cores.



SVN revision: 55054
2010-11-29 10:52:32 +00:00
Carsten Haitzler e7d7304b0f gah! 1 cpu too many. fix.
SVN revision: 54561
2010-11-15 10:18:57 +00:00
Carsten Haitzler 3e706de451 slight improvement - average out freqs on all cores. some newer cpus
can have separate core freqs. dont get me started with this new turbo
boost thing that the kernel doesnt even report corrently right now
either.



SVN revision: 54546
2010-11-14 03:04:20 +00:00
Miculcy Brian 2f8f31fbf5 This commit will change the shelf menu completly:
If you have a Gadget and open the menu over it, all gadget specific options are under a separate submenu. The menu items which the Gadget sets theirself can be put on the main menu tree or on the Gadget submenu.
If you don't see a reason for this, check the ibar menu _before_ and _after_. :)

This api change broke all modules but i already fixed them all. Hope everything works... I also shortend text strings, etc, etc.
Hope you like it! :)


SVN revision: 52041
2010-09-09 14:44:21 +00:00
Lucas De Marchi 63f07459a0 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Christopher Michael f1e14daf84 Add UNUSED where needed.
Reduce duplicated code.
Use eina_stringshare_replace rather than add/del several times.



SVN revision: 51406
2010-08-19 15:38:22 +00:00
Lucas De Marchi 6638a10e20 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00