Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'media/v4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

- Revert a dt-bindings patch whose driver didn't make for 4.20

- fix a kernel oops at vicodec driver

- fix a frame overflow at gspca with was causing regressions on some
cameras, making them to not work

- use the proper type for wait_queue head

- make media request API compatible with 32-bit userspace on 64-bit
kernel

- fix a regression on Kernel 4.19 at dvb-pll

- don't use SPDX headers yet for GFDL

* tag 'media/v4.20-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: mediactl docs: Fix licensing message
media: dvb-pll: don't re-validate tuner frequencies
media: dvb-pll: fix tuner frequency ranges
media: Revert "media: dt-bindings: Document the Rockchip VPU bindings"
media: gspca: fix frame overflow error
media: vicodec: fix memchr() kernel oops
media: cedrus: add action item to the TODO
media: media-request: Add compat ioctl
media: Use wait_queue_head_t for media_request

+240 -101
-29
Documentation/devicetree/bindings/media/rockchip-vpu.txt
··· 1 - device-tree bindings for rockchip VPU codec 2 - 3 - Rockchip (Video Processing Unit) present in various Rockchip platforms, 4 - such as RK3288 and RK3399. 5 - 6 - Required properties: 7 - - compatible: value should be one of the following 8 - "rockchip,rk3288-vpu"; 9 - "rockchip,rk3399-vpu"; 10 - - interrupts: encoding and decoding interrupt specifiers 11 - - interrupt-names: should be "vepu" and "vdpu" 12 - - clocks: phandle to VPU aclk, hclk clocks 13 - - clock-names: should be "aclk" and "hclk" 14 - - power-domains: phandle to power domain node 15 - - iommus: phandle to a iommu node 16 - 17 - Example: 18 - SoC-specific DT entry: 19 - vpu: video-codec@ff9a0000 { 20 - compatible = "rockchip,rk3288-vpu"; 21 - reg = <0x0 0xff9a0000 0x0 0x800>; 22 - interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 23 - <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 24 - interrupt-names = "vepu", "vdpu"; 25 - clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; 26 - clock-names = "aclk", "hclk"; 27 - power-domains = <&power RK3288_PD_VIDEO>; 28 - iommus = <&vpu_mmu>; 29 - };
+25 -1
Documentation/media/uapi/mediactl/media-ioc-request-alloc.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _media_ioc_request_alloc: 4 28
+25 -1
Documentation/media/uapi/mediactl/media-request-ioc-queue.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _media_request_ioc_queue: 4 28
+25 -1
Documentation/media/uapi/mediactl/media-request-ioc-reinit.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _media_request_ioc_reinit: 4 28
+25 -1
Documentation/media/uapi/mediactl/request-api.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _media-request-api: 4 28
+25 -1
Documentation/media/uapi/mediactl/request-func-close.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _request-func-close: 4 28
+25 -1
Documentation/media/uapi/mediactl/request-func-ioctl.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _request-func-ioctl: 4 28
+25 -1
Documentation/media/uapi/mediactl/request-func-poll.rst
··· 1 - .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 1 + .. This file is dual-licensed: you can use it either under the terms 2 + .. of the GPL or the GFDL 1.1+ license, at your option. Note that this 3 + .. dual licensing only applies to this file, and not this project as a 4 + .. whole. 5 + .. 6 + .. a) This file is free software; you can redistribute it and/or 7 + .. modify it under the terms of the GNU General Public License as 8 + .. published by the Free Software Foundation; either version 2 of 9 + .. the License, or (at your option) any later version. 10 + .. 11 + .. This file is distributed in the hope that it will be useful, 12 + .. but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + .. GNU General Public License for more details. 15 + .. 16 + .. Or, alternatively, 17 + .. 18 + .. b) Permission is granted to copy, distribute and/or modify this 19 + .. document under the terms of the GNU Free Documentation License, 20 + .. Version 1.1 or any later version published by the Free Software 21 + .. Foundation, with no Invariant Sections, no Front-Cover Texts 22 + .. and no Back-Cover Texts. A copy of the license is included at 23 + .. Documentation/media/uapi/fdl-appendix.rst. 24 + .. 25 + .. TODO: replace it to GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections 2 26 3 27 .. _request-func-poll: 4 28
+48 -58
drivers/media/dvb-frontends/dvb-pll.c
··· 80 80 81 81 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = { 82 82 .name = "Thomson dtt7579", 83 - .min = 177000000, 84 - .max = 858000000, 83 + .min = 177 * MHz, 84 + .max = 858 * MHz, 85 85 .iffreq= 36166667, 86 86 .sleepdata = (u8[]){ 2, 0xb4, 0x03 }, 87 87 .count = 4, ··· 102 102 103 103 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = { 104 104 .name = "Thomson dtt759x", 105 - .min = 177000000, 106 - .max = 896000000, 105 + .min = 177 * MHz, 106 + .max = 896 * MHz, 107 107 .set = thomson_dtt759x_bw, 108 108 .iffreq= 36166667, 109 109 .sleepdata = (u8[]){ 2, 0x84, 0x03 }, ··· 126 126 127 127 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = { 128 128 .name = "Thomson dtt7520x", 129 - .min = 185000000, 130 - .max = 900000000, 129 + .min = 185 * MHz, 130 + .max = 900 * MHz, 131 131 .set = thomson_dtt7520x_bw, 132 132 .iffreq = 36166667, 133 133 .count = 7, ··· 144 144 145 145 static const struct dvb_pll_desc dvb_pll_lg_z201 = { 146 146 .name = "LG z201", 147 - .min = 174000000, 148 - .max = 862000000, 147 + .min = 174 * MHz, 148 + .max = 862 * MHz, 149 149 .iffreq= 36166667, 150 150 .sleepdata = (u8[]){ 2, 0xbc, 0x03 }, 151 151 .count = 5, ··· 160 160 161 161 static const struct dvb_pll_desc dvb_pll_unknown_1 = { 162 162 .name = "unknown 1", /* used by dntv live dvb-t */ 163 - .min = 174000000, 164 - .max = 862000000, 163 + .min = 174 * MHz, 164 + .max = 862 * MHz, 165 165 .iffreq= 36166667, 166 166 .count = 9, 167 167 .entries = { ··· 182 182 */ 183 183 static const struct dvb_pll_desc dvb_pll_tua6010xs = { 184 184 .name = "Infineon TUA6010XS", 185 - .min = 44250000, 186 - .max = 858000000, 185 + .min = 44250 * kHz, 186 + .max = 858 * MHz, 187 187 .iffreq= 36125000, 188 188 .count = 3, 189 189 .entries = { ··· 196 196 /* Panasonic env57h1xd5 (some Philips PLL ?) */ 197 197 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = { 198 198 .name = "Panasonic ENV57H1XD5", 199 - .min = 44250000, 200 - .max = 858000000, 199 + .min = 44250 * kHz, 200 + .max = 858 * MHz, 201 201 .iffreq= 36125000, 202 202 .count = 4, 203 203 .entries = { ··· 220 220 221 221 static const struct dvb_pll_desc dvb_pll_tda665x = { 222 222 .name = "Philips TDA6650/TDA6651", 223 - .min = 44250000, 224 - .max = 858000000, 223 + .min = 44250 * kHz, 224 + .max = 858 * MHz, 225 225 .set = tda665x_bw, 226 226 .iffreq= 36166667, 227 227 .initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab }, ··· 254 254 255 255 static const struct dvb_pll_desc dvb_pll_tua6034 = { 256 256 .name = "Infineon TUA6034", 257 - .min = 44250000, 258 - .max = 858000000, 257 + .min = 44250 * kHz, 258 + .max = 858 * MHz, 259 259 .iffreq= 36166667, 260 260 .count = 3, 261 261 .set = tua6034_bw, ··· 278 278 279 279 static const struct dvb_pll_desc dvb_pll_tded4 = { 280 280 .name = "ALPS TDED4", 281 - .min = 47000000, 282 - .max = 863000000, 281 + .min = 47 * MHz, 282 + .max = 863 * MHz, 283 283 .iffreq= 36166667, 284 284 .set = tded4_bw, 285 285 .count = 4, ··· 296 296 */ 297 297 static const struct dvb_pll_desc dvb_pll_tdhu2 = { 298 298 .name = "ALPS TDHU2", 299 - .min = 54000000, 300 - .max = 864000000, 299 + .min = 54 * MHz, 300 + .max = 864 * MHz, 301 301 .iffreq= 44000000, 302 302 .count = 4, 303 303 .entries = { ··· 313 313 */ 314 314 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = { 315 315 .name = "Samsung TBMV30111IN / TBMV30712IN1", 316 - .min = 54000000, 317 - .max = 860000000, 316 + .min = 54 * MHz, 317 + .max = 860 * MHz, 318 318 .iffreq= 44000000, 319 319 .count = 6, 320 320 .entries = { ··· 332 332 */ 333 333 static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = { 334 334 .name = "Philips SD1878", 335 - .min = 950000, 336 - .max = 2150000, 335 + .min = 950 * MHz, 336 + .max = 2150 * MHz, 337 337 .iffreq= 249, /* zero-IF, offset 249 is to round up */ 338 338 .count = 4, 339 339 .entries = { ··· 398 398 399 399 static const struct dvb_pll_desc dvb_pll_opera1 = { 400 400 .name = "Opera Tuner", 401 - .min = 900000, 402 - .max = 2250000, 401 + .min = 900 * MHz, 402 + .max = 2250 * MHz, 403 403 .initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 }, 404 404 .initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 }, 405 405 .iffreq= 0, ··· 445 445 /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */ 446 446 static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = { 447 447 .name = "Samsung DTOS403IH102A", 448 - .min = 44250000, 449 - .max = 858000000, 448 + .min = 44250 * kHz, 449 + .max = 858 * MHz, 450 450 .iffreq = 36125000, 451 451 .count = 8, 452 452 .set = samsung_dtos403ih102a_set, ··· 465 465 /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */ 466 466 static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = { 467 467 .name = "Samsung TDTC9251DH0", 468 - .min = 48000000, 469 - .max = 863000000, 468 + .min = 48 * MHz, 469 + .max = 863 * MHz, 470 470 .iffreq = 36166667, 471 471 .count = 3, 472 472 .entries = { ··· 479 479 /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ 480 480 static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = { 481 481 .name = "Samsung TBDU18132", 482 - .min = 950000, 483 - .max = 2150000, /* guesses */ 482 + .min = 950 * MHz, 483 + .max = 2150 * MHz, /* guesses */ 484 484 .iffreq = 0, 485 485 .count = 2, 486 486 .entries = { ··· 500 500 /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */ 501 501 static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = { 502 502 .name = "Samsung TBMU24112", 503 - .min = 950000, 504 - .max = 2150000, /* guesses */ 503 + .min = 950 * MHz, 504 + .max = 2150 * MHz, /* guesses */ 505 505 .iffreq = 0, 506 506 .count = 2, 507 507 .entries = { ··· 521 521 * 822 - 862 1 * 0 0 1 0 0 0 0x88 */ 522 522 static const struct dvb_pll_desc dvb_pll_alps_tdee4 = { 523 523 .name = "ALPS TDEE4", 524 - .min = 47000000, 525 - .max = 862000000, 524 + .min = 47 * MHz, 525 + .max = 862 * MHz, 526 526 .iffreq = 36125000, 527 527 .count = 4, 528 528 .entries = { ··· 537 537 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */ 538 538 static const struct dvb_pll_desc dvb_pll_tua6034_friio = { 539 539 .name = "Infineon TUA6034 ISDB-T (Friio)", 540 - .min = 90000000, 541 - .max = 770000000, 540 + .min = 90 * MHz, 541 + .max = 770 * MHz, 542 542 .iffreq = 57000000, 543 543 .initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 }, 544 544 .sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b }, ··· 553 553 /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */ 554 554 static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = { 555 555 .name = "Philips TDA6651 ISDB-T (EarthSoft PT1)", 556 - .min = 90000000, 557 - .max = 770000000, 556 + .min = 90 * MHz, 557 + .max = 770 * MHz, 558 558 .iffreq = 57000000, 559 559 .initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 }, 560 560 .count = 10, ··· 609 609 const struct dvb_pll_desc *desc = priv->pll_desc; 610 610 u32 div; 611 611 int i; 612 - 613 - if (frequency && (frequency < desc->min || frequency > desc->max)) 614 - return -EINVAL; 615 612 616 613 for (i = 0; i < desc->count; i++) { 617 614 if (frequency > desc->entries[i].limit) ··· 796 799 struct dvb_pll_priv *priv = NULL; 797 800 int ret; 798 801 const struct dvb_pll_desc *desc; 799 - struct dtv_frontend_properties *c = &fe->dtv_property_cache; 800 802 801 803 b1 = kmalloc(1, GFP_KERNEL); 802 804 if (!b1) ··· 841 845 842 846 strncpy(fe->ops.tuner_ops.info.name, desc->name, 843 847 sizeof(fe->ops.tuner_ops.info.name)); 844 - switch (c->delivery_system) { 845 - case SYS_DVBS: 846 - case SYS_DVBS2: 847 - case SYS_TURBO: 848 - case SYS_ISDBS: 849 - fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz; 850 - fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz; 851 - break; 852 - default: 853 - fe->ops.tuner_ops.info.frequency_min_hz = desc->min; 854 - fe->ops.tuner_ops.info.frequency_max_hz = desc->max; 855 - } 848 + 849 + fe->ops.tuner_ops.info.frequency_min_hz = desc->min; 850 + fe->ops.tuner_ops.info.frequency_max_hz = desc->max; 851 + 852 + dprintk("%s tuner, frequency range: %u...%u\n", 853 + desc->name, desc->min, desc->max); 856 854 857 855 if (!desc->initdata) 858 856 fe->ops.tuner_ops.init = NULL;
+3
drivers/media/media-request.c
··· 238 238 .owner = THIS_MODULE, 239 239 .poll = media_request_poll, 240 240 .unlocked_ioctl = media_request_ioctl, 241 + #ifdef CONFIG_COMPAT 242 + .compat_ioctl = media_request_ioctl, 243 + #endif /* CONFIG_COMPAT */ 241 244 .release = media_request_close, 242 245 }; 243 246
+2 -1
drivers/media/platform/vicodec/vicodec-core.c
··· 304 304 for (; p < p_out + sz; p++) { 305 305 u32 copy; 306 306 307 - p = memchr(p, magic[ctx->comp_magic_cnt], sz); 307 + p = memchr(p, magic[ctx->comp_magic_cnt], 308 + p_out + sz - p); 308 309 if (!p) { 309 310 ctx->comp_magic_cnt = 0; 310 311 break;
+6 -5
drivers/media/usb/gspca/gspca.c
··· 426 426 427 427 /* append the packet to the frame buffer */ 428 428 if (len > 0) { 429 - if (gspca_dev->image_len + len > gspca_dev->pixfmt.sizeimage) { 429 + if (gspca_dev->image_len + len > PAGE_ALIGN(gspca_dev->pixfmt.sizeimage)) { 430 430 gspca_err(gspca_dev, "frame overflow %d > %d\n", 431 431 gspca_dev->image_len + len, 432 - gspca_dev->pixfmt.sizeimage); 432 + PAGE_ALIGN(gspca_dev->pixfmt.sizeimage)); 433 433 packet_type = DISCARD_PACKET; 434 434 } else { 435 435 /* !! image is NULL only when last pkt is LAST or DISCARD ··· 1297 1297 unsigned int sizes[], struct device *alloc_devs[]) 1298 1298 { 1299 1299 struct gspca_dev *gspca_dev = vb2_get_drv_priv(vq); 1300 + unsigned int size = PAGE_ALIGN(gspca_dev->pixfmt.sizeimage); 1300 1301 1301 1302 if (*nplanes) 1302 - return sizes[0] < gspca_dev->pixfmt.sizeimage ? -EINVAL : 0; 1303 + return sizes[0] < size ? -EINVAL : 0; 1303 1304 *nplanes = 1; 1304 - sizes[0] = gspca_dev->pixfmt.sizeimage; 1305 + sizes[0] = size; 1305 1306 return 0; 1306 1307 } 1307 1308 1308 1309 static int gspca_buffer_prepare(struct vb2_buffer *vb) 1309 1310 { 1310 1311 struct gspca_dev *gspca_dev = vb2_get_drv_priv(vb->vb2_queue); 1311 - unsigned long size = gspca_dev->pixfmt.sizeimage; 1312 + unsigned long size = PAGE_ALIGN(gspca_dev->pixfmt.sizeimage); 1312 1313 1313 1314 if (vb2_plane_size(vb, 0) < size) { 1314 1315 gspca_err(gspca_dev, "buffer too small (%lu < %lu)\n",
+5
drivers/staging/media/sunxi/cedrus/TODO
··· 5 5 * Userspace support for the Request API needs to be reviewed; 6 6 * Another stateless decoder driver should be submitted; 7 7 * At least one stateless encoder driver should be submitted. 8 + * When queueing a request containing references to I frames, the 9 + refcount of the memory for those I frames needs to be incremented 10 + and decremented when the request is completed. This will likely 11 + require some help from vb2. The driver should fail the request 12 + if the memory/buffer is gone.
+1 -1
include/media/media-request.h
··· 68 68 unsigned int access_count; 69 69 struct list_head objects; 70 70 unsigned int num_incomplete_objects; 71 - struct wait_queue_head poll_wait; 71 + wait_queue_head_t poll_wait; 72 72 spinlock_t lock; 73 73 }; 74 74