Re: [PATCH 1/3][RFC] devfreq: Core updates to support devices which can idle
Prepare devfreq core framework to support devices which can idle. When device idleness is detected perhaps through runtime-pm, need some mechanism to suspend devfreq load monitoring and resume when device is back online. Present code continues monitoring unless device is removed from devfreq core. This patch introduces following updates, - move device load monitoring logic to ondemand governor as it is specific to ondemand. We have this ondemand governor in the mainline devfreq. However, we have (not upstreamed yet) governors with specific purpose (for GPU or for a specific chip) with load monitoring logic. Although we don't have them upstreamed yet, why don't you keep the monitoring logic sharable by other governors. (From today, I'm not objecting to have individual workqueue, but I still don't want to let each active governor reimplement the same things.) - devfreq core interacts with governors via events to perform specific actions. These events include start/stop devfreq, and frequency limit changes outside devfreq. This sets ground for adding suspend/resume events. event_handler with START/STOP/UPDATE seem fine. However, init() and exit() should be different from START/STOP. We do not need to do init and exit every time when we do runtime suspend/resume. - use per device work instead of global work to monitor device load. This enables suspend/resume of device devfreq and reduces monitoring code complexity. It's fine to have a delayed work struct per device. However, please try to keep as many things/features in devfreq.c as possible; i.e., reduce features and code size of governors. Because, we will be supporting various types of devices with devfreq, there will be various governors and I don't want them to have shared things reimplemented. Dealing with the delayed work at devfreq.c and let governors choose to use it (at its struct) or not should be fine. In this patchset, the size of ondemand governor has been enlarged too much for that purpose. - Force devfreq users to set min/max supported frequencies in device profile to help governors to predict target frequecy with in limits. Is this really necessary? The devfreq apis are not modified and are kept intact. The ABIs are not. You can no longer do # echo 0 ABI_path in order to deactivate. Cheers! MyungJoo Signed-off-by: Rajagopal Venkat rajagopal.ven...@linaro.org --- ps. please make the patch a bit more readable. (please don't shuffle the location of pre-existed functions) ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP
Hi Sylwester On 19 August 2012 22:29, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi Sangwook, On 08/03/2012 04:24 PM, Sangwook Lee wrote: I was thinking about this, but this seems to be is a bit time-consuming because I have to do this just due to lack of s5k4ecgx hardware information. let me try it later once this patch is accepted. I've converted this driver to use function calls instead of the register arrays. It can be pulled, along with a couple of minor fixes/improvements, from following git tree: git://linuxtv.org/snawrocki/media.git s5k4ecgx (gitweb: http://git.linuxtv.org/snawrocki/media.git/s5k4ecgx) I don't own any Origen board thus it's untested. Could you give it a try ? Wow! Great, let me download from this git and then test. The register write sequence should be identical as in the case of using the arrays. You won't find much regarding the face detection features in V4L2, unfortunately. _Maybe_ I'll try to address this as well on some day, for now private controls might be your only solution. Unless you feel like adding face detection features support to V4L2.. ;) BTW, are your requirements to support both EVT1.0 and EVT1.1 S5K4ECGX revisions ? I have only EVT 1.1. So I have no chance to run EVT 1.0 version. Thanks Sangwook -- Regards, Sylwester ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 3/3][RFC] devfreq: Add current freq callback in device profile
Devfreq returns governor predicted frequency as current frequency via sysfs interface. But device may not support all frequencies that governor predicts. As per the design its driver responsibility to maintain current frequency at which device is operating. So add a callback in device profile to fix this. Signed-off-by: Rajagopal Venkat rajagopal.ven...@linaro.org We still need to support intended frequency. The cur_freq node is to show the intended frequency. As told before, you need to make additional API and ABI for the actual frequency. Cheers! MyungJoo --- drivers/devfreq/devfreq.c | 14 -- include/linux/devfreq.h | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 375b5aa1..798e8ca 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -176,7 +176,6 @@ struct devfreq *devfreq_add_device(struct device *dev, devfreq-dev.release = devfreq_dev_release; devfreq-profile = profile; devfreq-governor = governor; - devfreq-previous_freq = profile-initial_freq; devfreq-governor_data = data; devfreq-nb.notifier_call = devfreq_notifier_call; devfreq-min_freq = profile-min_freq; @@ -272,7 +271,18 @@ static ssize_t show_governor(struct device *dev, static ssize_t show_freq(struct device *dev, struct device_attribute *attr, char *buf) { - return sprintf(buf, %lu\n, to_devfreq(dev)-previous_freq); + int ret; + unsigned long freq; + struct devfreq *devfreq = to_devfreq(dev); + + if (devfreq-profile-get_cur_freq) { + ret = devfreq-profile-get_cur_freq(devfreq-dev.parent, + freq); + if (!ret) + return sprintf(buf, %lu\n, freq); + } + + return sprintf(buf, unknown); } static ssize_t store_min_freq(struct device *dev, struct device_attribute *attr, diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 7c6517f..43f111f 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -76,6 +76,8 @@ struct devfreq_dev_status { * explained above with DEVFREQ_FLAG_* macros. * @get_dev_status The device should provide the current performance * status to devfreq, which is used by governors. + * @get_cur_freq The device should provide the current frequency + * at which it is operating. * @exit An optional callback that is called when devfreq * is removing the devfreq object due to error or * from devfreq_remove_device() call. If the user @@ -91,6 +93,7 @@ struct devfreq_dev_profile { int (*target)(struct device *dev, unsigned long *freq, u32 flags); int (*get_dev_status)(struct device *dev, struct devfreq_dev_status *stat); + int (*get_cur_freq)(struct device *dev, unsigned long *freq); void (*exit)(struct device *dev); }; @@ -119,7 +122,6 @@ struct devfreq_governor { * @nb notifier block used to notify devfreq object that it should * reevaluate operable frequencies. Devfreq users may use * devfreq.nb to the corresponding register notifier call chain. - * @previous_freqpreviously configured frequency value. * @governor_dataPrivate data of the governor. The devfreq framework * does not touch this. * @min_freq Limit minimum frequency requested by user (0: none) @@ -142,8 +144,6 @@ struct devfreq { const struct devfreq_governor *governor; struct notifier_block nb; - unsigned long previous_freq; - void *governor_data; /* private data for governors */ unsigned long min_freq; -- 1.7.11.3 ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 2/3][RFC] devfreq: Add suspend and resume apis
This patch adds suspend and resume apis needed for devices which can idle. Suspend/resume apis are called from driver to suspend/resume devfreq load monitoring of that device. Signed-off-by: Rajagopal Venkat rajagopal.ven...@linaro.org 1. Some devfreq devices may need their own code to do suspend/resume; e.g., setting a specific frequency for suspend (especially with suspend-to-RAM). 2. Are these new APIs (devfreq_suspend/resume_device()) intended to be used by runtime_pm and pm(Suspend-to-RAM) callbacks of the parent devices? If so, could you consider use the structure of runtime-pm (I don't have an idea on how to do this for now)? For example, when a device is being suspended, devfreq device's suspend is also called without calling it explicitly at the device driver's suspend callback. 3. As in the patch 1/3, could you consider to integrate class-wide features in devfreq.c, not in a governor? Cheers! MyungJoo --- drivers/devfreq/devfreq.c | 30 ++ drivers/devfreq/governor_simpleondemand.c | 15 +++ include/linux/devfreq.h | 16 3 files changed, 61 insertions(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5aa23a8..375b5aa1 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -233,6 +233,36 @@ int devfreq_remove_device(struct devfreq *devfreq) } EXPORT_SYMBOL(devfreq_remove_device); +/** + * devfreq_suspend_device() - Suspend devfreq of a device. + * @devfreq the devfreq instance to be suspended + */ +int devfreq_suspend_device(struct devfreq *devfreq) +{ + if (!devfreq) + return -EINVAL; + + devfreq-governor-event_handler(devfreq, DEVFREQ_GOV_SUSPEND); + + return 0; +} +EXPORT_SYMBOL(devfreq_suspend_device); + +/** + * devfreq_resume_device() - Resume devfreq of a device. + * @devfreq the devfreq instance to be resumed + */ +int devfreq_resume_device(struct devfreq *devfreq) +{ + if (!devfreq) + return -EINVAL; + + devfreq-governor-event_handler(devfreq, DEVFREQ_GOV_RESUME); + + return 0; +} +EXPORT_SYMBOL(devfreq_resume_device); + static ssize_t show_governor(struct device *dev, struct device_attribute *attr, char *buf) { diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index 7c70c30..95e4db9 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -221,6 +221,21 @@ static int devfreq_simple_ondemand_func(struct devfreq *df, ondemand_exit(df); break; + case DEVFREQ_GOV_SUSPEND: + if (delayed_work_pending(data-work)) { + data-stop_queuing = true; + cancel_delayed_work_sync(data-work); + } + break; + + case DEVFREQ_GOV_RESUME: + if (!delayed_work_pending(data-work)) { + data-stop_queuing = false; + queue_delayed_work(devfreq_wq, data-work, + msecs_to_jiffies(df-profile-polling_ms)); + } + break; + case DEVFREQ_GOV_LIMITS: if (delayed_work_pending(data-work)) { mutex_lock(df-lock); diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 600cc2e..7c6517f 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -56,6 +56,8 @@ struct devfreq_dev_status { #define DEVFREQ_GOV_START0x1 #define DEVFREQ_GOV_STOP 0x2 #define DEVFREQ_GOV_LIMITS 0x3 +#define DEVFREQ_GOV_SUSPEND 0x4 +#define DEVFREQ_GOV_RESUME 0x5 /** * struct devfreq_dev_profile - Devfreq's user device profile @@ -155,6 +157,10 @@ extern struct devfreq *devfreq_add_device(struct device *dev, void *data); extern int devfreq_remove_device(struct devfreq *devfreq); +extern int devfreq_suspend_device(struct devfreq *devfreq); + +extern int devfreq_resume_device(struct devfreq *devfreq); + /* Helper functions for devfreq user device driver with OPP. */ extern struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags); @@ -207,6 +213,16 @@ static int devfreq_remove_device(struct devfreq *devfreq) return 0; } +static int devfreq_suspend_device(struct devfreq *devfreq) +{ + return 0; +} + +extern int devfreq_resume_device(struct devfreq *devfreq) +{ + return 0; +} + static struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags) { -- 1.7.11.3 ___ linaro-dev mailing list
Re: [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP
Hi Sylwester On 20 August 2012 09:12, Sangwook Lee sangwook@linaro.org wrote: Hi Sylwester On 19 August 2012 22:29, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi Sangwook, On 08/03/2012 04:24 PM, Sangwook Lee wrote: I was thinking about this, but this seems to be is a bit time-consuming because I have to do this just due to lack of s5k4ecgx hardware information. let me try it later once this patch is accepted. I've converted this driver to use function calls instead of the register arrays. It can be pulled, along with a couple of minor fixes/improvements, from following git tree: git://linuxtv.org/snawrocki/media.git s5k4ecgx (gitweb: http://git.linuxtv.org/snawrocki/media.git/s5k4ecgx) I don't own any Origen board thus it's untested. Could you give it a try ? Sorry, It doesn't work. I will send pictures to you by another mail thread. Previously, I tested preview array and found out that + /* +* FIXME: according to the datasheet, +* 0x7496~ 0x749c seems to be only for capture mode, +* but without these value, it doesn't work with preview mode. +*/ Do we need to set those values ? Thanks Sangwook Wow! Great, let me download from this git and then test. Thanks ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP
Hi Sylwester On 20 August 2012 12:33, Sylwester Nawrocki s.nawro...@samsung.com wrote: Hi Sangwook, [snip] registers definitions. Attached patch should correct this, sorry about this oversight. Let me know if there are still any issues. To make sure the I2C write sequences are correct it might be useful to log all calls to s5k4ecgx_write() and compare the logs with original tables. Yes, it is. I still need to compare both two revision after applying the new patch. let me compare logs in detail. Thanks Sangwook -- Regards, Sylwester ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Virtual Connect Aftermath
Hello there, Last week we ran a series of open sessions as part of an experimental Virtual Linaro Connect schedule; the blog post announcing it is at: http://www.linaro.org/linaro-blog/2012/08/07/linaro-announces-virtual-connect-q3-12-13-17-august-2012/ We ran all the sessions successfully over a combination of Google Hangouts, IRC and Etherpad, and the videos are now all available for your review and comments at: http://www.youtube.com/channel/UCIVqQKxCyQLJS6xvSmfndLA?feature=guideo If there anything on the menu that interests you, it's worth taking a look at the sessions. The minutes linked to from the video pages are also a good trove of information and can be used to follow the dialogue which is sometimes a bit tricky. We're considering running a wider Virtual Connect now that this one has concluded successfully; I'd love to hear your feedback on how it went and what you'd like to see us do differently for future events. Thanks! -- Christian Robottom Reis, Engineering VP Brazil (GMT-3) | [+55] 16 9112 6430 | [+1] 612 216 4935 Linaro.org: Open Source Software for ARM SoCs ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Can't view the lava information from android-build for some builds
Hi, Paul I have tried with the Shift+Reload and Ctrl+R about 10 times for each, but the problem still exists. I have reported it as a bug here: https://bugs.launchpad.net/linaro-android-infrastructure/+bug/1039319 Thanks, Yongqin Liu On 17 August 2012 19:11, Paul Sokolovsky paul.sokolov...@linaro.org wrote: Hello, On Fri, 17 Aug 2012 11:18:36 +0800 YongQin Liu yongqin@linaro.org wrote: Hi, Just found that I can't view the lava result on android-build page for some build. but not all of them, I still can view some the information of some builds before. say the builds of https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/. For the build #28 even I click the login to LAVA link and logged in, I still get this information like the NG.png attachment file. But for the build #26, I can see the lava information listed. Like the attached OK.png file I was not logged into LAVA when I started, logged in from build details page, and am able to see test results for both #26 and #28 (also tried #25-#29). So, my guess would be that browser caches content - I saw such issue on few occasions on android-build.linaro.org . So, please try Shift+Reload in browser (i.e. click reload button with shift held), or Ctrl+R few times in row and see if it helps. If you still see that issue, I'd suggest opening bug at https://bugs.launchpad.net/linaro-android-infrastructure and Infra's maintenance engineers will look into it. -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog -- Thanks, Yongqin Liu --- #mailing list linaro-andr...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android linaro-validat...@lists.linaro.org http://lists.linaro.org/pipermail/linaro-validation ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Can't view the lava information from android-build for some builds
I'm seeing the same On Aug 20, 2012 9:25 PM, YongQin Liu yongqin@linaro.org wrote: Hi, Paul I have tried with the Shift+Reload and Ctrl+R about 10 times for each, but the problem still exists. I have reported it as a bug here: https://bugs.launchpad.net/linaro-android-infrastructure/+bug/1039319 Thanks, Yongqin Liu On 17 August 2012 19:11, Paul Sokolovsky paul.sokolov...@linaro.org wrote: Hello, On Fri, 17 Aug 2012 11:18:36 +0800 YongQin Liu yongqin@linaro.org wrote: Hi, Just found that I can't view the lava result on android-build page for some build. but not all of them, I still can view some the information of some builds before. say the builds of https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/ . For the build #28 even I click the login to LAVA link and logged in, I still get this information like the NG.png attachment file. But for the build #26, I can see the lava information listed. Like the attached OK.png file I was not logged into LAVA when I started, logged in from build details page, and am able to see test results for both #26 and #28 (also tried #25-#29). So, my guess would be that browser caches content - I saw such issue on few occasions on android-build.linaro.org . So, please try Shift+Reload in browser (i.e. click reload button with shift held), or Ctrl+R few times in row and see if it helps. If you still see that issue, I'd suggest opening bug at https://bugs.launchpad.net/linaro-android-infrastructure and Infra's maintenance engineers will look into it. -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog -- Thanks, Yongqin Liu --- #mailing list linaro-andr...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android linaro-validat...@lists.linaro.org http://lists.linaro.org/pipermail/linaro-validation ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Can't view the lava information from android-build for some builds
On 21 August 2012 10:25, YongQin Liu yongqin@linaro.org wrote: Hi, Paul I have tried with the Shift+Reload and Ctrl+R about 10 times for each, but the problem still exists. I have reported it as a bug here: https://bugs.launchpad.net/linaro-android-infrastructure/+bug/1039319 I found the reason. We need to access the https://validation.linaro.org/lava-server via FireFox, and add the exception trust(not remember the exact name:() for it, after that we can see the lava result on the page then. Thanks, Yongqin Liu On 17 August 2012 19:11, Paul Sokolovsky paul.sokolov...@linaro.org wrote: Hello, On Fri, 17 Aug 2012 11:18:36 +0800 YongQin Liu yongqin@linaro.org wrote: Hi, Just found that I can't view the lava result on android-build page for some build. but not all of them, I still can view some the information of some builds before. say the builds of https://android-build.linaro.org/builds/~linaro-android/snowball-jb-gcc47-igloo-stable-blob/. For the build #28 even I click the login to LAVA link and logged in, I still get this information like the NG.png attachment file. But for the build #26, I can see the lava information listed. Like the attached OK.png file I was not logged into LAVA when I started, logged in from build details page, and am able to see test results for both #26 and #28 (also tried #25-#29). So, my guess would be that browser caches content - I saw such issue on few occasions on android-build.linaro.org . So, please try Shift+Reload in browser (i.e. click reload button with shift held), or Ctrl+R few times in row and see if it helps. If you still see that issue, I'd suggest opening bug at https://bugs.launchpad.net/linaro-android-infrastructure and Infra's maintenance engineers will look into it. -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog -- Thanks, Yongqin Liu --- #mailing list linaro-andr...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android linaro-validat...@lists.linaro.org http://lists.linaro.org/pipermail/linaro-validation -- Thanks, Yongqin Liu --- #mailing list linaro-andr...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android linaro-validat...@lists.linaro.org http://lists.linaro.org/pipermail/linaro-validation ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev