[linuxtv-media:master 189/209] warning: (VIDEO_MEDIATEK_VCODEC) selects VIDEO_MEDIATEK_VPU which has unmet direct dependencies (MEDIA_SUPPORT && ..))
tree: git://linuxtv.org/media_tree.git master head: fb6609280db902bd5d34445fba1c926e95e63914 commit: 69d4a521586ef93db94451afa5072ec3f6bee401 [189/209] [media] VIDEO_MEDIATEK_VPU should depend on HAS_DMA config: m32r-allmodconfig (attached as .config) compiler: m32r-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 69d4a521586ef93db94451afa5072ec3f6bee401 # save the attached .config to linux build tree make.cross ARCH=m32r All warnings (new ones prefixed by >>): warning: (VIDEO_MEDIATEK_VCODEC) selects VIDEO_MEDIATEK_VPU which has unmet direct dependencies (MEDIA_SUPPORT && V4L_MEM2MEM_DRIVERS && VIDEO_DEV && VIDEO_V4L2 && HAS_DMA && (ARCH_MEDIATEK || COMPILE_TEST)) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH v5 2/3] st-hva: multi-format video encoder V4L2 driver
Hi Jean-Christophe, [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.8-rc4 next-20160825] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information] url: https://github.com/0day-ci/linux/commits/Jean-Christophe-Trotin/Documentation-DT-add-bindings-for-ST-HVA/20160829-212937 base: git://linuxtv.org/media_tree.git master config: m32r-allyesconfig (attached as .config) compiler: m32r-linux-gcc (GCC) 4.9.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=m32r All warnings (new ones prefixed by >>): warning: (VIDEO_MEDIATEK_VCODEC && VIDEO_STI_HVA) selects VIDEOBUF2_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
cron job: media_tree daily build: ERRORS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Thu Sep 1 04:00:17 CEST 2016 git branch: test git hash: fb6609280db902bd5d34445fba1c926e95e63914 gcc version:i686-linux-gcc (GCC) 5.4.0 sparse version: v0.5.0-56-g7647c77 smatch version: v0.5.0-3428-gdfe27cf host hardware: x86_64 host os:4.6.0-164 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-multi: OK linux-git-blackfin-bf561: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: WARNINGS linux-2.6.36.4-i686: OK linux-2.6.37.6-i686: OK linux-2.6.38.8-i686: OK linux-2.6.39.4-i686: OK linux-3.0.60-i686: OK linux-3.1.10-i686: OK linux-3.2.37-i686: OK linux-3.3.8-i686: OK linux-3.4.27-i686: OK linux-3.5.7-i686: OK linux-3.6.11-i686: OK linux-3.7.4-i686: OK linux-3.8-i686: OK linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12.23-i686: OK linux-3.13.11-i686: ERRORS linux-3.14.9-i686: ERRORS linux-3.15.2-i686: ERRORS linux-3.16.7-i686: ERRORS linux-3.17.8-i686: OK linux-3.18.7-i686: OK linux-3.19-i686: OK linux-4.0-i686: OK linux-4.1.1-i686: OK linux-4.2-i686: OK linux-4.3-i686: OK linux-4.4-i686: OK linux-4.5-i686: OK linux-4.6-i686: OK linux-4.7-i686: OK linux-4.8-rc1-i686: OK linux-2.6.36.4-x86_64: OK linux-2.6.37.6-x86_64: OK linux-2.6.38.8-x86_64: OK linux-2.6.39.4-x86_64: OK linux-3.0.60-x86_64: OK linux-3.1.10-x86_64: OK linux-3.2.37-x86_64: OK linux-3.3.8-x86_64: OK linux-3.4.27-x86_64: OK linux-3.5.7-x86_64: OK linux-3.6.11-x86_64: OK linux-3.7.4-x86_64: OK linux-3.8-x86_64: OK linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12.23-x86_64: OK linux-3.13.11-x86_64: ERRORS linux-3.14.9-x86_64: ERRORS linux-3.15.2-x86_64: ERRORS linux-3.16.7-x86_64: ERRORS linux-3.17.8-x86_64: OK linux-3.18.7-x86_64: OK linux-3.19-x86_64: OK linux-4.0-x86_64: OK linux-4.1.1-x86_64: OK linux-4.2-x86_64: OK linux-4.3-x86_64: OK linux-4.4-x86_64: OK linux-4.5-x86_64: OK linux-4.6-x86_64: OK linux-4.7-x86_64: OK linux-4.8-rc1-x86_64: OK apps: WARNINGS spec-git: OK sparse: WARNINGS smatch: WARNINGS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Greetings
You are a recipient to Mrs Julie Leach Donation of $3 million USD. Contact ( julieleac...@outlook.com ) for claims. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] doc-rst:c-domain: function-like macros arguments
From: Markus HeiserHandle signatures of function-like macros well. Don't try to deduce arguments types of function-like macros. Signed-off-by: Markus Heiser --- Documentation/sphinx/cdomain.py | 55 - 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py index 66816ae..0816090 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -1,4 +1,5 @@ # -*- coding: utf-8; mode: python -*- +# pylint: disable=W0141,C0113,C0103,C0325 u""" cdomain ~~~ @@ -25,11 +26,18 @@ u""" * :c:func:`VIDIOC_LOG_STATUS` or * :any:`VIDIOC_LOG_STATUS` (``:any:`` needs sphinx 1.3) + + * Handle signatures of function-like macros well. Don't try to deduce + arguments types of function-like macros. + """ +from docutils import nodes from docutils.parsers.rst import directives import sphinx +from sphinx import addnodes +from sphinx.domains.c import c_funcptr_sig_re, c_sig_re from sphinx.domains.c import CObject as Base_CObject from sphinx.domains.c import CDomain as Base_CDomain @@ -38,6 +46,7 @@ __version__ = '1.0' # Get Sphinx version major, minor, patch = map(int, sphinx.__version__.split(".")) + def setup(app): app.override_domain(CDomain) @@ -57,9 +66,53 @@ class CObject(Base_CObject): "name" : directives.unchanged } +def handle_func_like_macro(self, sig, signode): +u"""Handles signatures of function-like macros. + +If the objtype is 'function' and the the signature ``sig`` is a +function-like macro, the name of the macro is returned. Otherwise +``False`` is returned. """ + +if not self.objtype == 'function': +return False + +m = c_funcptr_sig_re.match(sig) +if m is None: +m = c_sig_re.match(sig) +if m is None: +raise ValueError('no match') + +rettype, fullname, arglist, _const = m.groups() +if rettype or not arglist.strip(): +return False + +arglist = arglist.replace('`', '').replace('\\ ', '').strip() # remove markup +arglist = [a.strip() for a in arglist.split(",")] + +# has the first argument a type? +if len(arglist[0].split(" ")) > 1: +return False + +# This is a function-like macro, it's arguments are typeless! +signode += addnodes.desc_name(fullname, fullname) +paramlist = addnodes.desc_parameterlist() +signode += paramlist + +for argname in arglist: +param = addnodes.desc_parameter('', '', noemph=True) +# separate by non-breaking space in the output +param += nodes.emphasis(argname, argname) +paramlist += param + +return fullname + def handle_signature(self, sig, signode): """Transform a C signature into RST nodes.""" -fullname = super(CObject, self).handle_signature(sig, signode) + +fullname = self.handle_func_like_macro(sig, signode) +if not fullname: +fullname = super(CObject, self).handle_signature(sig, signode) + if "name" in self.options: if self.objtype == 'function': fullname = self.options["name"] -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] doc-rst:c-domain: fix sphinx version incompatibility
From: Markus HeiserThe self.indexnode's tuple has changed in sphinx version 1.4, from a former 4 element tuple to a 5 element tuple. https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c Signed-off-by: Markus Heiser --- Documentation/sphinx/cdomain.py | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py index 9eb714a..66816ae 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -29,11 +29,15 @@ u""" from docutils.parsers.rst import directives +import sphinx from sphinx.domains.c import CObject as Base_CObject from sphinx.domains.c import CDomain as Base_CDomain __version__ = '1.0' +# Get Sphinx version +major, minor, patch = map(int, sphinx.__version__.split(".")) + def setup(app): app.override_domain(CDomain) @@ -85,8 +89,14 @@ class CObject(Base_CObject): indextext = self.get_index_text(name) if indextext: -self.indexnode['entries'].append(('single', indextext, - targetname, '', None)) +if major >= 1 and minor < 4: +# indexnode's tuple changed in 1.4 +# https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c +self.indexnode['entries'].append( +('single', indextext, targetname, '')) +else: +self.indexnode['entries'].append( +('single', indextext, targetname, '', None)) class CDomain(Base_CDomain): -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] doc-rst:c-domain: function-like macros index entry
From: Markus HeiserFor function-like macros, sphinx creates 'FOO (C function)' entries. With this patch 'FOO (C macro)' are created for function-like macros, which is the same for object-like macros. Signed-off-by: Markus Heiser --- Documentation/sphinx/cdomain.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py index 0816090..2a1bd09 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -37,6 +37,7 @@ from docutils.parsers.rst import directives import sphinx from sphinx import addnodes +from sphinx.locale import _ from sphinx.domains.c import c_funcptr_sig_re, c_sig_re from sphinx.domains.c import CObject as Base_CObject from sphinx.domains.c import CDomain as Base_CDomain @@ -66,6 +67,8 @@ class CObject(Base_CObject): "name" : directives.unchanged } +is_function_like_macro = False + def handle_func_like_macro(self, sig, signode): u"""Handles signatures of function-like macros. @@ -104,6 +107,7 @@ class CObject(Base_CObject): param += nodes.emphasis(argname, argname) paramlist += param +self.is_function_like_macro = True return fullname def handle_signature(self, sig, signode): @@ -151,6 +155,12 @@ class CObject(Base_CObject): self.indexnode['entries'].append( ('single', indextext, targetname, '', None)) +def get_index_text(self, name): +if self.is_function_like_macro: +return _('%s (C macro)') % name +else: +return super(CObject, self).get_index_text(name) + class CDomain(Base_CDomain): """C language domain.""" -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC PATCH 0/3] doc-rst:c-domain: fix some issues in the c-domain
From: Markus HeiserHi Jon, this is a small series, fixing a issues about sphinx version incompatibility and adds improved handling of function-like macros [1]. The last patch is optional, I don't know if it is better to create 'FOO (C macro)' index entries instead of 'FOO (C function)' entries (what sphinx does) [2]. [1] https://www.mail-archive.com/linux-doc@vger.kernel.org/msg05673.html [2] https://www.mail-archive.com/linux-doc@vger.kernel.org/msg05678.html Markus Heiser (3): doc-rst:c-domain: fix sphinx version incompatibility doc-rst:c-domain: function-like macros arguments doc-rst:c-domain: function-like macros index entry Documentation/sphinx/cdomain.py | 79 +++-- 1 file changed, 76 insertions(+), 3 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1.1 6/6] smiapp: Remove set_xclk() callback from hwconfig
Hi, On Wed, Aug 31, 2016 at 04:01:37PM +0300, Sakari Ailus wrote: > The clock framework is generally so well supported that there's no reason > to keep this one around. > > Signed-off-by: Sakari Ailus> --- > drivers/media/i2c/smiapp/smiapp-core.c | 49 > -- > include/media/i2c/smiapp.h | 2 -- > 2 files changed, 17 insertions(+), 34 deletions(-) Reviewed-By: Sebastian Reichel -- Sebastian signature.asc Description: PGP signature
Re: [PATCH v1.1 5/5] smiapp: Switch to gpiod API for GPIO control
Hi, On Wed, Aug 31, 2016 at 04:00:56PM +0300, Sakari Ailus wrote: > Switch from the old gpio API to the new descriptor based gpiod API. > > [...] > > @@ -2572,17 +2569,10 @@ static int smiapp_init(struct smiapp_sensor *sensor) > } > } > > - if (gpio_is_valid(sensor->hwcfg->xshutdown)) { > - rval = devm_gpio_request_one( > - >dev, sensor->hwcfg->xshutdown, 0, > - "SMIA++ xshutdown"); > - if (rval < 0) { > - dev_err(>dev, > - "unable to acquire reset gpio %d\n", > - sensor->hwcfg->xshutdown); > - return rval; > - } > - } > + sensor->xshutdown = devm_gpiod_get_optional(>dev, "xshutdown", > + GPIOD_OUT_LOW); > + if (!sensor->xshutdown) > + dev_dbg(>dev, "no xshutdown GPIO available\n"); devm_gpiod_get_optional may return an error pointer, e.g. for -EPROBE_DEFER, so you should add: if (IS_ERR(sensor->xshutdown)) { rval = PTR_ERR(sensor->xshutdown); dev_err(>dev, "Could not get gpio (%ld)\n", rval); return rval; } > [...] Otherwise the patch looks fine, so with this fixed: Reviewed-By: Sebastian Reichel-- Sebastian signature.asc Description: PGP signature
Re: [PATCH v1.1 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained
Hi, On Wed, Aug 31, 2016 at 03:57:57PM +0300, Sakari Ailus wrote: > The clock may be provided by a driver which is yet to probe. Print the > actual error code as well. > > Signed-off-by: Sakari Ailus> > --- > since v1: > - Add printing of the original error code Reviewed-By: Sebastian Reichel signature.asc Description: PGP signature
[PATCH] [media] s5p_cec: Fix memory allocation failure check
It is likely that checking the result of the memory allocation just above is expected here. Signed-off-by: Christophe JAILLET--- drivers/staging/media/s5p-cec/s5p_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index 78333273c4e5..636bac182e8e 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c @@ -173,7 +173,7 @@ static int s5p_cec_probe(struct platform_device *pdev) int ret; cec = devm_kzalloc(>dev, sizeof(*cec), GFP_KERNEL); - if (!dev) + if (!cec) return -ENOMEM; cec->dev = dev; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] ARM: exynos: add all required FIMC-IS clocks to exynos4x12 dtsi
FIMC-IS blocks must control 3 more clocks ("gicisp", "mcuctl_isp" and "pwm_isp") to make the hardware fully operational. Signed-off-by: Marek Szyprowski--- arch/arm/boot/dts/exynos4x12.dtsi | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index c452499ae8c9..3394bdcf10ae 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -157,7 +157,9 @@ < CLK_MOUT_MPLL_USER_T>, < CLK_FIMC_ISP>, < CLK_FIMC_DRC>, < CLK_FIMC_FD>, < CLK_MCUISP>, -< CLK_DIV_ISP0>,< CLK_DIV_ISP1>, +< CLK_GICISP>, < CLK_MCUCTL_ISP>, +< CLK_PWM_ISP>, +< CLK_DIV_ISP0>, < CLK_DIV_ISP1>, < CLK_DIV_MCUISP0>, < CLK_DIV_MCUISP1>, < CLK_UART_ISP_SCLK>, @@ -167,6 +169,7 @@ clock-names = "lite0", "lite1", "ppmuispx", "ppmuispmx", "mpll", "isp", "drc", "fd", "mcuisp", + "gicisp", "mcuctl_isp", "pwm_isp", "ispdiv0", "ispdiv1", "mcuispdiv0", "mcuispdiv1", "uart", "aclk200", "div_aclk200", "aclk400mcuisp", -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] media: exynos4-is: Improve clock management
There is no need to keep all clocks prepared all the time. Call to clk_prepare/unprepare can be done on demand from runtime pm callbacks (it is allowed to call sleeping functions from that context). Signed-off-by: Marek Szyprowski--- drivers/media/platform/exynos4-is/fimc-lite.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index a0f149fb88e1..fd16605dd1d4 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1454,25 +1454,17 @@ static void fimc_lite_clk_put(struct fimc_lite *fimc) if (IS_ERR(fimc->clock)) return; - clk_unprepare(fimc->clock); clk_put(fimc->clock); fimc->clock = ERR_PTR(-EINVAL); } static int fimc_lite_clk_get(struct fimc_lite *fimc) { - int ret; - fimc->clock = clk_get(>pdev->dev, FLITE_CLK_NAME); if (IS_ERR(fimc->clock)) return PTR_ERR(fimc->clock); - ret = clk_prepare(fimc->clock); - if (ret < 0) { - clk_put(fimc->clock); - fimc->clock = ERR_PTR(-EINVAL); - } - return ret; + return 0; } static const struct of_device_id flite_of_match[]; @@ -1543,7 +1535,7 @@ static int fimc_lite_probe(struct platform_device *pdev) pm_runtime_enable(dev); if (!pm_runtime_enabled(dev)) { - ret = clk_enable(fimc->clock); + ret = clk_prepare_enable(fimc->clock); if (ret < 0) goto err_sd; } @@ -1568,7 +1560,7 @@ static int fimc_lite_runtime_resume(struct device *dev) { struct fimc_lite *fimc = dev_get_drvdata(dev); - clk_enable(fimc->clock); + clk_prepare_enable(fimc->clock); return 0; } @@ -1576,7 +1568,7 @@ static int fimc_lite_runtime_suspend(struct device *dev) { struct fimc_lite *fimc = dev_get_drvdata(dev); - clk_disable(fimc->clock); + clk_disable_unprepare(fimc->clock); return 0; } #endif -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] media: exynos4-is: Add support for all required clocks
This patch adds 3 more clocks to Exynos4 ISP driver. Enabling them is needed to make the hardware operational. Till now it worked only because those clocks were registered with IGNORE_UNUSED flag and were enabled by default after SoC reset. Signed-off-by: Marek Szyprowski--- Documentation/devicetree/bindings/media/exynos4-fimc-is.txt | 7 --- drivers/media/platform/exynos4-is/fimc-is.c | 3 +++ drivers/media/platform/exynos4-is/fimc-is.h | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt index 55c9ad6f9599..32ced99d4244 100644 --- a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt +++ b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt @@ -16,9 +16,10 @@ Required properties: - clocks : list of clock specifiers, corresponding to entries in clock-names property; - clock-names : must contain "ppmuispx", "ppmuispx", "lite0", "lite1" - "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "uart", - "ispdiv0", "ispdiv1", "mcuispdiv0", "mcuispdiv1", "aclk200", - "div_aclk200", "aclk400mcuisp", "div_aclk400mcuisp" entries, + "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "gicisp", + "pwm_isp", "mcuctl_isp", "uart", "ispdiv0", "ispdiv1", + "mcuispdiv0", "mcuispdiv1", "aclk200", "div_aclk200", + "aclk400mcuisp", "div_aclk400mcuisp" entries, matching entries in the clocks property. pmu subnode --- diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 32ca55f16677..5cedf2322bb4 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -52,6 +52,9 @@ static char *fimc_is_clocks[ISS_CLKS_MAX] = { [ISS_CLK_DRC] = "drc", [ISS_CLK_FD]= "fd", [ISS_CLK_MCUISP]= "mcuisp", + [ISS_CLK_GICISP]= "gicisp", + [ISS_CLK_PWM_ISP] = "pwm_isp", + [ISS_CLK_MCUCTL_ISP]= "mcuctl_isp", [ISS_CLK_UART] = "uart", [ISS_CLK_ISP_DIV0] = "ispdiv0", [ISS_CLK_ISP_DIV1] = "ispdiv1", diff --git a/drivers/media/platform/exynos4-is/fimc-is.h b/drivers/media/platform/exynos4-is/fimc-is.h index 3a82c6a214c7..ee05da034aa1 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.h +++ b/drivers/media/platform/exynos4-is/fimc-is.h @@ -77,6 +77,9 @@ enum { ISS_CLK_DRC, ISS_CLK_FD, ISS_CLK_MCUISP, + ISS_CLK_GICISP, + ISS_CLK_PWM_ISP, + ISS_CLK_MCUCTL_ISP, ISS_CLK_UART, ISS_GATE_CLKS_MAX, ISS_CLK_ISP_DIV0 = ISS_GATE_CLKS_MAX, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/3] Exynos4-IS: improve clock management
Dear All, This is a set of a few patches for Exynos4-IS driver, which improve clock management. Those patches are needed for improved runtime pm management for Exynos clocks driver, which will be posted in a separate thread. Best regards Marek Szyprowski Samsung R Institute Poland Marek Szyprowski (3): exynos4-is: Add support for all required clocks exynos4-is: Improve clock management ARM: exynos: add all required FIMC-IS clocks to exynos4x12 dtsi .../devicetree/bindings/media/exynos4-fimc-is.txt| 7 --- arch/arm/boot/dts/exynos4x12.dtsi| 5 - drivers/media/platform/exynos4-is/fimc-is.c | 3 +++ drivers/media/platform/exynos4-is/fimc-is.h | 3 +++ drivers/media/platform/exynos4-is/fimc-lite.c| 16 5 files changed, 18 insertions(+), 16 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v1.1 6/6] smiapp: Remove set_xclk() callback from hwconfig
The clock framework is generally so well supported that there's no reason to keep this one around. Signed-off-by: Sakari Ailus--- drivers/media/i2c/smiapp/smiapp-core.c | 49 -- include/media/i2c/smiapp.h | 2 -- 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 1ecc9a4..05ab0d0 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -1201,11 +1201,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) } usleep_range(1000, 1000); - if (sensor->hwcfg->set_xclk) - rval = sensor->hwcfg->set_xclk( - >src->sd, sensor->hwcfg->ext_clk); - else - rval = clk_prepare_enable(sensor->ext_clk); + rval = clk_prepare_enable(sensor->ext_clk); if (rval < 0) { dev_dbg(>dev, "failed to enable xclk\n"); goto out_xclk_fail; @@ -1322,10 +1318,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) out_cci_addr_fail: gpiod_set_value(sensor->xshutdown, 0); - if (sensor->hwcfg->set_xclk) - sensor->hwcfg->set_xclk(>src->sd, 0); - else - clk_disable_unprepare(sensor->ext_clk); + clk_disable_unprepare(sensor->ext_clk); out_xclk_fail: regulator_disable(sensor->vana); @@ -1347,10 +1340,7 @@ static void smiapp_power_off(struct smiapp_sensor *sensor) SMIAPP_SOFTWARE_RESET); gpiod_set_value(sensor->xshutdown, 0); - if (sensor->hwcfg->set_xclk) - sensor->hwcfg->set_xclk(>src->sd, 0); - else - clk_disable_unprepare(sensor->ext_clk); + clk_disable_unprepare(sensor->ext_clk); usleep_range(5000, 5000); regulator_disable(sensor->vana); sensor->streaming = false; @@ -2551,22 +2541,20 @@ static int smiapp_init(struct smiapp_sensor *sensor) return PTR_ERR(sensor->vana); } - if (!sensor->hwcfg->set_xclk) { - sensor->ext_clk = devm_clk_get(>dev, NULL); - if (IS_ERR(sensor->ext_clk)) { - dev_err(>dev, "could not get clock (%ld)\n", - PTR_ERR(sensor->ext_clk)); - return -EPROBE_DEFER; - } + sensor->ext_clk = devm_clk_get(>dev, NULL); + if (IS_ERR(sensor->ext_clk)) { + dev_err(>dev, "could not get clock (%ld)\n", + PTR_ERR(sensor->ext_clk)); + return -EPROBE_DEFER; + } - rval = clk_set_rate(sensor->ext_clk, - sensor->hwcfg->ext_clk); - if (rval < 0) { - dev_err(>dev, - "unable to set clock freq to %u\n", - sensor->hwcfg->ext_clk); - return rval; - } + rval = clk_set_rate(sensor->ext_clk, + sensor->hwcfg->ext_clk); + if (rval < 0) { + dev_err(>dev, + "unable to set clock freq to %u\n", + sensor->hwcfg->ext_clk); + return rval; } sensor->xshutdown = devm_gpiod_get_optional(>dev, "xshutdown", @@ -3108,10 +3096,7 @@ static int smiapp_remove(struct i2c_client *client) if (sensor->power_count) { gpiod_set_value(sensor->xshutdown, 0); - if (sensor->hwcfg->set_xclk) - sensor->hwcfg->set_xclk(>src->sd, 0); - else - clk_disable_unprepare(sensor->ext_clk); + clk_disable_unprepare(sensor->ext_clk); sensor->power_count = 0; } diff --git a/include/media/i2c/smiapp.h b/include/media/i2c/smiapp.h index eacc3f4..635007e 100644 --- a/include/media/i2c/smiapp.h +++ b/include/media/i2c/smiapp.h @@ -73,8 +73,6 @@ struct smiapp_hwconfig { enum smiapp_module_board_orient module_board_orient; struct smiapp_flash_strobe_parms *strobe_setup; - - int (*set_xclk)(struct v4l2_subdev *sd, int hz); }; #endif /* __SMIAPP_H_ */ -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v1.1 5/5] smiapp: Switch to gpiod API for GPIO control
Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus--- - Remove xshutdown field in smiapp_hwconfig, and SMIAPP_NO_XSHUTDOWN macro drivers/media/i2c/smiapp/smiapp-core.c | 36 +++--- drivers/media/i2c/smiapp/smiapp.h | 1 + include/media/i2c/smiapp.h | 3 --- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 103e335..1ecc9a4 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -24,8 +24,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -1212,8 +1212,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) } usleep_range(1000, 1000); - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 1); + gpiod_set_value(sensor->xshutdown, 1); sleep = SMIAPP_RESET_DELAY(sensor->hwcfg->ext_clk); usleep_range(sleep, sleep); @@ -1322,8 +1321,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) return 0; out_cci_addr_fail: - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else @@ -1348,8 +1346,7 @@ static void smiapp_power_off(struct smiapp_sensor *sensor) SMIAPP_REG_U8_SOFTWARE_RESET, SMIAPP_SOFTWARE_RESET); - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else @@ -2572,17 +2569,10 @@ static int smiapp_init(struct smiapp_sensor *sensor) } } - if (gpio_is_valid(sensor->hwcfg->xshutdown)) { - rval = devm_gpio_request_one( - >dev, sensor->hwcfg->xshutdown, 0, - "SMIA++ xshutdown"); - if (rval < 0) { - dev_err(>dev, - "unable to acquire reset gpio %d\n", - sensor->hwcfg->xshutdown); - return rval; - } - } + sensor->xshutdown = devm_gpiod_get_optional(>dev, "xshutdown", + GPIOD_OUT_LOW); + if (!sensor->xshutdown) + dev_dbg(>dev, "no xshutdown GPIO available\n"); rval = smiapp_power_on(sensor); if (rval) @@ -3020,9 +3010,6 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev) hwcfg->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes; dev_dbg(dev, "lanes %u\n", hwcfg->lanes); - /* xshutdown GPIO is optional */ - hwcfg->xshutdown = of_get_named_gpio(dev->of_node, "reset-gpios", 0); - /* NVM size is not mandatory */ of_property_read_u32(dev->of_node, "nokia,nvm-size", >nvm_size); @@ -3034,8 +3021,8 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev) goto out_err; } - dev_dbg(dev, "reset %d, nvm %d, clk %d, csi %d\n", hwcfg->xshutdown, - hwcfg->nvm_size, hwcfg->ext_clk, hwcfg->csi_signalling_mode); + dev_dbg(dev, "nvm %d, clk %d, csi %d\n", hwcfg->nvm_size, + hwcfg->ext_clk, hwcfg->csi_signalling_mode); if (!bus_cfg->nr_of_link_frequencies) { dev_warn(dev, "no link frequencies defined\n"); @@ -3120,8 +3107,7 @@ static int smiapp_remove(struct i2c_client *client) v4l2_async_unregister_subdev(subdev); if (sensor->power_count) { - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index 6ff095a..c504bd8 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -200,6 +200,7 @@ struct smiapp_sensor { struct smiapp_hwconfig *hwcfg; struct regulator *vana; struct clk *ext_clk; + struct gpio_desc *xshutdown; u32 limits[SMIAPP_LIMIT_LAST]; u8 nbinning_subtypes; struct smiapp_binning_subtype binning_subtypes[SMIAPP_BINNING_SUBTYPES]; diff --git a/include/media/i2c/smiapp.h b/include/media/i2c/smiapp.h index a4a1b51..eacc3f4 100644 ---
Re: RFC: V4L2_PIX_FMT_NV16: should it allow padding after each plane?
Hi Hans, On Wed, Aug 31, 2016 at 10:43:03AM +0200, Hans Verkuil wrote: > The NV16 documentation allows for padding after each line: > > https://hverkuil.home.xs4all.nl/spec/uapi/v4l/pixfmt-nv16.html > > But I have one case where there is also padding after each plane. > > Can we fold that into the existing NV16 format? I.e., in that case > the size of each plane is sizeimage / 2. I can't see any harm in doing so. It likely catches most of the alignment requirements. That still probably doesn't catch all the possible cases but we always do have the option of creating another format in that case. > > Or do I have to make a new NV16PAD format that allows such padding? > > I am in favor of extending the NV16 specification since I believe it > makes sense, but I want to know what others think. -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v1.1 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained
The clock may be provided by a driver which is yet to probe. Print the actual error code as well. Signed-off-by: Sakari Ailus--- since v1: - Add printing of the original error code drivers/media/i2c/smiapp/smiapp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 92a6859..103e335 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2557,8 +2557,9 @@ static int smiapp_init(struct smiapp_sensor *sensor) if (!sensor->hwcfg->set_xclk) { sensor->ext_clk = devm_clk_get(>dev, NULL); if (IS_ERR(sensor->ext_clk)) { - dev_err(>dev, "could not get clock\n"); - return PTR_ERR(sensor->ext_clk); + dev_err(>dev, "could not get clock (%ld)\n", + PTR_ERR(sensor->ext_clk)); + return -EPROBE_DEFER; } rval = clk_set_rate(sensor->ext_clk, -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] drm/exynos: gsc: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system sleep pm, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski--- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 29 ++--- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 5d20da8f957e..b1894aa9286e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -1760,32 +1760,6 @@ static int gsc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int gsc_suspend(struct device *dev) -{ - struct gsc_context *ctx = get_gsc_context(dev); - - DRM_DEBUG_KMS("id[%d]\n", ctx->id); - - if (pm_runtime_suspended(dev)) - return 0; - - return gsc_clk_ctrl(ctx, false); -} - -static int gsc_resume(struct device *dev) -{ - struct gsc_context *ctx = get_gsc_context(dev); - - DRM_DEBUG_KMS("id[%d]\n", ctx->id); - - if (!pm_runtime_suspended(dev)) - return gsc_clk_ctrl(ctx, true); - - return 0; -} -#endif - #ifdef CONFIG_PM static int gsc_runtime_suspend(struct device *dev) { @@ -1807,7 +1781,8 @@ static int gsc_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops gsc_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL) }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] media: s5p-cec: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system sleep pm, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski--- drivers/staging/media/s5p-cec/s5p_cec.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index 78333273c4e5..77d9887801b8 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c @@ -250,22 +250,9 @@ static int s5p_cec_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused s5p_cec_suspend(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - return s5p_cec_runtime_suspend(dev); -} - -static int __maybe_unused s5p_cec_resume(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - return s5p_cec_runtime_resume(dev); -} - static const struct dev_pm_ops s5p_cec_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(s5p_cec_suspend, s5p_cec_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(s5p_cec_runtime_suspend, s5p_cec_runtime_resume, NULL) }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] media: s5p-jpeg: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system sleep pm, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski--- drivers/media/platform/s5p-jpeg/jpeg-core.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 785e6936c881..739ee49b9790 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -2996,27 +2996,11 @@ static int s5p_jpeg_runtime_resume(struct device *dev) } #endif /* CONFIG_PM */ -#ifdef CONFIG_PM_SLEEP -static int s5p_jpeg_suspend(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - - return s5p_jpeg_runtime_suspend(dev); -} - -static int s5p_jpeg_resume(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - - return s5p_jpeg_runtime_resume(dev); -} -#endif - static const struct dev_pm_ops s5p_jpeg_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume) - SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) + SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, + NULL) }; static struct s5p_jpeg_variant s5p_jpeg_drvdata = { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/6] drm/exynos: fimc: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system sleep pm, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski--- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 29 ++--- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 0525c56145db..147ef0d298cb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c @@ -1753,32 +1753,6 @@ static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable) return 0; } -#ifdef CONFIG_PM_SLEEP -static int fimc_suspend(struct device *dev) -{ - struct fimc_context *ctx = get_fimc_context(dev); - - DRM_DEBUG_KMS("id[%d]\n", ctx->id); - - if (pm_runtime_suspended(dev)) - return 0; - - return fimc_clk_ctrl(ctx, false); -} - -static int fimc_resume(struct device *dev) -{ - struct fimc_context *ctx = get_fimc_context(dev); - - DRM_DEBUG_KMS("id[%d]\n", ctx->id); - - if (!pm_runtime_suspended(dev)) - return fimc_clk_ctrl(ctx, true); - - return 0; -} -#endif - static int fimc_runtime_suspend(struct device *dev) { struct fimc_context *ctx = get_fimc_context(dev); @@ -1799,7 +1773,8 @@ static int fimc_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops fimc_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(fimc_suspend, fimc_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(fimc_runtime_suspend, fimc_runtime_resume, NULL) }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] drm/exynos: rotator: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system sleep pm, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 26 ++ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 404367a430b5..6591e406084c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -794,29 +794,6 @@ static int rotator_clk_crtl(struct rot_context *rot, bool enable) return 0; } - -#ifdef CONFIG_PM_SLEEP -static int rotator_suspend(struct device *dev) -{ - struct rot_context *rot = dev_get_drvdata(dev); - - if (pm_runtime_suspended(dev)) - return 0; - - return rotator_clk_crtl(rot, false); -} - -static int rotator_resume(struct device *dev) -{ - struct rot_context *rot = dev_get_drvdata(dev); - - if (!pm_runtime_suspended(dev)) - return rotator_clk_crtl(rot, true); - - return 0; -} -#endif - static int rotator_runtime_suspend(struct device *dev) { struct rot_context *rot = dev_get_drvdata(dev); @@ -833,7 +810,8 @@ static int rotator_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops rotator_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(rotator_suspend, rotator_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(rotator_runtime_suspend, rotator_runtime_resume, NULL) }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/6] drm/exynos: g2d: fix system and runtime pm integration
Move code from system sleep pm to runtime pm callbacks to ensure proper driver state preservation when device is under power domain. Then, use generic helpers for using runtime pm for system sleep pm. Signed-off-by: Marek Szyprowski--- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 4bf00f57ffe8..6eca8bb88648 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -1475,8 +1475,8 @@ static int g2d_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int g2d_suspend(struct device *dev) +#ifdef CONFIG_PM +static int g2d_runtime_suspend(struct device *dev) { struct g2d_data *g2d = dev_get_drvdata(dev); @@ -1490,25 +1490,6 @@ static int g2d_suspend(struct device *dev) flush_work(>runqueue_work); - return 0; -} - -static int g2d_resume(struct device *dev) -{ - struct g2d_data *g2d = dev_get_drvdata(dev); - - g2d->suspended = false; - g2d_exec_runqueue(g2d); - - return 0; -} -#endif - -#ifdef CONFIG_PM -static int g2d_runtime_suspend(struct device *dev) -{ - struct g2d_data *g2d = dev_get_drvdata(dev); - clk_disable_unprepare(g2d->gate_clk); return 0; @@ -1523,12 +1504,16 @@ static int g2d_runtime_resume(struct device *dev) if (ret < 0) dev_warn(dev, "failed to enable clock.\n"); + g2d->suspended = false; + g2d_exec_runqueue(g2d); + return ret; } #endif static const struct dev_pm_ops g2d_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(g2d_suspend, g2d_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(g2d_runtime_suspend, g2d_runtime_resume, NULL) }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/6] Exynos: runtime/sleep pm fixes for gfx and media drivers
Dear all, This is a quick fix of the incorrect usage of runtime pm for system sleep pm purposes. Patches introduce usage of the generic helpers pm_runtime_force_{suspend,resume} instead of open-coding them, which was potentially broken for some corner cases. The side-effect of this patch set is noticable code reduction. Patches 1-4 should go via exynos drm kernel tree, while patches 5-6 are aimed for media tree. Best regards Marek Szyprowski Samsung R Institute Poland Marek Szyprowski (6): drm/exynos: fimc: fix system and runtime pm integration drm/exynos: gsc: fix system and runtime pm integration drm/exynos: rotator: fix system and runtime pm integration drm/exynos: g2d: fix system and runtime pm integration media: s5p-cec: fix system and runtime pm integration media: s5p-jpeg: fix system and runtime pm integration drivers/gpu/drm/exynos/exynos_drm_fimc.c| 29 ++--- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 29 +++-- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 29 ++--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 26 ++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 24 drivers/staging/media/s5p-cec/s5p_cec.c | 17 ++--- 6 files changed, 19 insertions(+), 135 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] smiapp: Switch to gpiod API for GPIO control
Hi Sebastian, Thanks for the review! On 08/31/16 15:09, Sebastian Reichel wrote: > Hi Sakari, > > On Wed, Aug 31, 2016 at 10:42:05AM +0300, Sakari Ailus wrote: >> -if (gpio_is_valid(sensor->hwcfg->xshutdown)) { >> +if (client->dev.of_node) { >> +sensor->xshutdown = >> +devm_gpiod_get_optional(>dev, "xshutdown", >> +GPIOD_OUT_LOW); >> +} else if (gpio_is_valid(sensor->hwcfg->xshutdown)) { >> rval = devm_gpio_request_one( >> >dev, sensor->hwcfg->xshutdown, 0, >> "SMIA++ xshutdown"); >> @@ -2581,8 +2582,13 @@ static int smiapp_init(struct smiapp_sensor *sensor) >> sensor->hwcfg->xshutdown); >> return rval; >> } >> + >> +sensor->xshutdown = gpio_to_desc(sensor->hwcfg->xshutdown); >> } > > You can drop the devm_gpio_request_one() part and xshutdown from > smiapp_platform_data. The gpiod consumer interface can also be > used with data provided from boardfiles as documented in > Documentation/gpio/board.txt, section "Platform Data". It basically > works like assigning regulators to devices from platform data. Good point. I'll fix that. -- Sakari Ailus sakari.ai...@linux.intel.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] smiapp cleanups, retry probe if getting clock fails
Hi, On Wed, Aug 31, 2016 at 10:42:00AM +0300, Sakari Ailus wrote: > These patches contain cleanups for the smiapp driver and return > -EPROBE_DEFER if getting the clock fails. Apart from comments on patches 3 & 5 the patchset is Reviewed-By: Sebastian Reichel-- Sebastian signature.asc Description: PGP signature
Re: [PATCH 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained
Hi, On Wed, Aug 31, 2016 at 10:42:03AM +0300, Sakari Ailus wrote: > The clock may be provided by a driver which is yet to probe. This probably fixes N950 with built-in drivers, where I could see smiapp fails due to missing clk. I have not yet further anaylsed it, since more important parts like display output are also not yet working. > Signed-off-by: Sakari Ailus> --- > drivers/media/i2c/smiapp/smiapp-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c > b/drivers/media/i2c/smiapp/smiapp-core.c > index 92a6859..aaf5299 100644 > --- a/drivers/media/i2c/smiapp/smiapp-core.c > +++ b/drivers/media/i2c/smiapp/smiapp-core.c > @@ -2558,7 +2558,7 @@ static int smiapp_init(struct smiapp_sensor *sensor) > sensor->ext_clk = devm_clk_get(>dev, NULL); > if (IS_ERR(sensor->ext_clk)) { > dev_err(>dev, "could not get clock\n"); > - return PTR_ERR(sensor->ext_clk); > + return -EPROBE_DEFER; > } > > rval = clk_set_rate(sensor->ext_clk, With the error being rewritten to EPROBE_DEFER, the actual error number should be part of the error message: dev_err(>dev, "could not get clock (%d)\n", PTR_ERR(sensor->ext_clk)); -- Sebastian signature.asc Description: PGP signature
Re: [PATCH 5/5] smiapp: Switch to gpiod API for GPIO control
Hi Sakari, On Wed, Aug 31, 2016 at 10:42:05AM +0300, Sakari Ailus wrote: > - if (gpio_is_valid(sensor->hwcfg->xshutdown)) { > + if (client->dev.of_node) { > + sensor->xshutdown = > + devm_gpiod_get_optional(>dev, "xshutdown", > + GPIOD_OUT_LOW); > + } else if (gpio_is_valid(sensor->hwcfg->xshutdown)) { > rval = devm_gpio_request_one( > >dev, sensor->hwcfg->xshutdown, 0, > "SMIA++ xshutdown"); > @@ -2581,8 +2582,13 @@ static int smiapp_init(struct smiapp_sensor *sensor) > sensor->hwcfg->xshutdown); > return rval; > } > + > + sensor->xshutdown = gpio_to_desc(sensor->hwcfg->xshutdown); > } You can drop the devm_gpio_request_one() part and xshutdown from smiapp_platform_data. The gpiod consumer interface can also be used with data provided from boardfiles as documented in Documentation/gpio/board.txt, section "Platform Data". It basically works like assigning regulators to devices from platform data. You will obviously have to change every platform_device users of smiapp, but it looks like upstream has none: ~/linux/arch $ git grep smiapp_platform_data || echo "Not found" Not found -- Sebastian signature.asc Description: PGP signature
Re: [PATCH v3] docs-rst: ignore arguments on macro definitions
Am 31.08.2016 um 12:26 schrieb Mauro Carvalho Chehab: > Em Wed, 31 Aug 2016 12:09:39 +0200 > Markus Heiser escreveu: > >> Am 31.08.2016 um 11:02 schrieb Jani Nikula : >> >>> On Wed, 31 Aug 2016, Markus Heiser wrote: I haven't tested your suggestion, but since *void* is in the list of stop-words: # These C types aren't described anywhere, so don't try to create # a cross-reference to them stopwords = set(( 'const', 'void', 'char', 'wchar_t', 'int', 'short', 'long', 'float', 'double', 'unsigned', 'signed', 'FILE', 'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t', 'struct', '_Bool', )) I think it will work in the matter you think. However I like to prefer to fix it in the C-domain, using Mauro's suggestion on argument parsing. IMHO it is not the best solution to add a void type to the reST signature of a macro. This will result in a unusual output and does not fix what is wrong in Sphinx's c-domain (there is also a drawback in the index, where a function-type macro is referred as function, not as macro). >>> >>> From an API user's perspective, functions and function-like macros >>> should work interchangeably. >> >> Ah, OK. >> >>> Personally, I don't think there needs to be >>> a difference in the index. This seems to be the approach taken in >>> Sphinx, but it just doesn't work well for automatic documentation >>> generation because we can't deduce the parameter types from the macro >>> definition. >> >> In the index, sphinx refers only object-like macros with an entry >> "FOO (C macro))". Function-like macros are referred as "BAR (C function)". >> >> I thought it is more straight forward to refer all macros with a >> "BAR (C macro)" entry in the index. I will split this change in >> a separate patch, so we can decide if we like to patch the index >> that way. >> >> But now, as we discuss this, I have another doubt to fix the index. >> It might be confusing when writing references to those macros. >> >> Since function-like macros internally are functions in the c-domain, >> they are referred with ":c:func:`BAR`". On the other side, object-like >> macros are referred by role ":c:macro:`FOO`". >> >> Taking this into account, it might be one reason more to follow >> your conclusion that functions and function-like macros are >> interchangeable from the user's perspective. > > It is not uncommon to "promote" some such macros to inline > functions, in order to have a stronger type check, or to do the > reverse, when we need a more generic declaration that would work > for multiple types. > > So, keeping both macro function-like functions and functions using > the :c:function: seems to be the best, IMHO. It also makes life > easier for kernel-doc script. May, I was unclear. I don't want to change the behavior: """keeping both macro function-like functions and functions using the :c:function:""". The only thing I thought to change is, how the index entry will be. First I thought it might be more straight forward to refer func-like as "BAR (C macro)". But after Jani's conclusion, I had a doubt if this is really a better entry in the index, than that what sphinx already does "BAR (C function)". Sorry for the confusion. -- Markus -- -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] docs-rst: ignore arguments on macro definitions
Em Wed, 31 Aug 2016 12:09:39 +0200 Markus Heiserescreveu: > Am 31.08.2016 um 11:02 schrieb Jani Nikula : > > > On Wed, 31 Aug 2016, Markus Heiser wrote: > >> I haven't tested your suggestion, but since *void* is in the list > >> of stop-words: > >> > >># These C types aren't described anywhere, so don't try to create > >># a cross-reference to them > >>stopwords = set(( > >>'const', 'void', 'char', 'wchar_t', 'int', 'short', > >>'long', 'float', 'double', 'unsigned', 'signed', 'FILE', > >>'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t', > >>'struct', '_Bool', > >>)) > >> > >> I think it will work in the matter you think. > >> > >> However I like to prefer to fix it in the C-domain, using > >> Mauro's suggestion on argument parsing. IMHO it is not > >> the best solution to add a void type to the reST signature > >> of a macro. This will result in a unusual output and does > >> not fix what is wrong in Sphinx's c-domain (there is also > >> a drawback in the index, where a function-type macro is > >> referred as function, not as macro). > > > > From an API user's perspective, functions and function-like macros > > should work interchangeably. > > Ah, OK. > > > Personally, I don't think there needs to be > > a difference in the index. This seems to be the approach taken in > > Sphinx, but it just doesn't work well for automatic documentation > > generation because we can't deduce the parameter types from the macro > > definition. > > In the index, sphinx refers only object-like macros with an entry > "FOO (C macro))". Function-like macros are referred as "BAR (C function)". > > I thought it is more straight forward to refer all macros with a > "BAR (C macro)" entry in the index. I will split this change in > a separate patch, so we can decide if we like to patch the index > that way. > > But now, as we discuss this, I have another doubt to fix the index. > It might be confusing when writing references to those macros. > > Since function-like macros internally are functions in the c-domain, > they are referred with ":c:func:`BAR`". On the other side, object-like > macros are referred by role ":c:macro:`FOO`". > > Taking this into account, it might be one reason more to follow > your conclusion that functions and function-like macros are > interchangeable from the user's perspective. It is not uncommon to "promote" some such macros to inline functions, in order to have a stronger type check, or to do the reverse, when we need a more generic declaration that would work for multiple types. So, keeping both macro function-like functions and functions using the :c:function: seems to be the best, IMHO. It also makes life easier for kernel-doc script. > > -- Markus -- > > > > > BR, > > Jani. > > > > > > -- > > Jani Nikula, Intel Open Source Technology Center > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-doc" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] docs-rst: ignore arguments on macro definitions
Am 31.08.2016 um 11:02 schrieb Jani Nikula: > On Wed, 31 Aug 2016, Markus Heiser wrote: >> I haven't tested your suggestion, but since *void* is in the list >> of stop-words: >> >># These C types aren't described anywhere, so don't try to create >># a cross-reference to them >>stopwords = set(( >>'const', 'void', 'char', 'wchar_t', 'int', 'short', >>'long', 'float', 'double', 'unsigned', 'signed', 'FILE', >>'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t', >>'struct', '_Bool', >>)) >> >> I think it will work in the matter you think. >> >> However I like to prefer to fix it in the C-domain, using >> Mauro's suggestion on argument parsing. IMHO it is not >> the best solution to add a void type to the reST signature >> of a macro. This will result in a unusual output and does >> not fix what is wrong in Sphinx's c-domain (there is also >> a drawback in the index, where a function-type macro is >> referred as function, not as macro). > > From an API user's perspective, functions and function-like macros > should work interchangeably. Ah, OK. > Personally, I don't think there needs to be > a difference in the index. This seems to be the approach taken in > Sphinx, but it just doesn't work well for automatic documentation > generation because we can't deduce the parameter types from the macro > definition. In the index, sphinx refers only object-like macros with an entry "FOO (C macro))". Function-like macros are referred as "BAR (C function)". I thought it is more straight forward to refer all macros with a "BAR (C macro)" entry in the index. I will split this change in a separate patch, so we can decide if we like to patch the index that way. But now, as we discuss this, I have another doubt to fix the index. It might be confusing when writing references to those macros. Since function-like macros internally are functions in the c-domain, they are referred with ":c:func:`BAR`". On the other side, object-like macros are referred by role ":c:macro:`FOO`". Taking this into account, it might be one reason more to follow your conclusion that functions and function-like macros are interchangeable from the user's perspective. -- Markus -- > > BR, > Jani. > > > -- > Jani Nikula, Intel Open Source Technology Center > -- > To unsubscribe from this list: send the line "unsubscribe linux-doc" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] dw2102: Add support for Terratec Cinergy S2 USB BOX
Am Mittwoch, den 27.07.2016, 17:34 +0200 schrieb Benjamin Larsson: > On 07/18/2016 01:59 PM, Mauro Carvalho Chehab wrote: > >It would be > > nice if both Philipp and Benjamin test such patch, for us to be sure > > that it would work for both. > > > > Regards, > > Mauro > > I added it to the dvbsky driver so I guess that Philipp has to do the > testing. I have tested the dvbsky driver on v4.8-rc3 last weekend, and can confirm that it works with the hardware in question. regards Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] docs-rst: ignore arguments on macro definitions
On Wed, 31 Aug 2016, Markus Heiserwrote: > I haven't tested your suggestion, but since *void* is in the list > of stop-words: > > # These C types aren't described anywhere, so don't try to create > # a cross-reference to them > stopwords = set(( > 'const', 'void', 'char', 'wchar_t', 'int', 'short', > 'long', 'float', 'double', 'unsigned', 'signed', 'FILE', > 'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t', > 'struct', '_Bool', > )) > > I think it will work in the matter you think. > > However I like to prefer to fix it in the C-domain, using > Mauro's suggestion on argument parsing. IMHO it is not > the best solution to add a void type to the reST signature > of a macro. This will result in a unusual output and does > not fix what is wrong in Sphinx's c-domain (there is also > a drawback in the index, where a function-type macro is > referred as function, not as macro). >From an API user's perspective, functions and function-like macros should work interchangeably. Personally, I don't think there needs to be a difference in the index. This seems to be the approach taken in Sphinx, but it just doesn't work well for automatic documentation generation because we can't deduce the parameter types from the macro definition. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC: V4L2_PIX_FMT_NV16: should it allow padding after each plane?
The NV16 documentation allows for padding after each line: https://hverkuil.home.xs4all.nl/spec/uapi/v4l/pixfmt-nv16.html But I have one case where there is also padding after each plane. Can we fold that into the existing NV16 format? I.e., in that case the size of each plane is sizeimage / 2. Or do I have to make a new NV16PAD format that allows such padding? I am in favor of extending the NV16 specification since I believe it makes sense, but I want to know what others think. Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] docs-rst: ignore arguments on macro definitions
Am 29.08.2016 um 17:36 schrieb Jani Nikula: > On Mon, 29 Aug 2016, Mauro Carvalho Chehab wrote: >> Em Mon, 29 Aug 2016 16:12:39 +0200 >> Markus Heiser escreveu: >> >>> Am 29.08.2016 um 15:13 schrieb Mauro Carvalho Chehab >>> : >>> A macro definition is mapped via .. c:function:: at the ReST markup when using the following kernel-doc tag: /** * DMX_FE_ENTRY - Casts elements in the list of registered * front-ends from the generic type struct list_head * to the type * struct dmx_frontend * * @list: list of struct dmx_frontend */ #define DMX_FE_ENTRY(list) \ list_entry(list, struct dmx_frontend, connectivity_list) However, unlike a function description, the arguments of a macro doesn't contain the data type. This causes warnings when enabling Sphinx on nitkpick mode, like this one: ./drivers/media/dvb-core/demux.h:358: WARNING: c:type reference target not found: list >>> >>> I think this is a drawback of sphinx's C-domain, using function >>> definition for macros also. From the function documentation >>> >>> """This is also used to describe function-like preprocessor >>>macros. The names of the arguments should be given so >>>they may be used in the description.""" >>> >>> I think about to fix the nitpick message for macros (aka function >>> directive) in the C-domain extension (we already have). >> >> Yeah, that could produce a better output, if it is doable. >> >>> >>> But for this, I need a rule to distinguish between macros >>> and functions ... is the uppercase of the macro name a good >>> rule to suppress the nitpick message? >> >> No. There are lots of macros in lowercase. never did any stats about >> that, but I guess that we actually have a way more such macros in >> lowercase. >> >>> Any other suggestions? >> >> I guess the best thing is to check if the type is empty, just like >> on this patch. Macros are always: >> foo(arg1, arg2, arg3, ...) Yes, it is so clear, ... I'am a gawk ;-) >> while functions always have some type (with could be as complex as >> a function pointer). So, if all arguments match this rejex: >> \s*\S+\s* >> Then, it is a macro. Otherwise, it is a function. >> >> There's no way for the C domain to distinguish between a macro or >> a function when the number of arguments is zero, but, on such case, >> it doesn't really matter. > > What does Sphinx say if you add "void" as the type? Or a fake > "macroparam" type? Hi Jani, sorry for my late reply, I haven't tested your suggestion, but since *void* is in the list of stop-words: # These C types aren't described anywhere, so don't try to create # a cross-reference to them stopwords = set(( 'const', 'void', 'char', 'wchar_t', 'int', 'short', 'long', 'float', 'double', 'unsigned', 'signed', 'FILE', 'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t', 'struct', '_Bool', )) I think it will work in the matter you think. However I like to prefer to fix it in the C-domain, using Mauro's suggestion on argument parsing. IMHO it is not the best solution to add a void type to the reST signature of a macro. This will result in a unusual output and does not fix what is wrong in Sphinx's c-domain (there is also a drawback in the index, where a function-type macro is referred as function, not as macro). I will give it a try, to eliminate these drawbacks in the C-domain and send a patch series, we can discuss further. -- Markus -- > > If those hacks don't help, Mauro's suggestion seems sane. > > BR, > Jani. > > > >> >> Thanks, >> Mauro >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-doc" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > Jani Nikula, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] smiapp: Constify the regs argument to smiapp_write_8s()
The data may now be const as well. Signed-off-by: Sakari Ailus--- drivers/media/i2c/smiapp/smiapp-quirk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-quirk.c b/drivers/media/i2c/smiapp/smiapp-quirk.c index d7e22bc..cb128ea 100644 --- a/drivers/media/i2c/smiapp/smiapp-quirk.c +++ b/drivers/media/i2c/smiapp/smiapp-quirk.c @@ -26,7 +26,7 @@ static int smiapp_write_8(struct smiapp_sensor *sensor, u16 reg, u8 val) } static int smiapp_write_8s(struct smiapp_sensor *sensor, - struct smiapp_reg_8 *regs, int len) + const struct smiapp_reg_8 *regs, int len) { struct i2c_client *client = v4l2_get_subdevdata(>src->sd); int rval; @@ -71,7 +71,7 @@ static int jt8ew9_limits(struct smiapp_sensor *sensor) static int jt8ew9_post_poweron(struct smiapp_sensor *sensor) { - struct smiapp_reg_8 regs[] = { + const struct smiapp_reg_8 regs[] = { { 0x30a3, 0xd8 }, /* Output port control : LVDS ports only */ { 0x30ae, 0x00 }, /* 0x0307 pll_multiplier maximum value on PLL input 9.6MHz ( 19.2MHz is divided on pre_pll_div) */ { 0x30af, 0xd0 }, /* 0x0307 pll_multiplier maximum value on PLL input 9.6MHz ( 19.2MHz is divided on pre_pll_div) */ @@ -115,7 +115,7 @@ const struct smiapp_quirk smiapp_jt8ew9_quirk = { static int imx125es_post_poweron(struct smiapp_sensor *sensor) { /* Taken from v02. No idea what the other two are. */ - struct smiapp_reg_8 regs[] = { + const struct smiapp_reg_8 regs[] = { /* * 0x3302: clk during frame blanking: * 0x00 - HS mode, 0x01 - LP11 @@ -145,8 +145,7 @@ static int jt8ev1_post_poweron(struct smiapp_sensor *sensor) { struct i2c_client *client = v4l2_get_subdevdata(>src->sd); int rval; - - struct smiapp_reg_8 regs[] = { + const struct smiapp_reg_8 regs[] = { { 0x3031, 0xcd }, /* For digital binning (EQ_MONI) */ { 0x30a3, 0xd0 }, /* FLASH STROBE enable */ { 0x3237, 0x00 }, /* For control of pulse timing for ADC */ @@ -167,8 +166,7 @@ static int jt8ev1_post_poweron(struct smiapp_sensor *sensor) { 0x33cf, 0xec }, /* For Black sun */ { 0x3328, 0x80 }, /* Ugh. No idea what's this. */ }; - - struct smiapp_reg_8 regs_96[] = { + const struct smiapp_reg_8 regs_96[] = { { 0x30ae, 0x00 }, /* For control of ADC clock */ { 0x30af, 0xd0 }, { 0x30b0, 0x01 }, -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/5] smiapp cleanups, retry probe if getting clock fails
Hi all, These patches contain cleanups for the smiapp driver and return -EPROBE_DEFER if getting the clock fails. -- Kind regards, Sakari -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] smiapp: Unify enforced and need-based 8-bit read
From: Sakari AilusUnify enforced 8-bit read access with that based on actual need. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-regs.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c b/drivers/media/i2c/smiapp/smiapp-regs.c index 6b6c20b..1e501c0 100644 --- a/drivers/media/i2c/smiapp/smiapp-regs.c +++ b/drivers/media/i2c/smiapp/smiapp-regs.c @@ -188,7 +188,8 @@ int smiapp_read_no_quirk(struct smiapp_sensor *sensor, u32 reg, u32 *val) SMIAPP_QUIRK_FLAG_8BIT_READ_ONLY)); } -int smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val) +static int smiapp_read_quirk(struct smiapp_sensor *sensor, u32 reg, u32 *val, +bool force8) { int rval; @@ -199,21 +200,20 @@ int smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val) if (rval < 0) return rval; + if (force8) + return __smiapp_read(sensor, reg, val, true); + return smiapp_read_no_quirk(sensor, reg, val); } -int smiapp_read_8only(struct smiapp_sensor *sensor, u32 reg, u32 *val) +int smiapp_read(struct smiapp_sensor *sensor, u32 reg, u32 *val) { - int rval; - - *val = 0; - rval = smiapp_call_quirk(sensor, reg_access, false, , val); - if (rval == -ENOIOCTLCMD) - return 0; - if (rval < 0) - return rval; + return smiapp_read_quirk(sensor, reg, val, false); +} - return __smiapp_read(sensor, reg, val, true); +int smiapp_read_8only(struct smiapp_sensor *sensor, u32 reg, u32 *val) +{ + return smiapp_read_quirk(sensor, reg, val, true); } int smiapp_write_no_quirk(struct smiapp_sensor *sensor, u32 reg, u32 val) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] smiapp: Switch to gpiod API for GPIO control
Switch from the old gpio API to the new descriptor based gpiod API. Signed-off-by: Sakari Ailus--- drivers/media/i2c/smiapp/smiapp-core.c | 28 +++- drivers/media/i2c/smiapp/smiapp.h | 1 + 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index aaf5299..d07e060 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -24,8 +24,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -1212,8 +1212,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) } usleep_range(1000, 1000); - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 1); + gpiod_set_value(sensor->xshutdown, 1); sleep = SMIAPP_RESET_DELAY(sensor->hwcfg->ext_clk); usleep_range(sleep, sleep); @@ -1322,8 +1321,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) return 0; out_cci_addr_fail: - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else @@ -1348,8 +1346,7 @@ static void smiapp_power_off(struct smiapp_sensor *sensor) SMIAPP_REG_U8_SOFTWARE_RESET, SMIAPP_SOFTWARE_RESET); - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else @@ -2571,7 +2568,11 @@ static int smiapp_init(struct smiapp_sensor *sensor) } } - if (gpio_is_valid(sensor->hwcfg->xshutdown)) { + if (client->dev.of_node) { + sensor->xshutdown = + devm_gpiod_get_optional(>dev, "xshutdown", + GPIOD_OUT_LOW); + } else if (gpio_is_valid(sensor->hwcfg->xshutdown)) { rval = devm_gpio_request_one( >dev, sensor->hwcfg->xshutdown, 0, "SMIA++ xshutdown"); @@ -2581,8 +2582,13 @@ static int smiapp_init(struct smiapp_sensor *sensor) sensor->hwcfg->xshutdown); return rval; } + + sensor->xshutdown = gpio_to_desc(sensor->hwcfg->xshutdown); } + if (!sensor->xshutdown) + dev_dbg(>dev, "no xshutdown GPIO available\n"); + rval = smiapp_power_on(sensor); if (rval) return -ENODEV; @@ -3019,9 +3025,6 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev) hwcfg->lanes = bus_cfg->bus.mipi_csi2.num_data_lanes; dev_dbg(dev, "lanes %u\n", hwcfg->lanes); - /* xshutdown GPIO is optional */ - hwcfg->xshutdown = of_get_named_gpio(dev->of_node, "reset-gpios", 0); - /* NVM size is not mandatory */ of_property_read_u32(dev->of_node, "nokia,nvm-size", >nvm_size); @@ -3119,8 +3122,7 @@ static int smiapp_remove(struct i2c_client *client) v4l2_async_unregister_subdev(subdev); if (sensor->power_count) { - if (gpio_is_valid(sensor->hwcfg->xshutdown)) - gpio_set_value(sensor->hwcfg->xshutdown, 0); + gpiod_set_value(sensor->xshutdown, 0); if (sensor->hwcfg->set_xclk) sensor->hwcfg->set_xclk(>src->sd, 0); else diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index 6ff095a..c504bd8 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -200,6 +200,7 @@ struct smiapp_sensor { struct smiapp_hwconfig *hwcfg; struct regulator *vana; struct clk *ext_clk; + struct gpio_desc *xshutdown; u32 limits[SMIAPP_LIMIT_LAST]; u8 nbinning_subtypes; struct smiapp_binning_subtype binning_subtypes[SMIAPP_BINNING_SUBTYPES]; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/5] smiapp: Return -EPROBE_DEFER if the clock cannot be obtained
The clock may be provided by a driver which is yet to probe. Signed-off-by: Sakari Ailus--- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 92a6859..aaf5299 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2558,7 +2558,7 @@ static int smiapp_init(struct smiapp_sensor *sensor) sensor->ext_clk = devm_clk_get(>dev, NULL); if (IS_ERR(sensor->ext_clk)) { dev_err(>dev, "could not get clock\n"); - return PTR_ERR(sensor->ext_clk); + return -EPROBE_DEFER; } rval = clk_set_rate(sensor->ext_clk, -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] smiapp: Rename smiapp_platform_data as smiapp_hwconfig
This is really configuration to the driver originating from DT or elsewhere. Do not call it platform data. Signed-off-by: Sakari Ailus--- drivers/media/i2c/smiapp/smiapp-core.c | 140 drivers/media/i2c/smiapp/smiapp-quirk.c | 4 +- drivers/media/i2c/smiapp/smiapp.h | 2 +- include/media/i2c/smiapp.h | 2 +- 4 files changed, 74 insertions(+), 74 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index d08ab6c..92a6859 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -625,12 +625,12 @@ static int smiapp_init_late_controls(struct smiapp_sensor *sensor) 0, max_value, 1, max_value); } - for (max = 0; sensor->platform_data->op_sys_clock[max + 1]; max++); + for (max = 0; sensor->hwcfg->op_sys_clock[max + 1]; max++); sensor->link_freq = v4l2_ctrl_new_int_menu( >src->ctrl_handler, _ctrl_ops, V4L2_CID_LINK_FREQ, __fls(*valid_link_freqs), - __ffs(*valid_link_freqs), sensor->platform_data->op_sys_clock); + __ffs(*valid_link_freqs), sensor->hwcfg->op_sys_clock); return sensor->src->ctrl_handler.error; } @@ -833,8 +833,8 @@ static int smiapp_get_mbus_formats(struct smiapp_sensor *sensor) pll->bits_per_pixel = f->compressed; - for (j = 0; sensor->platform_data->op_sys_clock[j]; j++) { - pll->link_freq = sensor->platform_data->op_sys_clock[j]; + for (j = 0; sensor->hwcfg->op_sys_clock[j]; j++) { + pll->link_freq = sensor->hwcfg->op_sys_clock[j]; rval = smiapp_pll_try(sensor, pll); dev_dbg(>dev, "link freq %u Hz, bpp %u %s\n", @@ -1032,22 +1032,22 @@ static int smiapp_change_cci_addr(struct smiapp_sensor *sensor) int rval; u32 val; - client->addr = sensor->platform_data->i2c_addr_dfl; + client->addr = sensor->hwcfg->i2c_addr_dfl; rval = smiapp_write(sensor, SMIAPP_REG_U8_CCI_ADDRESS_CONTROL, - sensor->platform_data->i2c_addr_alt << 1); + sensor->hwcfg->i2c_addr_alt << 1); if (rval) return rval; - client->addr = sensor->platform_data->i2c_addr_alt; + client->addr = sensor->hwcfg->i2c_addr_alt; /* verify addr change went ok */ rval = smiapp_read(sensor, SMIAPP_REG_U8_CCI_ADDRESS_CONTROL, ); if (rval) return rval; - if (val != sensor->platform_data->i2c_addr_alt << 1) + if (val != sensor->hwcfg->i2c_addr_alt << 1) return -ENODEV; return 0; @@ -1061,13 +1061,13 @@ static int smiapp_change_cci_addr(struct smiapp_sensor *sensor) static int smiapp_setup_flash_strobe(struct smiapp_sensor *sensor) { struct smiapp_flash_strobe_parms *strobe_setup; - unsigned int ext_freq = sensor->platform_data->ext_clk; + unsigned int ext_freq = sensor->hwcfg->ext_clk; u32 tmp; u32 strobe_adjustment; u32 strobe_width_high_rs; int rval; - strobe_setup = sensor->platform_data->strobe_setup; + strobe_setup = sensor->hwcfg->strobe_setup; /* * How to calculate registers related to strobe length. Please @@ -1179,7 +1179,7 @@ static int smiapp_setup_flash_strobe(struct smiapp_sensor *sensor) strobe_setup->trigger); out: - sensor->platform_data->strobe_setup->trigger = 0; + sensor->hwcfg->strobe_setup->trigger = 0; return rval; } @@ -1201,9 +1201,9 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) } usleep_range(1000, 1000); - if (sensor->platform_data->set_xclk) - rval = sensor->platform_data->set_xclk( - >src->sd, sensor->platform_data->ext_clk); + if (sensor->hwcfg->set_xclk) + rval = sensor->hwcfg->set_xclk( + >src->sd, sensor->hwcfg->ext_clk); else rval = clk_prepare_enable(sensor->ext_clk); if (rval < 0) { @@ -1212,10 +1212,10 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) } usleep_range(1000, 1000); - if (gpio_is_valid(sensor->platform_data->xshutdown)) - gpio_set_value(sensor->platform_data->xshutdown, 1); + if (gpio_is_valid(sensor->hwcfg->xshutdown)) + gpio_set_value(sensor->hwcfg->xshutdown, 1); - sleep = SMIAPP_RESET_DELAY(sensor->platform_data->ext_clk); + sleep = SMIAPP_RESET_DELAY(sensor->hwcfg->ext_clk); usleep_range(sleep, sleep); /* @@ -1229,7 +1229,7 @@ static int smiapp_power_on(struct smiapp_sensor *sensor) * is found. */ -
Hello linux
hi linux http://www.paolahsanchez.com/cream.php?section=zwk1p7a6azpbu82 Philip -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v4.8] Two cec bug fixes
Two CEC bug fixes that should go into 4.8. Regards, Hans The following changes since commit fb6609280db902bd5d34445fba1c926e95e63914: [media] dvb_frontend: Use memdup_user() rather than duplicating its implementation (2016-08-24 17:20:45 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git for-v4.8c for you to fetch changes up to 7f1d4c0bb422351f494fb276a5457026800b: cec: fix ioctl return code when not registered (2016-08-31 08:47:28 +0200) Hans Verkuil (2): cec: don't Feature Abort broadcast msgs when unregistered cec: fix ioctl return code when not registered drivers/staging/media/cec/cec-adap.c | 3 +-- drivers/staging/media/cec/cec-api.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html