<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/include/media/rc-core.h, branch dev-4.6</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-03-03T09:16:14+00:00</updated>
<entry>
<title>[media] rc-core: allow calling rc_open with device not initialized</title>
<updated>2016-03-03T09:16:14+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-03-02T11:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=078600f514a12fd763ac84c86af68ef5b5267563'/>
<id>urn:sha1:078600f514a12fd763ac84c86af68ef5b5267563</id>
<content type='text'>
The device initialization completes only after calling
input_register_device(). However, rc_open() can be called while
the device is being registered by the input/evdev core. So, we
can't expect that rc_dev-&gt;initialized to be true.

Change the logic to don't require initialized == true at rc_open
and change the type of initialized to be atomic.

this way, we can check for it earlier where it is really needed,
without needing to lock the mutex just for testing it.

Tested with nuvoton_cir driver on a NUC5i7RYB with CIR integrated on it.

Reported-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] rc-core: don't lock device at rc_register_device()</title>
<updated>2016-02-16T10:40:41+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2016-02-11T12:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c73bbaa4ec3eb225ffe468f80d45724d0496bf03'/>
<id>urn:sha1:c73bbaa4ec3eb225ffe468f80d45724d0496bf03</id>
<content type='text'>
The mutex lock at rc_register_device() was added by commit 08aeb7c9a42a
("[media] rc: add locking to fix register/show race").

It is meant to avoid race issues when trying to open a sysfs file while
the RC register didn't complete.

Adding a lock there causes troubles, as detected by the Kernel lock
debug instrumentation at the Kernel:

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    4.5.0-rc3+ #46 Not tainted
    -------------------------------------------------------
    systemd-udevd/2681 is trying to acquire lock:
     (s_active#171){++++.+}, at: [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0

    but task is already holding lock:
     (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;dev-&gt;lock){+.+.+.}:
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff822de966&gt;] mutex_lock_nested+0xb6/0x860
           [&lt;ffffffffa0721f2b&gt;] show_protocols+0x3b/0x3f0 [rc_core]
           [&lt;ffffffff81cdaba5&gt;] dev_attr_show+0x45/0xc0
           [&lt;ffffffff8171f1b3&gt;] sysfs_kf_seq_show+0x203/0x3c0
           [&lt;ffffffff8171a6a1&gt;] kernfs_seq_show+0x121/0x1b0
           [&lt;ffffffff81617c71&gt;] seq_read+0x2f1/0x1160
           [&lt;ffffffff8171c911&gt;] kernfs_fop_read+0x321/0x460
           [&lt;ffffffff815abc20&gt;] __vfs_read+0xe0/0x3d0
           [&lt;ffffffff815ae90e&gt;] vfs_read+0xde/0x2d0
           [&lt;ffffffff815b1d01&gt;] SyS_read+0x111/0x230
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    -&gt; #0 (s_active#171){++++.+}:
           [&lt;ffffffff81244f24&gt;] __lock_acquire+0x4304/0x5990
           [&lt;ffffffff8124817d&gt;] lock_acquire+0x13d/0x320
           [&lt;ffffffff81717d3a&gt;] __kernfs_remove+0x58a/0x810
           [&lt;ffffffff8171a115&gt;] kernfs_remove_by_name_ns+0x45/0xa0
           [&lt;ffffffff81721592&gt;] remove_files.isra.0+0x72/0x190
           [&lt;ffffffff8172174b&gt;] sysfs_remove_group+0x9b/0x150
           [&lt;ffffffff81721854&gt;] sysfs_remove_groups+0x54/0xa0
           [&lt;ffffffff81cd97d0&gt;] device_remove_attrs+0xb0/0x140
           [&lt;ffffffff81cdb27c&gt;] device_del+0x38c/0x6b0
           [&lt;ffffffffa0724b8b&gt;] rc_register_device+0x8cb/0x1450 [rc_core]
           [&lt;ffffffffa1326a7b&gt;] dvb_usb_remote_init+0x66b/0x14d0 [dvb_usb]
           [&lt;ffffffffa1321c81&gt;] dvb_usb_device_init+0xf21/0x1860 [dvb_usb]
           [&lt;ffffffffa13517dc&gt;] dib0700_probe+0x14c/0x410 [dvb_usb_dib0700]
           [&lt;ffffffff81dbb1dd&gt;] usb_probe_interface+0x45d/0x940
           [&lt;ffffffff81ce7e7a&gt;] driver_probe_device+0x21a/0xc30
           [&lt;ffffffff81ce89b1&gt;] __driver_attach+0x121/0x160
           [&lt;ffffffff81ce21bf&gt;] bus_for_each_dev+0x11f/0x1a0
           [&lt;ffffffff81ce6cdd&gt;] driver_attach+0x3d/0x50
           [&lt;ffffffff81ce5df9&gt;] bus_add_driver+0x4c9/0x770
           [&lt;ffffffff81cea39c&gt;] driver_register+0x18c/0x3b0
           [&lt;ffffffff81db6e98&gt;] usb_register_driver+0x1f8/0x440
           [&lt;ffffffffa074001e&gt;] dib0700_driver_init+0x1e/0x1000 [dvb_usb_dib0700]
           [&lt;ffffffff810021b1&gt;] do_one_initcall+0x141/0x300
           [&lt;ffffffff8144d8eb&gt;] do_init_module+0x1d0/0x5ad
           [&lt;ffffffff812f27b6&gt;] load_module+0x6666/0x9ba0
           [&lt;ffffffff812f5fe8&gt;] SyS_finit_module+0x108/0x130
           [&lt;ffffffff822e8636&gt;] entry_SYSCALL_64_fastpath+0x16/0x76

    other info that might help us debug this:

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(&amp;dev-&gt;lock);
                                   lock(s_active#171);
                                   lock(&amp;dev-&gt;lock);
      lock(s_active#171);

     *** DEADLOCK ***

    3 locks held by systemd-udevd/2681:
     #0:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8933&gt;] __driver_attach+0xa3/0x160
     #1:  (&amp;dev-&gt;mutex){......}, at: [&lt;ffffffff81ce8941&gt;] __driver_attach+0xb1/0x160
     #2:  (&amp;dev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0724def&gt;] rc_register_device+0xb2f/0x1450 [rc_core]

In this specific case, some error happened during device init,
causing IR to be disabled.

Let's fix it by adding a var that will tell when the device is
initialized. Any calls before that will return a -EINVAL.

That should prevent the race issues.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] rc-core: define a default timeout for drivers</title>
<updated>2015-11-19T08:50:59+00:00</updated>
<author>
<name>Eric Nelson</name>
<email>eric@nelint.com</email>
</author>
<published>2015-10-03T15:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c8e1bbc52d259a07a81b0f845191ee901ff44e01'/>
<id>urn:sha1:c8e1bbc52d259a07a81b0f845191ee901ff44e01</id>
<content type='text'>
A default timeout value of 125 ms should work for all decoders.

Declare a constant to help standardize its' use.

Signed-off-by: Eric Nelson &lt;eric@nelint.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media</title>
<updated>2015-09-06T01:21:14+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-09-06T01:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9cfcc658da9693f65e7224e8329e40ada2f3c699'/>
<id>urn:sha1:9cfcc658da9693f65e7224e8329e40ada2f3c699</id>
<content type='text'>
Pull media updates from Mauro Carvalho Chehab:
 - new DVB frontend drivers: ascot2e, cxd2841er, horus3a, lnbh25
 - new HDMI capture driver: tc358743
 - new driver for NetUP DVB new boards (netup_unidvb)
 - IR support for DVBSky cards (smipcie-ir)
 - Coda driver has gain macroblock tiling support
 - Renesas R-Car gains JPEG codec driver
 - new DVB platform driver for STi boards: c8sectpfe
 - added documentation for the media core kABI to device-drivers DocBook
 - lots of driver fixups, cleanups and improvements

* tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (297 commits)
  [media] c8sectpfe: Remove select on undefined LIBELF_32
  [media] i2c: fix platform_no_drv_owner.cocci warnings
  [media] cx231xx: Use wake_up_interruptible() instead of wake_up_interruptible_nr()
  [media] tc358743: only queue subdev notifications if devnode is set
  [media] tc358743: add missing Kconfig dependency/select
  [media] c8sectpfe: Use %pad to print 'dma_addr_t'
  [media] DocBook media: Fix typo "the the" in xml files
  [media] tc358743: make reset gpio optional
  [media] tc358743: set direction of reset gpio using devm_gpiod_get
  [media] dvbdev: document most of the functions/data structs
  [media] dvb_frontend.h: document the struct dvb_frontend
  [media] dvb-frontend.h: document struct dtv_frontend_properties
  [media] dvb-frontend.h: document struct dvb_frontend_ops
  [media] dvb: Use DVBFE_ALGO_HW where applicable
  [media] dvb_frontend.h: document struct analog_demod_ops
  [media] dvb_frontend.h: Document struct dvb_tuner_ops
  [media] Docbook: Document struct analog_parameters
  [media] dvb_frontend.h: get rid of dvbfe_modcod
  [media] add documentation for struct dvb_tuner_info
  [media] dvb_frontend: document dvb_frontend_tune_settings
  ...
</content>
</entry>
<entry>
<title>[media] Docbook: Fix s_rx_carrier_range parameter description</title>
<updated>2015-08-22T08:25:45+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2015-08-22T08:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fa810845efc4d3c0f159a3e7a35f009e0249c857'/>
<id>urn:sha1:fa810845efc4d3c0f159a3e7a35f009e0249c857</id>
<content type='text'>
Warning(.//include/media/rc-core.h:178): No description found for parameter 's_rx_carrier_range'
Warning(.//include/media/rc-core.h:178): Excess struct/union/enum/typedef member 's_rx_carrier' description in 'rc_dev'

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Revert "[media] rc: rc-ir-raw: Add scancode encoder callback"</title>
<updated>2015-08-19T10:04:49+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2015-07-20T19:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=72c5b7b24f3800bf8b1b1c78511c6da09d33c590'/>
<id>urn:sha1:72c5b7b24f3800bf8b1b1c78511c6da09d33c590</id>
<content type='text'>
This reverts commit 9869da5bacc5c9b865a183bd36c04be76cdd325d.

The current code is not mature enough, the API should allow a single
protocol to be specified. Also, the current code contains heuristics
that will depend on module load order.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Antti Seppälä &lt;a.seppala@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>Revert "[media] rc: rc-core: Add support for encode_wakeup drivers"</title>
<updated>2015-08-19T10:03:00+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2015-07-20T19:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3a03b86fdc1634e81d77f84e987c5a15426eff3d'/>
<id>urn:sha1:3a03b86fdc1634e81d77f84e987c5a15426eff3d</id>
<content type='text'>
This reverts commit 0d830b2d1295fee82546d57185da5a6604f11ae2.

The current code is not mature enough, the API should allow a single
protocol to be specified. Also, the current code contains heuristics
that will depend on module load order.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Antti Seppälä &lt;a.seppala@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>Revert "[media] rc: nuvoton-cir: Add support for writing wakeup samples via sysfs filter callback"</title>
<updated>2015-08-19T10:02:33+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2015-07-20T19:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=23f28f2adcf608170c9062b1f490c4f0dcc995e3'/>
<id>urn:sha1:23f28f2adcf608170c9062b1f490c4f0dcc995e3</id>
<content type='text'>
This reverts commit da7ee60b03bd66bb10974d7444aa444de6391312.

The current code is not mature enough, the API should allow a single
protocol to be specified. Also, the current code contains heuristics
that will depend on module load order.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Antti Seppälä &lt;a.seppala@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] rc-core: use an IDA rather than a bitmap</title>
<updated>2015-07-06T11:26:15+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2015-05-19T22:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fcb13097867757d360d5226d36ed3ffe849dc3ae'/>
<id>urn:sha1:fcb13097867757d360d5226d36ed3ffe849dc3ae</id>
<content type='text'>
This patch changes rc-core to use the kernel facilities that are already
available for handling unique numbers instead of rolling its own bitmap
stuff.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Tested-by: Stefan Lippers-Hollmann &lt;s.l-h@gmx.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] rc: set IR_MAX_DURATION to 500 ms</title>
<updated>2015-06-05T14:26:43+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@osg.samsung.com</email>
</author>
<published>2015-06-05T13:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6b20cf3c0fbd242a337b15577905785bd95ca529'/>
<id>urn:sha1:6b20cf3c0fbd242a337b15577905785bd95ca529</id>
<content type='text'>
The current definition is weird, and produce lots of sparse
warnings:

	drivers/media/i2c/cx25840/cx25840-ir.c:448 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/i2c/cx25840/cx25840-ir.c:461 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/i2c/cx25840/cx25840-ir.c:706 cx25840_ir_rx_read() warn: impossible condition '(v &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we previously assumed 'steal' could be null (see line 138)
	drivers/media/rc/streamzap.c:155 sz_push_full_pulse() warn: impossible condition '(rawir.duration &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/rc/streamzap.c:169 sz_push_full_pulse() warn: impossible condition '(rawir.duration &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/rc/redrat3.c:325 redrat3_us_to_len() warn: impossible condition '(microsec &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/rc/redrat3.c:383 redrat3_process_ir_data() warn: impossible condition '(rawir.duration &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648)
	drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649)
	drivers/media/pci/cx23885/cx23888-ir.c:463 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/pci/cx23885/cx23888-ir.c:476 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'
	drivers/media/pci/cx23885/cx23888-ir.c:696 cx23888_ir_rx_read() warn: impossible condition '(v &gt; 4294967295) =&gt; (0-u32max &gt; u32max)'

Use a more realistic value for it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
</feed>
