<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/dvb-core/dvb_frontend.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-01-11T14:18:52Z</updated>
<entry>
<title>[media] dvb: modify core to implement interfaces/entities at MC new gen</title>
<updated>2016-01-11T14:18:52Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-08-21T19:18:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df2f94e563edcbcb4b8652d05a3789d03b395366'/>
<id>urn:sha1:df2f94e563edcbcb4b8652d05a3789d03b395366</id>
<content type='text'>
The Media Controller New Generation redefines the types for both
interfaces and entities to be used on DVB. Make the needed
changes at the DVB core for all interfaces, entities and
data and interface links to appear in the graph.

Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: convert links from array to list</title>
<updated>2016-01-11T14:18:46Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-08-07T09:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57208e5e25f263d27ea00e530c95f62071573cb7'/>
<id>urn:sha1:57208e5e25f263d27ea00e530c95f62071573cb7</id>
<content type='text'>
The entire logic that represent graph links were developed on a
time where there were no needs to dynamic remove links. So,
although links are created/removed one by one via some
functions, they're stored as an array inside the entity struct.

As the array may grow, there's a logic inside the code that
checks if the amount of space is not enough to store
the needed links. If it isn't the core uses krealloc()
to change the size of the link, with is bad, as it
leaves the memory fragmented.

So, convert links into a list.

Also, currently,  both source and sink entities need the link
at the graph traversal logic inside media_entity. So there's
a logic duplicating all links. That makes it to spend
twice the memory needed. This is not a big deal for today's
usage, where the number of links are not big.

Yet, if during the MC workshop discussions, it was said that
IIO graphs could have up to 4,000 entities. So, we may
want to remove the duplication on some future. The problem
is that it would require a separate linked list to store
the backlinks inside the entity, or to use a more complex
algorithm to do graph backlink traversal, with is something
that the current graph traversal inside the core can't cope
with. So, let's postpone a such change if/when it is actually
needed.

It should also be noticed that the media_link structure uses
44 bytes on 32-bit architectures and 84 bytes on 64-bit
architecture. It will thus be allocated out of the 64-bytes and
96-bytes pools respectively. That's a 12.5% memory waste on
64-bit architectures and 31.25% on 32-bit architecture.
A linked list is less efficient than an array in this case, but
this could later be optimized if we can get rid of the reverse
links (with would reduce memory allocation by 50%).

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] fix dvb_frontend_sleep_until() logic</title>
<updated>2015-11-19T13:57:08Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-11-18T14:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a733a41a5057b47ed4a1f43d33166770ef83bc10'/>
<id>urn:sha1:a733a41a5057b47ed4a1f43d33166770ef83bc10</id>
<content type='text'>
As pointed by Laurent Navet:
	"Calling ktime_add_us() seems useless as is only useful
	 for it's return value which is ignored."

That's reported by coverity CID 1309761.

Laurent proposed to just remove ktime_add_us, but the fact is that
the logic of this function is broken. Instead, we need to use the
value of the timeout, and ensure that it will work on the loops
to emulate the legacy DiSEqC ioctl (FE_DISHNETWORK_SEND_LEGACY_CMD).

Please notice that the logic was also broken if, for any reason,
msleep() would sleep a little less than what it was expected, as
newdelta would be smaller than delta, and udelay() would not be called.

It should also be noticed that nobody noticed that trouble before
likely because the FE_DISHNETWORK_SEND_LEGACY_CMD is not used
anymore by modern DVB applications.

Reported-by: Laurent Navet &lt;laurent.navet@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode</title>
<updated>2015-11-18T15:27:03Z</updated>
<author>
<name>Malcolm Priestley</name>
</author>
<published>2015-08-31T09:13:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9d57de6103e343f2d4e04ea8d9e417e10a24da7'/>
<id>urn:sha1:c9d57de6103e343f2d4e04ea8d9e417e10a24da7</id>
<content type='text'>
When in FE_TUNE_MODE_ONESHOT the frontend must report
the actual capabilities so user can take appropriate
action.

With frontends that can't do auto inversion this is done
by dvb-core automatically so CAN_INVERSION_AUTO is valid.

However, when in FE_TUNE_MODE_ONESHOT this is not true.

So only set FE_CAN_INVERSION_AUTO in modes other than
FE_TUNE_MODE_ONESHOT

Signed-off-by: Malcolm Priestley &lt;tvboxspy@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb_frontend: resume tone and voltage</title>
<updated>2015-11-17T08:40:31Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-11-10T13:50:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3663b31b69222be90ce8bf346e0d5ba3b5ecbac0'/>
<id>urn:sha1:3663b31b69222be90ce8bf346e0d5ba3b5ecbac0</id>
<content type='text'>
As SEC tone and voltage could have changed during
suspend(), restore them to their previous values at
resume().

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb: document dvb_frontend_sleep_until()</title>
<updated>2015-11-17T08:37:16Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-11-10T01:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4deea4cb471354a8abdeecc9a571dfdbac8c2481'/>
<id>urn:sha1:4deea4cb471354a8abdeecc9a571dfdbac8c2481</id>
<content type='text'>
This function is used mainly at the DVB core, in order to provide
emulation for a legacy ioctl. The only current exception is
the stv0299 driver, with takes more than 8ms to switch voltage,
breaking the emulation for FE_DISHNETWORK_SEND_LEGACY_CMD.

Document that.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb: Use DVBFE_ALGO_HW where applicable</title>
<updated>2015-08-22T17:52:58Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-08-22T15:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27460adc07a3f84e671dec71ac553818d5988003'/>
<id>urn:sha1:27460adc07a3f84e671dec71ac553818d5988003</id>
<content type='text'>
The dvb_frontend.c core defines a FE_ALGO_HW symbol that it is
never used. Also, both cx24123 returns 1 to get_algo() callback
instead of using DVBFE_ALGO_HW.

Probably, those are some left overs from some code cleanup.

Let's stop returning magic numbers and use the proper macro
value.

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>[media] dvb-core: prevent some corruption the legacy ioctl</title>
<updated>2015-06-10T14:47:56Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2015-06-06T16:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d7e506350a3ff1b0659f7f5d65115a9be5ae37e'/>
<id>urn:sha1:8d7e506350a3ff1b0659f7f5d65115a9be5ae37e</id>
<content type='text'>
Quite a few of the -&gt;diseqc_send_master_cmd() implementations don't
check cmd-&gt;msg_len so it can lead to memory corruption.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb-frontend: Replace timeval with ktime_t</title>
<updated>2015-06-10T00:09:51Z</updated>
<author>
<name>Tina Ruchandani</name>
</author>
<published>2015-05-31T07:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9056a23ba19d911d4a079b8ca543fb8ebffa7c56'/>
<id>urn:sha1:9056a23ba19d911d4a079b8ca543fb8ebffa7c56</id>
<content type='text'>
struct timeval uses a 32-bit seconds representation which will
overflow in the year 2038 and beyond. This patch replaces
the usage of struct timeval with ktime_t which is a 64-bit
timestamp and is year 2038 safe.
This patch is part of a larger attempt to remove all instances
of 32-bit timekeeping variables (timeval, timespec, time_t)
which are not year 2038 safe, from the kernel.

[mchehab@osg.samsung.com: add a missing parenthesis, breaking compilation]
Suggested-by: Arnd Bergmann &lt;arndb@arndb.de&gt;
Signed-off-by: Tina Ruchandani &lt;ruchandani.tina@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] dvb: Get rid of typedev usage for enums</title>
<updated>2015-06-09T20:47:35Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2015-06-07T17:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0df289a209e02f0926042ab07d7d2595ea2d2e9b'/>
<id>urn:sha1:0df289a209e02f0926042ab07d7d2595ea2d2e9b</id>
<content type='text'>
The DVB API was originally defined using typedefs. This is against
Kernel CodingStyle, and there's no good usage here. While we can't
remove its usage on userspace, we can avoid its usage in Kernelspace.

So, let's do it.

This patch was generated by this shell script:

	for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," &lt;$i &gt;a &amp;&amp; mv a $i; done; done

While here, make CodingStyle fixes on the affected lines.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; # for drivers/media/firewire/*
</content>
</entry>
</feed>
