Re: [PATCH] [media] platform: Fix timberdale dependencies

2014-04-15 Thread Vinod Koul
On Thu, Apr 03, 2014 at 11:32:06AM +0200, Jean Delvare wrote:
> VIDEO_TIMBERDALE selects TIMB_DMA which itself depends on
> MFD_TIMBERDALE, so VIDEO_TIMBERDALE should either select or depend on
> MFD_TIMBERDALE as well. I chose to make it depend on it because I
> think it makes more sense and it is consistent with what other options
> are doing.
> 
> Adding a "|| HAS_IOMEM" to the TIMB_DMA dependencies silenced the
> kconfig warning about unmet direct dependencies but it was wrong:
> without MFD_TIMBERDALE, TIMB_DMA is useless as the driver has no
> device to bind to.

Applied, thanks

-- 
~Vinod
--
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


cron job: media_tree daily build: ERRORS

2014-04-15 Thread Hans Verkuil
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:   Wed Apr 16 04:00:12 CEST 2014
git branch: test
git hash:   30ece903f5470cf80971a5f2dc6924dd62d5d96c
gcc version:i686-linux-gcc (GCC) 4.8.2
sparse version: v0.5.0-11-g38d1124
host hardware:  x86_64
host os:3.13-7.slh.1-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: ERRORS
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.31.14-i686: WARNINGS
linux-2.6.32.27-i686: WARNINGS
linux-2.6.33.7-i686: WARNINGS
linux-2.6.34.7-i686: WARNINGS
linux-2.6.35.9-i686: WARNINGS
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: WARNINGS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: WARNINGS
linux-3.1.10-i686: WARNINGS
linux-3.2.37-i686: WARNINGS
linux-3.3.8-i686: WARNINGS
linux-3.4.27-i686: WARNINGS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: WARNINGS
linux-3.11.1-i686: WARNINGS
linux-3.12-i686: WARNINGS
linux-3.13-i686: WARNINGS
linux-3.14-i686: WARNINGS
linux-3.15-rc1-i686: WARNINGS
linux-2.6.31.14-x86_64: WARNINGS
linux-2.6.32.27-x86_64: WARNINGS
linux-2.6.33.7-x86_64: WARNINGS
linux-2.6.34.7-x86_64: WARNINGS
linux-2.6.35.9-x86_64: WARNINGS
linux-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: WARNINGS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: WARNINGS
linux-3.1.10-x86_64: WARNINGS
linux-3.2.37-x86_64: WARNINGS
linux-3.3.8-x86_64: WARNINGS
linux-3.4.27-x86_64: WARNINGS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-x86_64: WARNINGS
linux-3.12-x86_64: WARNINGS
linux-3.13-x86_64: WARNINGS
linux-3.14-x86_64: WARNINGS
linux-3.15-rc1-x86_64: WARNINGS
apps: OK
spec-git: OK
sparse version: v0.5.0-11-g38d1124
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.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: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Rahul Sharma
On 15 April 2014 19:59, Tomasz Stanislawski  wrote:
> On 04/15/2014 03:42 PM, Rahul Sharma wrote:
>> On 15 April 2014 18:41, Tomasz Stanislawski  wrote:
>>> On 04/15/2014 11:42 AM, Rahul Sharma wrote:
 Hi Tomasz,

 On 15 April 2014 14:57, Tomasz Stanislawski  
 wrote:
> Adds support for limitation of maximal pixel clock of HDMI
> signal. This feature is needed on boards that contains
> lines or bridges with frequency limitations.
>
> Signed-off-by: Tomasz Stanislawski 
> [snip]
>
> diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
> index 181642b..7272d65 100644
> --- a/include/media/s5p_hdmi.h
> +++ b/include/media/s5p_hdmi.h
> @@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
> int mhl_bus;
> struct i2c_board_info *mhl_info;
> int hpd_gpio;
> +   u32 max_pixel_clock;
>  };

 We have already removed Non DT support from the drm hdmi
 driver. IMO we should not be extending the pdata struct.

 Regards,
 Rahul Sharma
>>>
>>> Hi Rahul,
>>>
>>> This is not a non-DT patch. The s5p_hdmi_platform_data is
>>> generated from DT itself. This structure is just
>>> a parsed version of DT attributes.
>>>
>>> It may be a good idea to rename s5p_hdmi_platform_data
>>> to exynos_hdmi_pdata and move it to exynos_hdmi_drm.c file
>>> or parse DT directly in probe function.
>>>
>>> I can prepare a patch for that.
>>
>> Else we can completely remove the dependency from
>> s5p_hdmi_platform_data. We can directly assign to hdmi context
>> variables. Later we can remove that struct itself from include/.
>> What you say?
>
> This structure cannot be removed from include yet because it is used by 
> s5p-tv driver.
> However its usage can be removed from both drivers.
> I can prepare both.
>

yea correct. but if you doing it for both of them, it can be removed, I guess.
your call.

Regards,
Rahul Sharma

>>
>> Regards,
>> Rahul Sharma
>>
>
> Regards,
> Tomasz Stanislawski
>
>>>
>>> Regards,
>>> Tomasz Stanislawski
>>>
>>>

>
>  #endif /* S5P_HDMI_H */
> --
> 1.7.9.5
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
>>
>
--
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


Help with SMS2270 @ linux-sunxi (A20 devices)

2014-04-15 Thread Roberto Alcantara
Guys,

I’m trying enable Siano SMS2270 ISDB-T tuner in development board with 
Allwinner A20 SoC.

I recompiled kernel with modules I can load them but something seems wrong. 
After insert USB Sms2270 dongle I only see:

Jan  1 00:15:20 awsom kernel: [  922.645502] usb 1-1.4: new high-speed USB 
device number 6 using sw-ehci
Jan  1 00:15:20 awsom mtp-probe: checking bus 1, device 6: 
"/sys/devices/platform/sw-ehci.1/usb1/1-1/1-1.4"
Jan  1 00:15:20 awsom mtp-probe: bus: 1, device: 6 was not an MTP device

and no more logs.

smsusb was loaded with debug=2.

The usb dongle is plugged on usb powered hub and other devices like keyboard 
are working fine with this hub port.

What I missing here? Thanks for all tips !  :-)

Best regards,
 - Roberto


root@awsom:/home/linaro# lsmod
Module  Size  Used by
sunxi_cedar_mod10284  0
smsdvb 13909  0
smsusb  8936  0
smsmdtv28266  2 smsdvb,smsusb
disp_ump 854  0
mali_drm2638  1
mali  113459  0
ump56392  4 disp_ump,mali
lcd 3646  0

root@awsom:/home/linaro# lsusb
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0e8f:0021 GreenAsia Inc. Multimedia Keyboard Controller
Bus 001 Device 004: ID 187f:0600 Siano Mobile Silicon

root@awsom:/home/linaro# uname -a
Linux awsom 3.4.75.sun7i_CRAFF+ #4 SMP PREEMPT Thu Apr 10 01:17:47 BRT 2014 
armv7l armv7l armv7l GNU/Linux




root@awsom:/home/linaro# lsusb -v

Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 1 Single TT
  bMaxPacketSize064
  idVendor   0x058f Alcor Micro Corp.
  idProduct  0x6254 USB Hub
  bcdDevice1.00
  iManufacturer   0
  iProduct1 USB2.0Hub
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   25
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0
bmAttributes 0xe0
  Self Powered
  Remote Wakeup
MaxPower  100mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 9 Hub
  bInterfaceSubClass  0 Unused
  bInterfaceProtocol  0 Full speed (or root) hub
  iInterface  0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0001  1x 1 bytes
bInterval  12
Hub Descriptor:
  bLength   9
  bDescriptorType  41
  nNbrPorts 4
  wHubCharacteristic 0x0080
Ganged power switching
Ganged overcurrent protection
TT think time 8 FS bits
Port indicators
  bPwrOn2PwrGood   50 * 2 milli seconds
  bHubContrCurrent100 milli Ampere
  DeviceRemovable0x00
  PortPwrCtrlMask0xff
 Hub Port Status:
   Port 1: .0303 lowspeed power enable connect
   Port 2: .0100 power
   Port 3: .0100 power
   Port 4: .0503 highspeed power enable connect
Device Qualifier (for other device speed):
  bLength10
  bDescriptorType 6
  bcdUSB   2.00
  bDeviceClass9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize064
  bNumConfigurations  1
Device Status: 0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass9 Hub
  bDeviceSubClass 0 Unused
  bDeviceProtocol 0 Full speed (or root) hub
  bMaxPacketSize064
  idVendor   0x1d6b Linux Foundation
  idProduct  0x0002 2.0 root hub
  bcdDevice3.04
  iManufacturer   3 Linux 3.4.75.sun7i_CRAFF+ ehci_hcd
  iProduct2 SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
  iSerial 1 sw-ehci
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   25
 

Re: [PATCH] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices

2014-04-15 Thread Thomas Pugliese


On Tue, 15 Apr 2014, Laurent Pinchart wrote:

> Hi Thomas,
> 
> 
> Could you please send me a proper revert patch with the above description in 
> the commit message and CC Mauro Carvalho Chehab  ?
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

Hi Laurent, 
I can submit a patch to revert but I should make a correction first.  I 
had backported this change to an earlier kernel (2.6.39) which was before 
super speed support was added and the regression I described was based on 
that kernel.  It was actually the addition of super speed support that 
broke windows compatible devices.  My previous change fixed spec compliant 
devices but left windows compatible devices broken.

Basically, the timeline of changes is this:

1.  Prior to the addition of super speed support (commit 
6fd90db8df379e215): all WUSB devices were treated as HIGH_SPEED devices.  
This is how Windows works so Windows compatible devices would work.  For 
spec compliant WUSB devices, the max packet size would be incorrectly 
calculated which would result in high-bandwidth isoc streams being unable 
to find an alt setting that provided enough bandwidth.

2.  After super speed support: all WUSB devices fell through to the 
default case of uvc_endpoint_max_bpi which would mask off the upper bits 
of the max packet size.  This broke both WUSB spec compliant and non 
compliant devices because no endpoint with a large enough bpi would be 
found.

3.  After 79af67e77f86404e77e: Spec compliant devices are fixed but 
non-spec compliant (although Windows compatible) devices are broken.  
Basically, this is the opposite of how it worked prior to super speed 
support.

Given that, I can submit a patch to revert 79af67e77f86404e77e but that 
would go back to having all WUSB devices broken.  Alternatively, the 
change below will revert the behavior back to scenario 1 where Windows 
compatible devices work but strictly spec complaint devices may not.

I can send a proper patch for whichever scenario you prefer.

Thomas


diff --git a/drivers/media/usb/uvc/uvc_video.c 
b/drivers/media/usb/uvc/uvc_video.c
index 8d52baf..ed594d6 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1451,11 +1451,9 @@ static unsigned int uvc_endpoint_max_bpi(struct 
usb_device *dev,
case USB_SPEED_SUPER:
return ep->ss_ep_comp.wBytesPerInterval;
case USB_SPEED_HIGH:
-   psize = usb_endpoint_maxp(&ep->desc);
-   return (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
case USB_SPEED_WIRELESS:
psize = usb_endpoint_maxp(&ep->desc);
-   return psize;
+   return (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
default:
psize = usb_endpoint_maxp(&ep->desc);
return psize & 0x07ff;


--
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


spende /Donation

2014-04-15 Thread isabelle

Hallo
Wenn ich diese Nachricht zu senden wollte, ist dies nicht einfach Zufall. Dies 
ist, weil Ihre e-Mail vom elektronischen Roboter gesichert meine WX.7AR BW 
ausgewählt wurde.
Zunächst möchte ich mich für dieses Eindringen in Ihr Leben zu entschuldigen, 
obwohl ich zugeben, dass es mir sehr wichtig. Ich bin Isabelle Vasudev. Ich 
leide an Krebs im Hals seit nun mehr als 3 Jahre und eine halbe und es leider, 
mein Arzt hat gerade informiert mich, dass ich bin voller unheilbar und, dass 
meine Tage, wegen meinen etwas gezählt sind abgebaut Zustand. Ich bin eine 
Witwe und ich habe keine Kind, das ich beginne zu bedauern.
In der Tat ist der Grund, warum ich Sie kontaktieren bin, möchte ich einen Teil 
von meinem Grundstück zu spenden, weil ich niemand, wer die Erben konnte. Ich 
habe fast mein ganzes Zeug, darunter ein Unternehmen der Export von Holz, Gummi 
und Stahl-Industrie in Afrika, wo ich wohne nun mehr 10 Jahren, verkauft. Ein 
großer Teil der Gelder gesammelt wurde mit unterschiedlichen Verbänden 
humanitären Charakter überall in der Welt, aber besonders hier in Afrika 
bezahlt.
Im Hinblick auf den Rest der Summe genau in Höhe von 750.000, 00euros (sieben 
hundert und fünfzig tausend Euro) auf eine gesperrte Mitarbeiter-Account, meine 
letzte wünschen würde Sie es spenden, so dass Sie in Ihrer Branche und vor 
allem den humanitären investieren können. Ich bin ganz bewusst was ich zu tun 
beabsichtigen, und ich denke, trotz der Tatsache, die wir nicht wissen, werdet 
ihr diese Summe gut nutzen. Ich bitte Sie, bitte dieses Erbe zu akzeptieren, 
ohne jedoch Fragen Sie alles, was in zurückgeben wenn es nicht immer denken, 
gutes zu tun, um dich herum, was ich nicht getan habe, in meiner Existenz.
Das heißt, wird auf einer verantwortlichen Person und besonders gutem Glauben 
fallen zu lassen beruhigt, ich möchte bitten, dass Sie bitte mich bei den 
meisten schnell kontaktieren, um weitere Erklärung über die Gründe für meine 
Geste und den Verlauf der Dinge zu geben. Bitte kontaktieren Sie mich so bald 
wie möglich, wenn Sie mein Angebot akzeptieren.
Gott möge mit dir sein!
Ich fordere Sie auf, mich über meine persönliche e-Mail-Adresse zu kontaktieren:
isabelle.claude...@laposte.net
Der Frieden und Barmherzigkeit Gottes möge mit dir sein.
Mrs Isabelle

--
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] libdvbv5: improve CRC size handling

2014-04-15 Thread André Roth
- provide buffer without CRC to the table parsers
- remove unneeded defines

Signed-off-by: André Roth 
---
 lib/include/libdvbv5/descriptors.h | 3 +--
 lib/libdvbv5/dvb-scan.c| 2 +-
 lib/libdvbv5/tables/atsc_eit.c | 2 +-
 lib/libdvbv5/tables/cat.c  | 4 ++--
 lib/libdvbv5/tables/eit.c  | 2 +-
 lib/libdvbv5/tables/mgt.c  | 2 +-
 lib/libdvbv5/tables/nit.c  | 2 +-
 lib/libdvbv5/tables/pat.c  | 2 +-
 lib/libdvbv5/tables/pmt.c  | 4 ++--
 lib/libdvbv5/tables/sdt.c  | 4 ++--
 lib/libdvbv5/tables/vct.c  | 2 +-
 11 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/lib/include/libdvbv5/descriptors.h 
b/lib/include/libdvbv5/descriptors.h
index 66197f6..94d85a9 100644
--- a/lib/include/libdvbv5/descriptors.h
+++ b/lib/include/libdvbv5/descriptors.h
@@ -31,8 +31,7 @@
 #include 
 
 #define DVB_MAX_PAYLOAD_PACKET_SIZE 4096
-#define DVB_PID_SDT  17
-#define DVB_PMT_TABLE_ID 2
+#define DVB_CRC_SIZE 4
 
 struct dvb_v5_fe_parms;
 
diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
index 5cd38f8..b16f4c4 100644
--- a/lib/libdvbv5/dvb-scan.c
+++ b/lib/libdvbv5/dvb-scan.c
@@ -222,7 +222,7 @@ static int dvb_parse_section(struct dvb_v5_fe_parms *parms,
set_bit(h->section_id, priv->is_read_bits);
 
if (dvb_table_initializers[tid])
-   dvb_table_initializers[tid](parms, buf, buf_length,
+   dvb_table_initializers[tid](parms, buf, buf_length - 
DVB_CRC_SIZE,
 sect->table);
else
dvb_logerr("%s: no initializer for table %d",
diff --git a/lib/libdvbv5/tables/atsc_eit.c b/lib/libdvbv5/tables/atsc_eit.c
index 83a495c..cf69fff 100644
--- a/lib/libdvbv5/tables/atsc_eit.c
+++ b/lib/libdvbv5/tables/atsc_eit.c
@@ -25,7 +25,7 @@
 ssize_t atsc_table_eit_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
ssize_t buflen, struct atsc_table_eit **table)
 {
-   const uint8_t *p = buf, *endbuf = buf + buflen - 4; /* minus CRC */;
+   const uint8_t *p = buf, *endbuf = buf + buflen;
struct atsc_table_eit *eit;
struct atsc_table_eit_event **head;
size_t size;
diff --git a/lib/libdvbv5/tables/cat.c b/lib/libdvbv5/tables/cat.c
index 394eb3c..f5887b2 100644
--- a/lib/libdvbv5/tables/cat.c
+++ b/lib/libdvbv5/tables/cat.c
@@ -25,7 +25,7 @@
 ssize_t dvb_table_cat_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
ssize_t buflen, struct dvb_table_cat **table)
 {
-   const uint8_t *p = buf, *endbuf = buf + buflen - 4;
+   const uint8_t *p = buf, *endbuf = buf + buflen;
struct dvb_table_cat *cat;
struct dvb_desc **head_desc;
size_t size;
@@ -59,7 +59,7 @@ ssize_t dvb_table_cat_init(struct dvb_v5_fe_parms *parms, 
const uint8_t *buf,
while (*head_desc != NULL)
head_desc = &(*head_desc)->next;
 
-   size = cat->header.section_length + 3 - 4; /* plus header, minus CRC */
+   size = cat->header.section_length + 3 - DVB_CRC_SIZE; /* plus header, 
minus CRC */
if (buf + size > endbuf) {
dvb_logerr("%s: short read %zd/%zd bytes", __func__,
   endbuf - buf, size);
diff --git a/lib/libdvbv5/tables/eit.c b/lib/libdvbv5/tables/eit.c
index 1870722..ff68536 100644
--- a/lib/libdvbv5/tables/eit.c
+++ b/lib/libdvbv5/tables/eit.c
@@ -25,7 +25,7 @@
 ssize_t dvb_table_eit_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
ssize_t buflen, struct dvb_table_eit **table)
 {
-   const uint8_t *p = buf, *endbuf = buf + buflen - 4; /* minus CRC */
+   const uint8_t *p = buf, *endbuf = buf + buflen;
struct dvb_table_eit *eit;
struct dvb_table_eit_event **head;
size_t size;
diff --git a/lib/libdvbv5/tables/mgt.c b/lib/libdvbv5/tables/mgt.c
index bf77348..ffdea53 100644
--- a/lib/libdvbv5/tables/mgt.c
+++ b/lib/libdvbv5/tables/mgt.c
@@ -25,7 +25,7 @@
 ssize_t atsc_table_mgt_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
ssize_t buflen, struct atsc_table_mgt **table)
 {
-   const uint8_t *p = buf, *endbuf = buf + buflen - 4; /* minus CRC */
+   const uint8_t *p = buf, *endbuf = buf + buflen;
struct atsc_table_mgt *mgt;
struct atsc_table_mgt_table **head;
struct dvb_desc **head_desc;
diff --git a/lib/libdvbv5/tables/nit.c b/lib/libdvbv5/tables/nit.c
index 054b36b..243506d 100644
--- a/lib/libdvbv5/tables/nit.c
+++ b/lib/libdvbv5/tables/nit.c
@@ -25,7 +25,7 @@
 ssize_t dvb_table_nit_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
ssize_t buflen, struct dvb_table_nit **table)
 {
-   const uint8_t *p = buf, *endbuf = buf + buflen - 4;
+   const uint8_t *p = buf, *endbuf = buf + buflen;
struct dvb_table_nit *nit;
struct dvb_table_nit_transport **head;
struct dvb_desc **head_desc;
diff --git a/lib/libdvbv5/tables/pat.c

Re: Hauppauge ImpactVCB-e 01385

2014-04-15 Thread Steve Cookson


On 15/04/14 19:44, Steve Cookson wrote:

[ 13.237914] cx23885: disagrees about version of symbol altera_init
[   13.237917] cx23885: Unknown symbol altera_init (err -22) 

Is it a regression issue?

https://github.com/ljalves/linux_media/issues/2#issuecomment-23365778

I'm on 3.11.0-18.

Regards

Steve.
--
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: Hauppauge ImpactVCB-e 01385

2014-04-15 Thread Steve Cookson

Hi Hans,

On 15/04/14 18:13, Hans Verkuil wrote:

You may have to do a 'depmod -a' here. Try that first.

I tried that.  It worked fine.  No more error messages from

make -C .. rmmod


>11tried to modprobe cx23885, but got "invalid agrgument"

Somewhat strange error message. Does 'dmesg' give you any useful info?

However this error message is the same.  It actually:

ERROR: could not insert 'cx23885': Invalid argument
If I do a search for cx23885.ko, I find one that I have just created.  
If I cd to that directory and modprobe ./cx23885 I get no error messages.


However, lsmod | grep -i cx only finds cx2341x.

Dmesg continues to give:

[   13.237914] cx23885: disagrees about version of symbol altera_init
[   13.237917] cx23885: Unknown symbol altera_init (err -22)

altera_ci.ko is the only other file in 
/lib/modules/3.11.0-18-generic/kernel/drivers/media/pci/cx23885/*


Regards

Steve



--
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/4] libdvbv5: build dynamic libdvbv5 by default

2014-04-15 Thread André Roth
- renamed ./configure option --enable-libdvbv5 to --disable-libdvbv5
- thus libdvbv5 will be build shared by default
- cleanups in configure.ac

Signed-off-by: André Roth 
---
 configure.ac | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4080d1e..474c681 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,10 +216,10 @@ AC_DEFINE_DIR([IR_KEYTABLE_USER_DIR], [keytableuserdir], 
[ir-keytable user defin
 # options
 
 AC_ARG_ENABLE(libdvbv5,
-  AS_HELP_STRING([--enable-libdvbv5], [enable experimental dynamic libdvbv5 
compilation]),
+  AS_HELP_STRING([--disable-libdvbv5], [disable experimental dynamic libdvbv5 
compilation]),
   [case "${enableval}" in
  yes | no ) ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libdvbv5) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-libdvbv5) ;;
esac]
 )
 
@@ -227,7 +227,7 @@ AC_ARG_ENABLE(libv4l,
   AS_HELP_STRING([--disable-libv4l], [disable dynamic libv4l compilation]),
   [case "${enableval}" in
  yes | no ) ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libv4l) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-libv4l) ;;
esac]
 )
 
@@ -235,7 +235,7 @@ AC_ARG_ENABLE(v4l-utils,
   AS_HELP_STRING([--disable-v4l-utils], [disable v4l-utils compilation]),
   [case "${enableval}" in
  yes | no ) ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-v4l-utils) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l-utils) ;;
esac]
 )
 
@@ -247,17 +247,17 @@ AC_ARG_ENABLE(qv4l2,
esac]
 )
 
-AM_CONDITIONAL([WITH_LIBDVBV5], [test x$enable_libdvbv5 = xyes])
-AM_CONDITIONAL([WITH_LIBV4L], [test x$enable_libv4l != xno])
-AM_CONDITIONAL([WITH_V4LUTILS], [test x$enable_v4l_utils != "xno"])
-AM_CONDITIONAL([WITH_QV4L2], [test ${qt_pkgconfig} = true -a x$enable_qv4l2 != 
xno])
-AM_CONDITIONAL([WITH_V4L_PLUGINS], [test x$enable_libv4l != xno -a 
x$enable_shared != xno])
+AM_CONDITIONAL([WITH_LIBDVBV5], [test x$enable_libdvbv5  != xno])
+AM_CONDITIONAL([WITH_LIBV4L],   [test x$enable_libv4l!= xno])
+AM_CONDITIONAL([WITH_V4LUTILS],[test x$enable_v4l_utils != xno])
+AM_CONDITIONAL([WITH_QV4L2],   [test ${qt_pkgconfig}  = true -a 
x$enable_qv4l2 != xno])
+AM_CONDITIONAL([WITH_V4L_PLUGINS],  [test x$enable_libv4l != xno -a 
x$enable_shared != xno])
 AM_CONDITIONAL([WITH_V4L_WRAPPERS], [test x$enable_libv4l != xno -a 
x$enable_shared != xno])
-AM_CONDITIONAL([WITH_QTGL], [test ${qt_pkgconfig_gl} = true])
+AM_CONDITIONAL([WITH_QTGL],[test ${qt_pkgconfig_gl} = true])
 
 # append -static to libtool compile and link command to enforce static libs
-AS_IF([test x$enable_libdvbv5 != xyes], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], 
["-static"])])
-AS_IF([test x$enable_libv4l = xno], [AC_SUBST([ENFORCE_LIBV4L_STATIC], 
["-static"])])
+AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], 
["-static"])])
+AS_IF([test x$enable_libv4l = xno],   [AC_SUBST([ENFORCE_LIBV4L_STATIC],   
["-static"])])
 
 # misc
 
-- 
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/4] libdvbv5: cleanup parser API

2014-04-15 Thread André Roth
- fix initialization of dvb_table_initializers
- check return value of dvb_desc_parse
- allocate table inside the parser
- remove unneeded table_length argument

Signed-off-by: André Roth 
---
 lib/include/libdvbv5/atsc_eit.h|  2 +-
 lib/include/libdvbv5/cat.h |  2 +-
 lib/include/libdvbv5/descriptors.h | 18 ++-
 lib/include/libdvbv5/eit.h |  2 +-
 lib/include/libdvbv5/mgt.h |  2 +-
 lib/include/libdvbv5/nit.h |  2 +-
 lib/include/libdvbv5/pat.h |  2 +-
 lib/include/libdvbv5/pmt.h |  2 +-
 lib/include/libdvbv5/sdt.h |  2 +-
 lib/include/libdvbv5/vct.h |  2 +-
 lib/libdvbv5/descriptors.c |  5 ++--
 lib/libdvbv5/dvb-scan.c| 27 -
 lib/libdvbv5/tables/atsc_eit.c | 44 ++-
 lib/libdvbv5/tables/cat.c  | 28 +
 lib/libdvbv5/tables/eit.c  | 42 +-
 lib/libdvbv5/tables/mgt.c  | 54 -
 lib/libdvbv5/tables/nit.c  | 61 +-
 lib/libdvbv5/tables/pat.c  | 31 ++-
 lib/libdvbv5/tables/pmt.c  | 52 +++-
 lib/libdvbv5/tables/sdt.c  | 36 +++---
 lib/libdvbv5/tables/vct.c  | 47 -
 21 files changed, 219 insertions(+), 244 deletions(-)

diff --git a/lib/include/libdvbv5/atsc_eit.h b/lib/include/libdvbv5/atsc_eit.h
index 93d9304..5116a3d 100644
--- a/lib/include/libdvbv5/atsc_eit.h
+++ b/lib/include/libdvbv5/atsc_eit.h
@@ -77,7 +77,7 @@ struct dvb_v5_fe_parms;
 extern "C" {
 #endif
 
-ssize_t atsc_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t 
*buf, ssize_t buflen, struct atsc_table_eit *eit, ssize_t *table_length);
+ssize_t atsc_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t 
*buf, ssize_t buflen, struct atsc_table_eit **table);
 void atsc_table_eit_free(struct atsc_table_eit *eit);
 void atsc_table_eit_print(struct dvb_v5_fe_parms *parms, struct atsc_table_eit 
*eit);
 void atsc_time(const uint32_t start_time, struct tm *tm);
diff --git a/lib/include/libdvbv5/cat.h b/lib/include/libdvbv5/cat.h
index df1e417..134e3e5 100644
--- a/lib/include/libdvbv5/cat.h
+++ b/lib/include/libdvbv5/cat.h
@@ -40,7 +40,7 @@ struct dvb_v5_fe_parms;
 extern "C" {
 #endif
 
-ssize_t dvb_table_cat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, struct dvb_table_cat *cat, ssize_t *table_length);
+ssize_t dvb_table_cat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, struct dvb_table_cat **table);
 void dvb_table_cat_free(struct dvb_table_cat *cat);
 void dvb_table_cat_print(struct dvb_v5_fe_parms *parms, struct dvb_table_cat 
*t);
 
diff --git a/lib/include/libdvbv5/descriptors.h 
b/lib/include/libdvbv5/descriptors.h
index 8b38977..66197f6 100644
--- a/lib/include/libdvbv5/descriptors.h
+++ b/lib/include/libdvbv5/descriptors.h
@@ -36,14 +36,9 @@
 
 struct dvb_v5_fe_parms;
 
-typedef void (*dvb_table_init_func)(struct dvb_v5_fe_parms *parms, const 
uint8_t *buf, ssize_t buflen, void *table, ssize_t *table_length);
+typedef void (*dvb_table_init_func)(struct dvb_v5_fe_parms *parms, const 
uint8_t *buf, ssize_t buflen, void **table);
 
-struct dvb_table_init {
-   dvb_table_init_func init;
-   ssize_t size;
-};
-
-extern const struct dvb_table_init dvb_table_initializers[];
+extern const dvb_table_init_func dvb_table_initializers[256];
 extern char *default_charset;
 extern char *output_charset;
 
@@ -106,15 +101,6 @@ struct dvb_descriptor {
 
 extern const struct dvb_descriptor dvb_descriptors[];
 
-enum dvb_tables {
-   PAT,
-   PMT,
-   NIT,
-   SDT,
-   TVCT,
-   CVCT,
-};
-
 enum descriptors {
/* ISO/IEC 13818-1 */
video_stream_descriptor = 0x02,
diff --git a/lib/include/libdvbv5/eit.h b/lib/include/libdvbv5/eit.h
index c959537..97fbf36 100644
--- a/lib/include/libdvbv5/eit.h
+++ b/lib/include/libdvbv5/eit.h
@@ -78,7 +78,7 @@ extern const char *dvb_eit_running_status_name[8];
 extern "C" {
 #endif
 
-ssize_t dvb_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, struct dvb_table_eit *eit, ssize_t *table_length);
+ssize_t dvb_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, struct dvb_table_eit **table);
 void dvb_table_eit_free(struct dvb_table_eit *eit);
 void dvb_table_eit_print(struct dvb_v5_fe_parms *parms, struct dvb_table_eit 
*eit);
 void dvb_time(const uint8_t data[5], struct tm *tm);
diff --git a/lib/include/libdvbv5/mgt.h b/lib/include/libdvbv5/mgt.h
index d67ad33..eb4403e 100644
--- a/lib/include/libdvbv5/mgt.h
+++ b/lib/include/libdvbv5/mgt.h
@@ -67,7 +67,7 @@ struct dvb_v5_fe_parms;
 extern "C" {
 #endif
 
-ssize_t atsc_table_mgt_init (struct dvb_v5_fe_parms *parms, const uint8_t 
*buf, ssize_t buflen, struct atsc_table_mgt *mgt, ssiz

[PATCH 3/4] libdvbv5: short API description

2014-04-15 Thread André Roth
Signed-off-by: André Roth 
---
 lib/include/libdvbv5/dvb-scan.h | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/lib/include/libdvbv5/dvb-scan.h b/lib/include/libdvbv5/dvb-scan.h
index f0af9d7..8f0e553 100644
--- a/lib/include/libdvbv5/dvb-scan.h
+++ b/lib/include/libdvbv5/dvb-scan.h
@@ -76,6 +76,32 @@ struct dvb_table_filter {
 
 void dvb_table_filter_free(struct dvb_table_filter *sect);
 
+/* Read DVB table sections
+ *
+ * The following functions can be used to read DVB table sections by
+ * specifying a table ID and a program ID. Optionally a transport
+ * stream ID can be specified as well. The function will read on the
+ * specified demux and return when reading is done or an error has
+ * occurred. If table is not NULL after the call, it has to be freed
+ * with the apropriate free table function (even if an error has
+ * occurred).
+ *
+ * Returns 0 on success or a negative error code.
+ *
+ * Example usage:
+ *
+ * struct dvb_table_pat *pat;
+ * int r = dvb_read_section( parms, dmx_fd, DVB_TABLE_PAT, DVB_TABLE_PAT_PID, 
(void **) &pat, 5 );
+ * if (r < 0)
+ * dvb_logerr("error reading PAT table");
+ * else {
+ * // do something with pat
+ * }
+ * if (pat)
+ * dvb_table_pat_free( pat );
+ *
+ */
+
 int dvb_read_section(struct dvb_v5_fe_parms *parms, int dmx_fd, unsigned char 
tid, uint16_t pid, void **table,
unsigned timeout);
 
-- 
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/4] libdvbv5: move table parsers to separate directory

2014-04-15 Thread André Roth
move the dvb table parsers from the descriptors/ directory
to tables/ to have a nice and clear separation.

Signed-off-by: André Roth 
---
 lib/libdvbv5/Makefile.am| 42 -
 lib/libdvbv5/{descriptors => tables}/atsc_eit.c |  0
 lib/libdvbv5/{descriptors => tables}/cat.c  |  0
 lib/libdvbv5/{descriptors => tables}/eit.c  |  0
 lib/libdvbv5/{descriptors => tables}/header.c   |  0
 lib/libdvbv5/{descriptors => tables}/mgt.c  |  0
 lib/libdvbv5/{descriptors => tables}/mpeg_es.c  |  0
 lib/libdvbv5/{descriptors => tables}/mpeg_pes.c |  0
 lib/libdvbv5/{descriptors => tables}/mpeg_ts.c  |  0
 lib/libdvbv5/{descriptors => tables}/nit.c  |  0
 lib/libdvbv5/{descriptors => tables}/pat.c  |  0
 lib/libdvbv5/{descriptors => tables}/pmt.c  |  0
 lib/libdvbv5/{descriptors => tables}/sdt.c  |  0
 lib/libdvbv5/{descriptors => tables}/vct.c  |  0
 14 files changed, 21 insertions(+), 21 deletions(-)
 rename lib/libdvbv5/{descriptors => tables}/atsc_eit.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/cat.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/eit.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/header.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/mgt.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/mpeg_es.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/mpeg_pes.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/mpeg_ts.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/nit.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/pat.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/pmt.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/sdt.c (100%)
 rename lib/libdvbv5/{descriptors => tables}/vct.c (100%)

diff --git a/lib/libdvbv5/Makefile.am b/lib/libdvbv5/Makefile.am
index ce3f806..515adc3 100644
--- a/lib/libdvbv5/Makefile.am
+++ b/lib/libdvbv5/Makefile.am
@@ -63,27 +63,30 @@ libdvbv5_la_SOURCES = \
parse_string.c   \
dvb-demux.c  \
dvb-fe.c \
-   dvb-log.c   \
-   dvb-file.c  \
-   dvb-v5-std.c\
-   dvb-sat.c   \
-   dvb-scan.c  \
-   descriptors.c   \
-   descriptors/header.c\
-   descriptors/pat.c   \
-   descriptors/pmt.c   \
-   descriptors/nit.c   \
-   descriptors/sdt.c   \
-   descriptors/vct.c   \
-   descriptors/mgt.c   \
-   descriptors/eit.c   \
-   descriptors/cat.c   \
-   descriptors/atsc_eit.c  \
+   dvb-log.c\
+   dvb-file.c   \
+   dvb-v5-std.c \
+   dvb-sat.c\
+   dvb-scan.c   \
+   descriptors.c\
+   tables/header.c \
+   tables/pat.c\
+   tables/pmt.c\
+   tables/nit.c\
+   tables/sdt.c\
+   tables/vct.c\
+   tables/mgt.c\
+   tables/eit.c\
+   tables/cat.c\
+   tables/atsc_eit.c   \
+   tables/mpeg_ts.c\
+   tables/mpeg_pes.c   \
+   tables/mpeg_es.c\
descriptors/desc_language.c \
descriptors/desc_network_name.c \
descriptors/desc_cable_delivery.c   \
descriptors/desc_sat.c  \
-   descriptors/desc_terrestrial_delivery.c  \
+   descriptors/desc_terrestrial_delivery.c \
descriptors/desc_t2_delivery.c  \
descriptors/desc_service.c  \
descriptors/desc_frequency_list.c   \
@@ -99,10 +102,7 @@ libdvbv5_la_SOURCES = \
descriptors/desc_partial_reception.c\
descriptors/desc_service_location.c \
descriptors/desc_ca.c   \
-   descriptors/desc_ca_identifier.c\
-   descriptors/mpeg_ts.c   \
-   descriptors/mpeg_pes.c  \
-   descriptors/mpeg_es.c
+   descriptors/desc_ca_identifier.c
 
 libdvbv5_la_CPPFLAGS = -I../.. $(ENFORCE_LIBDVBV5_STATIC)
 libdvbv5_la_LDFLAGS = $(LIBDVBV5_VERSION) $(ENFORCE_LIBDVBV5_STATIC) -lm
diff --git a/lib/libdvbv5/descriptors/atsc_eit.c 
b/lib/libdvbv5/tables/atsc_eit.c
similarity index 100%
rename from lib/libdvbv5/descriptors/atsc_eit.c
rename to lib/libdvbv5/tables/atsc_eit.c
diff --git a/lib/libdvbv5/descriptors/cat.c b/lib/libdvbv5/tables/cat.c
similarity index 100%
rename from lib/libdvbv5/descriptors/cat.c
rename to lib/libdvbv5/tables/cat.c
diff --git a/lib/libdvbv5/descriptors/eit.c b/lib/libdvbv5/tables/eit.c
similarity index 100%
rename from lib/libdvbv5/descriptors/eit.c
rename to lib/libdvbv5/tables/eit.c
diff --git a/lib/libdvbv5/descriptors/header.c b/lib/libdvbv5/tables/header.c
similarity index 100%
rename from lib/libdvbv5/descriptors/header.c
rename to lib/libdvbv5/tables/header.c
diff --git a/lib/libdvbv5/descriptors/mgt.c b/lib/libdvbv5/ta

[PATCH 5/5] ARM: dts: exynos4: Remove simple-bus compatible from camera subsystem nodes

2014-04-15 Thread Sylwester Nawrocki
The usage of "simple-bus" was incorrect and the drivers now will also
work without it so remove it.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
 arch/arm/boot/dts/exynos4.dtsi|2 +-
 arch/arm/boot/dts/exynos4x12.dtsi |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 912fe72..ad06a1d 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -125,7 +125,7 @@
};
 
camera {
-   compatible = "samsung,fimc", "simple-bus";
+   compatible = "samsung,fimc";
status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
b/arch/arm/boot/dts/exynos4x12.dtsi
index 192617b..3fec920 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -190,7 +190,7 @@
};
 
fimc_is: fimc-is@1200 {
-   compatible = "samsung,exynos4212-fimc-is", "simple-bus";
+   compatible = "samsung,exynos4212-fimc-is";
reg = <0x1200 0x26>;
interrupts = <0 90 0>, <0 95 0>;
samsung,power-domain = <&pd_isp>;
-- 
1.7.9.5

--
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] exynos4-is: Remove requirement for "simple-bus" compatible

2014-04-15 Thread Sylwester Nawrocki
This patch makes the driver instantiating its child devices itself,
rather than relying on an OS to instantiate devices as children
of "simple-bus". This removes an incorrect usage of "simple-bus"
compatible.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
This patch addresses Mark's review comments:
https://patchwork.linuxtv.org/patch/23008/
---
 .../devicetree/bindings/media/samsung-fimc.txt |6 +--
 drivers/media/platform/exynos4-is/common.c |   47 +++-
 drivers/media/platform/exynos4-is/common.h |6 ++-
 drivers/media/platform/exynos4-is/fimc-is.c|   12 -
 drivers/media/platform/exynos4-is/media-dev.c  |   33 ++
 5 files changed, 89 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt 
b/Documentation/devicetree/bindings/media/samsung-fimc.txt
index 922d6f8..8ce5984 100644
--- a/Documentation/devicetree/bindings/media/samsung-fimc.txt
+++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt
@@ -15,9 +15,9 @@ Common 'camera' node
 
 Required properties:
 
-- compatible: must be "samsung,fimc", "simple-bus"
+- compatible: should be "samsung,fimc",
 - clocks: list of clock specifiers, corresponding to entries in
-  the clock-names property;
+  the clock-names property,
 - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0",
   "pxl_async1" entries, matching entries in the clocks property.
 
@@ -157,7 +157,7 @@ Example:
};
 
camera {
-   compatible = "samsung,fimc", "simple-bus";
+   compatible = "samsung,fimc";
clocks = <&clock 132>, <&clock 133>, <&clock 351>,
 <&clock 352>;
clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0",
diff --git a/drivers/media/platform/exynos4-is/common.c 
b/drivers/media/platform/exynos4-is/common.c
index 0eb34ec..1e50a48 100644
--- a/drivers/media/platform/exynos4-is/common.c
+++ b/drivers/media/platform/exynos4-is/common.c
@@ -1,7 +1,7 @@
 /*
  * Samsung S5P/EXYNOS4 SoC Camera Subsystem driver
  *
- * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ * Copyright (C) 2013 - 2014 Samsung Electronics Co., Ltd.
  * Author: Sylwester Nawrocki 
  *
  * This program is free software; you can redistribute it and/or modify
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include "common.h"
 
 /* Called with the media graph mutex held or entity->stream_count > 0. */
@@ -50,4 +51,48 @@ void __fimc_vidioc_querycap(struct device *dev, struct 
v4l2_capability *cap,
 }
 EXPORT_SYMBOL(__fimc_vidioc_querycap);
 
+static int __remove_child_device(struct device *dev, void *unused)
+{
+of_device_unregister(to_platform_device(dev));
+return 0;
+}
+
+void fimc_unregister_child_devices(struct device *parent)
+{
+device_for_each_child(parent, NULL, __remove_child_device);
+}
+EXPORT_SYMBOL(fimc_unregister_child_devices);
+
+struct platform_device *fimc_register_child_device(struct device_node *child,
+  struct device *parent)
+{
+   struct platform_device *pdev;
+
+   pdev = of_platform_device_create(child, NULL, parent);
+   if (!pdev)
+   dev_err(parent,
+   "failed to create device for node %s\n",
+   child->full_name);
+   return pdev;
+}
+EXPORT_SYMBOL(fimc_register_child_device);
+
+int fimc_register_child_devices(struct device *parent)
+{
+   struct platform_device *pdev;
+   struct device_node *child;
+
+   for_each_available_child_of_node(parent->of_node, child) {
+   pdev = fimc_register_child_device(child, parent);
+   if (!pdev) {
+   of_node_put(child);
+   fimc_unregister_child_devices(parent);
+   return -ENXIO;
+   }
+
+   }
+   return 0;
+}
+EXPORT_SYMBOL(fimc_register_child_devices);
+
 MODULE_LICENSE("GPL");
diff --git a/drivers/media/platform/exynos4-is/common.h 
b/drivers/media/platform/exynos4-is/common.h
index 75b9c71..1d06715 100644
--- a/drivers/media/platform/exynos4-is/common.h
+++ b/drivers/media/platform/exynos4-is/common.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ * Copyright (C) 2013 - 2014 Samsung Electronics Co., Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,3 +14,7 @@
 struct v4l2_subdev *fimc_find_remote_sensor(struct media_entity *entity);
 void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap,
unsigned int caps);
+struct platform_device *fimc_register_child_device(struct device_node *child,
+  struct device *parent);
+int fimc_register_child_devices(struct device *parent);
+void fimc_unregister_child_devices(struct d

[PATCH 3/5] exynos4-is: Remove support for non-dt platforms

2014-04-15 Thread Sylwester Nawrocki
All platforms supported by this driver are going to get device tree
support in this kernel release so remove code that would have been
actually not used any more.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
 Documentation/video4linux/fimc.txt |   30 --
 MAINTAINERS|1 -
 drivers/media/platform/exynos4-is/Kconfig  |3 +-
 drivers/media/platform/exynos4-is/common.c |2 +-
 drivers/media/platform/exynos4-is/fimc-core.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-isp-video.c |2 +-
 drivers/media/platform/exynos4-is/fimc-isp.h   |2 +-
 drivers/media/platform/exynos4-is/fimc-lite-reg.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-reg.c   |2 +-
 drivers/media/platform/exynos4-is/media-dev.c  |  329 ++--
 drivers/media/platform/exynos4-is/media-dev.h  |6 +-
 drivers/media/platform/exynos4-is/mipi-csis.c  |   43 +--
 include/linux/platform_data/mipi-csis.h|   28 --
 include/media/{s5p_fimc.h => exynos-fimc.h}|   21 --
 16 files changed, 50 insertions(+), 427 deletions(-)
 delete mode 100644 include/linux/platform_data/mipi-csis.h
 rename include/media/{s5p_fimc.h => exynos-fimc.h} (87%)

diff --git a/Documentation/video4linux/fimc.txt 
b/Documentation/video4linux/fimc.txt
index 7d6e160..e0c6b8b 100644
--- a/Documentation/video4linux/fimc.txt
+++ b/Documentation/video4linux/fimc.txt
@@ -140,39 +140,9 @@ You can either grep through the kernel log to find 
relevant information, i.e.
 or retrieve the information from /dev/media? with help of the media-ctl tool:
 # media-ctl -p
 
-6. Platform support
-===
-
-The machine code (arch/arm/plat-samsung and arch/arm/mach-*) must select
-following options:
-
-CONFIG_S5P_DEV_FIMC0   mandatory
-CONFIG_S5P_DEV_FIMC1  \
-CONFIG_S5P_DEV_FIMC2  |optional
-CONFIG_S5P_DEV_FIMC3  |
-CONFIG_S5P_SETUP_FIMC /
-CONFIG_S5P_DEV_CSIS0  \optional for MIPI-CSI interface
-CONFIG_S5P_DEV_CSIS1  /
-
-Except that, relevant s5p_device_fimc? should be registered in the machine code
-in addition to a "s5p-fimc-md" platform device to which the media device driver
-is bound.  The "s5p-fimc-md" device instance is required even if only 
mem-to-mem
-operation is used.
-
-The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be
-passed as the "s5p-fimc-md" device platform_data.  The platform data structure
-is defined in file include/media/s5p_fimc.h.
-
 7. Build
 
 
-This driver depends on following config options:
-PLAT_S5P,
-PM_RUNTIME,
-I2C,
-REGULATOR,
-VIDEO_V4L2_SUBDEV_API,
-
 If the driver is built as a loadable kernel module 
(CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m)
 two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and
 optional s5p-csis.ko (MIPI-CSI receiver subdev).
diff --git a/MAINTAINERS b/MAINTAINERS
index 6dc67b1..e2f5dfe 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7641,7 +7641,6 @@ L:linux-media@vger.kernel.org
 Q: https://patchwork.linuxtv.org/project/linux-media/list/
 S: Supported
 F: drivers/media/platform/exynos4-is/
-F: include/media/s5p_fimc.h
 
 SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
 M: Sylwester Nawrocki 
diff --git a/drivers/media/platform/exynos4-is/Kconfig 
b/drivers/media/platform/exynos4-is/Kconfig
index e1b2ceb..5dcaa0a 100644
--- a/drivers/media/platform/exynos4-is/Kconfig
+++ b/drivers/media/platform/exynos4-is/Kconfig
@@ -3,6 +3,7 @@ config VIDEO_SAMSUNG_EXYNOS4_IS
bool "Samsung S5P/EXYNOS4 SoC series Camera Subsystem driver"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
depends on (PLAT_S5P || ARCH_EXYNOS)
+   depends on OF && COMMON_CLK
help
  Say Y here to enable camera host interface devices for
  Samsung S5P and EXYNOS SoC series.
@@ -17,7 +18,7 @@ config VIDEO_S5P_FIMC
depends on I2C
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
-   select MFD_SYSCON if OF
+   select MFD_SYSCON
select VIDEO_EXYNOS4_IS_COMMON
help
  This is a V4L2 driver for Samsung S5P and EXYNOS4 SoC camera host
diff --git a/drivers/media/platform/exynos4-is/common.c 
b/drivers/media/platform/exynos4-is/common.c
index 0ec210b..0eb34ec 100644
--- a/drivers/media/platform/exynos4-is/common.c
+++ b/drivers/media/platform/exynos4-is/common.c
@@ -10,7 +10,7 @@
  */
 
 #include 
-#include 
+#include 
 #include "common.h"
 
 /* Called with the media graph mutex held or entity->stream_count > 0. */
diff --git a/drivers/media/platform/exynos4-is/fimc-core.h 
b/drivers/media/platform/exynos4-is/fimc-core.h
index 1790fb4..6c75c6c 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.h
+++ b/drivers/media/platform/exynos4-is/fimc-core.h
@@ -27,7 +27,7 @@
 #include 
 #i

[PATCH 1/5] ARM: S5PV210: Remove camera support from mach-goni.c

2014-04-15 Thread Sylwester Nawrocki
S5PV210 is going to get DT support, so we can remove the camera
bits from the only board using camera on S5PV210. This allows to
clean the exynos4-is driver by dropping code for non-dt platforms.
This patch can be dropped if a patch removing the whole board
file is applied first.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
 arch/arm/mach-s5pv210/mach-goni.c |   51 -
 1 file changed, 51 deletions(-)

diff --git a/arch/arm/mach-s5pv210/mach-goni.c 
b/arch/arm/mach-s5pv210/mach-goni.c
index b41a38a..6c719ec 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -49,11 +49,6 @@
 #include 
 #include 
 #include 
-#include 
-
-#include 
-#include 
-#include 
 
 #include "common.h"
 
@@ -285,14 +280,6 @@ static void __init goni_tsp_init(void)
 /* USB OTG */
 static struct s3c_hsotg_plat goni_hsotg_pdata;
 
-static void goni_camera_init(void)
-{
-   s5pv210_fimc_setup_gpio(S5P_CAMPORT_A);
-
-   /* Set max driver strength on CAM_A_CLKOUT pin. */
-   s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4);
-}
-
 /* MAX8998 regulators */
 #if defined(CONFIG_REGULATOR_MAX8998) || 
defined(CONFIG_REGULATOR_MAX8998_MODULE)
 
@@ -825,34 +812,6 @@ static void goni_setup_sdhci(void)
s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
 };
 
-static struct noon010pc30_platform_data noon010pc30_pldata = {
-   .clk_rate   = 1600UL,
-   .gpio_nreset= S5PV210_GPB(2), /* CAM_CIF_NRST */
-   .gpio_nstby = S5PV210_GPB(0), /* CAM_CIF_NSTBY */
-};
-
-static struct i2c_board_info noon010pc30_board_info = {
-   I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
-   .platform_data = &noon010pc30_pldata,
-};
-
-static struct fimc_source_info goni_camera_sensors[] = {
-   {
-   .mux_id = 0,
-   .flags  = V4L2_MBUS_PCLK_SAMPLE_FALLING |
- V4L2_MBUS_VSYNC_ACTIVE_LOW,
-   .fimc_bus_type  = FIMC_BUS_TYPE_ITU_601,
-   .board_info = &noon010pc30_board_info,
-   .i2c_bus_num= 0,
-   .clk_frequency  = 1600UL,
-   },
-};
-
-static struct s5p_platform_fimc goni_fimc_md_platdata __initdata = {
-   .source_info= goni_camera_sensors,
-   .num_clients= ARRAY_SIZE(goni_camera_sensors),
-};
-
 /* Audio device */
 static struct platform_device goni_device_audio = {
.name = "smdk-audio",
@@ -874,10 +833,6 @@ static struct platform_device *goni_devices[] __initdata = 
{
&s5p_device_mixer,
&s5p_device_sdo,
&s3c_device_i2c0,
-   &s5p_device_fimc0,
-   &s5p_device_fimc1,
-   &s5p_device_fimc2,
-   &s5p_device_fimc_md,
&s3c_device_hsmmc0,
&s3c_device_hsmmc1,
&s3c_device_hsmmc2,
@@ -946,14 +901,8 @@ static void __init goni_machine_init(void)
/* FB */
s3c_fb_set_platdata(&goni_lcd_pdata);
 
-   /* FIMC */
-   s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata),
-&s5p_device_fimc_md);
-
s3c_hsotg_set_platdata(&goni_hsotg_pdata);
 
-   goni_camera_init();
-
/* SPI */
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
 
-- 
1.7.9.5

--
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] exynos4-is: Fix compilation for !CONFIG_COMMON_CLK

2014-04-15 Thread Sylwester Nawrocki
CONFIG_COMMON_CLK is not enabled on S5PV210 platform, so include
some clk API data structures conditionally to avoid compilation
errors. These #ifdefs will be removed for next kernel release,
when the S5PV210 platform moves to DT and the common clk API.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
 drivers/media/platform/exynos4-is/media-dev.c |2 +-
 drivers/media/platform/exynos4-is/media-dev.h |4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 2a2d42e..002abbf 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1523,7 +1523,7 @@ err:
 }
 #else
 #define fimc_md_register_clk_provider(fmd) (0)
-#define fimc_md_unregister_clk_provider(fmd) (0)
+#define fimc_md_unregister_clk_provider(fmd)
 #endif
 
 static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,
diff --git a/drivers/media/platform/exynos4-is/media-dev.h 
b/drivers/media/platform/exynos4-is/media-dev.h
index ee1e251..58c4945 100644
--- a/drivers/media/platform/exynos4-is/media-dev.h
+++ b/drivers/media/platform/exynos4-is/media-dev.h
@@ -94,7 +94,9 @@ struct fimc_sensor_info {
 };
 
 struct cam_clk {
+#ifdef CONFIG_COMMON_CLK
struct clk_hw hw;
+#endif
struct fimc_md *fmd;
 };
 #define to_cam_clk(_hw) container_of(_hw, struct cam_clk, hw)
@@ -142,7 +144,9 @@ struct fimc_md {
 
struct cam_clk_provider {
struct clk *clks[FIMC_MAX_CAMCLKS];
+#ifdef CONFIG_COMMON_CLK
struct clk_onecell_data clk_data;
+#endif
struct device_node *of_node;
struct cam_clk camclk[FIMC_MAX_CAMCLKS];
int num_clocks;
-- 
1.7.9.5

--
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] Exynos4 SoC camera subsystem driver cleanups

2014-04-15 Thread Sylwester Nawrocki
This patch series removes support for non-dt platforms from the
Exynos4/S5P SoC camera interface drivers and removes (ab)use
of "simple-bus" compatible string.

Sylwester Nawrocki (5):
  ARM: S5PV210: Remove camera support from mach-goni.c
  exynos4-is: Fix compilation for !CONFIG_COMMON_CLK
  exynos4-is: Remove support for non-dt platforms
  exynos4-is: Remove requirement for "simple-bus" compatible
  ARM: dts: exynos4: Remove simple-bus compatible from camera subsystem
nodes

 .../devicetree/bindings/media/samsung-fimc.txt |6 +-
 Documentation/video4linux/fimc.txt |   30 --
 MAINTAINERS|1 -
 arch/arm/boot/dts/exynos4.dtsi |2 +-
 arch/arm/boot/dts/exynos4x12.dtsi  |2 +-
 arch/arm/mach-s5pv210/mach-goni.c  |   51 ---
 drivers/media/platform/exynos4-is/Kconfig  |3 +-
 drivers/media/platform/exynos4-is/common.c |   49 ++-
 drivers/media/platform/exynos4-is/common.h |6 +-
 drivers/media/platform/exynos4-is/fimc-core.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-is.c|   12 +-
 drivers/media/platform/exynos4-is/fimc-isp-video.c |2 +-
 drivers/media/platform/exynos4-is/fimc-isp.h   |2 +-
 drivers/media/platform/exynos4-is/fimc-lite-reg.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-reg.c   |2 +-
 drivers/media/platform/exynos4-is/media-dev.c  |  356 +++-
 drivers/media/platform/exynos4-is/media-dev.h  |2 +-
 drivers/media/platform/exynos4-is/mipi-csis.c  |   43 +--
 include/linux/platform_data/mipi-csis.h|   28 --
 include/media/{s5p_fimc.h => exynos-fimc.h}|   21 --
 22 files changed, 138 insertions(+), 488 deletions(-)
 delete mode 100644 include/linux/platform_data/mipi-csis.h
 rename include/media/{s5p_fimc.h => exynos-fimc.h} (87%)

--
1.7.9.5

--
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: Hauppauge ImpactVCB-e 01385

2014-04-15 Thread Steve Cookson


On 15/04/14 18:13, Hans Verkuil wrote:

Somewhat strange error message. Does 'dmesg' give you any useful info?

I get this:

image@image-H61M-DS2:~$ dmesg | grep -i cx23885
[   13.237914] cx23885: disagrees about version of symbol altera_init
[   13.237917] cx23885: Unknown symbol altera_init (err -22)
image@image-H61M-DS2:~$

There were altera_init issue in the dump I gave you earlier too.

Regards,

Steve.
--
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] exynos4-is: Fix compilation for !CONFIG_COMMON_CLK

2014-04-15 Thread Sylwester Nawrocki
CONFIG_COMMON_CLK is not enabled on S5PV210 platform, so include
some clk API data structures conditionally to avoid compilation
errors. These #ifdefs will be removed for next kernel release,
when the S5PV210 platform moves to DT and the common clk API.

Signed-off-by: Sylwester Nawrocki 
Acked-by: Kyungmin Park 
---
 drivers/media/platform/exynos4-is/media-dev.c |2 +-
 drivers/media/platform/exynos4-is/media-dev.h |4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 2a2d42e..002abbf 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1523,7 +1523,7 @@ err:
 }
 #else
 #define fimc_md_register_clk_provider(fmd) (0)
-#define fimc_md_unregister_clk_provider(fmd) (0)
+#define fimc_md_unregister_clk_provider(fmd)
 #endif
 
 static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,
diff --git a/drivers/media/platform/exynos4-is/media-dev.h 
b/drivers/media/platform/exynos4-is/media-dev.h
index ee1e251..58c4945 100644
--- a/drivers/media/platform/exynos4-is/media-dev.h
+++ b/drivers/media/platform/exynos4-is/media-dev.h
@@ -94,7 +94,9 @@ struct fimc_sensor_info {
 };
 
 struct cam_clk {
+#ifdef CONFIG_COMMON_CLK
struct clk_hw hw;
+#endif
struct fimc_md *fmd;
 };
 #define to_cam_clk(_hw) container_of(_hw, struct cam_clk, hw)
@@ -142,7 +144,9 @@ struct fimc_md {
 
struct cam_clk_provider {
struct clk *clks[FIMC_MAX_CAMCLKS];
+#ifdef CONFIG_COMMON_CLK
struct clk_onecell_data clk_data;
+#endif
struct device_node *of_node;
struct cam_clk camclk[FIMC_MAX_CAMCLKS];
int num_clocks;
-- 
1.7.9.5

--
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: Hauppauge ImpactVCB-e 01385

2014-04-15 Thread Hans Verkuil
On 04/15/2014 06:45 PM, Steve Cookson - IT wrote:
>   Hi Hans,
> On 14/04/14 15:02, Hans Verkuil wrote:
> 
>  > I'd appreciate it if you can test this with a proper video feed.
> 
> Well, I've been installing the patch today.  I finished the compilation 
> script and the card is not detected.  Here's what I did:
> 
> It's been a bit hard-going because my ISP has been on a go-slow and 
> everything has taken much longer than it should.
> 
> 1I did a fresh build of linux tv.  Deleted ~/linuxtv/media_build and 
> then typed:
> 2user$ git clone git://linuxtv.org/media_build.git
> 3user$ cd media_build
> 4user$./build --main-git
> 
>  This seemed to be fine.
> 
> 5tried to apply the patch (patch -p1 cx23885) but had issues (only 
> the main ...card.c was updated and h and ...video.c were not 
> updated).  As it was only one line each, I applied the updates manually.
> 6user$ cd media
> 7user$ sudo -s
> 8root$ make -C ../v4l  (it scrolled up quickly, but completed with 
> no apparent errors
> 9root$ make -C ../ install
> 10root$ make -C .. rmmod (had a number of errors because of stk1160 
> so unplugged EasyCap and re-ran, lots of errors - see below)

You may have to do a 'depmod -a' here. Try that first.

> 11tried to modprobe cx23885, but got "invalid agrgument"

Somewhat strange error message. Does 'dmesg' give you any useful info?

Regards,

Hans

> 12tried to reboot, but ls /dev/video* showed nothing.
> 
> Following are the errors from make -C .. rmmo.
> 
> The ImpactVCB-e card is installed.  Should I unplug it before doing 
> point 11?
> 
--
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: Hauppauge ImpactVCB-e 01385

2014-04-15 Thread Steve Cookson - IT

 Hi Hans,
On 14/04/14 15:02, Hans Verkuil wrote:

> I'd appreciate it if you can test this with a proper video feed.

Well, I've been installing the patch today.  I finished the compilation 
script and the card is not detected.  Here's what I did:


It's been a bit hard-going because my ISP has been on a go-slow and 
everything has taken much longer than it should.


1I did a fresh build of linux tv.  Deleted ~/linuxtv/media_build and 
then typed:

2user$ git clone git://linuxtv.org/media_build.git
3user$ cd media_build
4user$./build --main-git

This seemed to be fine.

5tried to apply the patch (patch -p1 cx23885) but had issues (only 
the main ...card.c was updated and h and ...video.c were not 
updated).  As it was only one line each, I applied the updates manually.

6user$ cd media
7user$ sudo -s
8root$ make -C ../v4l  (it scrolled up quickly, but completed with 
no apparent errors

9root$ make -C ../ install
10root$ make -C .. rmmod (had a number of errors because of stk1160 
so unplugged EasyCap and re-ran, lots of errors - see below)

11tried to modprobe cx23885, but got "invalid agrgument"
12tried to reboot, but ls /dev/video* showed nothing.

Following are the errors from make -C .. rmmo.

The ImpactVCB-e card is installed.  Should I unplug it before doing 
point 11?


Thanks

Steve

PS There is some Portuguese in here, sorry.  It should be fairly self 
explanitory, Entrando is entering, saindo is exiting and diretório is 
err... directory.


make -C .. rmmod
make: Entrando no diretório `/home/image/linuxtv/media_build'
make -C /home/image/linuxtv/media_build/v4l rmmod
make[1]: Entrando no diretório `/home/image/linuxtv/media_build/v4l'
scripts/rmmod.pl unload
found 582 modules
/sbin/rmmod videodev
Pulseaudio is running with UUID(s): 1000
Error: Module videodev is in use by: cx2341x v4l2_common
/sbin/rmmod videobuf_dvb
/sbin/rmmod videobuf_dma_sg
/sbin/rmmod videobuf_core
/sbin/rmmod v4l2_common
Error: Module v4l2_common is in use by: cx2341x
/sbin/rmmod tveeprom
/sbin/rmmod altera_ci
/sbin/rmmod cx2341x
/sbin/rmmod btcx_risc
/sbin/rmmod dvb_core
/sbin/rmmod tda18271
/sbin/rmmod cx2341x
Error: Module cx2341x is not currently loaded
/sbin/rmmod v4l2_common
/sbin/rmmod altera_ci
Error: Module altera_ci is not currently loaded
/sbin/rmmod videodev
/sbin/rmmod videobuf_dma_sg
Error: Module videobuf_dma_sg is not currently loaded
/sbin/rmmod videobuf_dvb
Error: Module videobuf_dvb is not currently loaded
/sbin/rmmod media
/sbin/rmmod btcx_risc
Error: Module btcx_risc is not currently loaded
/sbin/rmmod tda18271
Error: Module tda18271 is not currently loaded
/sbin/rmmod dvb_core
Error: Module dvb_core is not currently loaded
/sbin/rmmod videobuf_core
Error: Module videobuf_core is not currently loaded
/sbin/rmmod tveeprom
Error: Module tveeprom is not currently loaded
/sbin/rmmod altera_stapl
/sbin/rmmod rc_core
/sbin/rmmod videodev
Error: Module videodev is not currently loaded
/sbin/rmmod v4l2_common
Error: Module v4l2_common is not currently loaded
/sbin/rmmod cx2341x
Error: Module cx2341x is not currently loaded
/sbin/rmmod altera_ci
Error: Module altera_ci is not currently loaded
/sbin/rmmod videobuf_dma_sg
Error: Module videobuf_dma_sg is not currently loaded
/sbin/rmmod videobuf_dvb
Error: Module videobuf_dvb is not currently loaded
/sbin/rmmod btcx_risc
Error: Module btcx_risc is not currently loaded
/sbin/rmmod tda18271
Error: Module tda18271 is not currently loaded
/sbin/rmmod dvb_core
Error: Module dvb_core is not currently loaded
/sbin/rmmod videobuf_core
Error: Module videobuf_core is not currently loaded
/sbin/rmmod tveeprom
Error: Module tveeprom is not currently loaded
Couldn't unload: tveeprom videobuf_core dvb_core tda18271 btcx_risc 
videobuf_dvb videobuf_dma_sg altera_ci cx2341x v4l2_common videodev

make[1]: Saindo do diretório `/home/image/linuxtv/media_build/v4l'
make: Saindo do diretório `/home/image/linuxtv/media_build'

root@image-H61M-DS2:~/linuxtv/media_build/media# modprobe cx23885
ERROR: could not insert 'cx23885': Invalid argument

--
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] uvc: update uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS devices

2014-04-15 Thread Laurent Pinchart
Hi Thomas,

On Monday 14 April 2014 21:07:12 Thomas Pugliese wrote:
> On Mon, 27 Jan 2014, Laurent Pinchart wrote:
> > On Monday 27 January 2014 09:54:58 Thomas Pugliese wrote:
> > > On Mon, 27 Jan 2014, Laurent Pinchart wrote:
> > > > On Friday 24 January 2014 15:17:28 Thomas Pugliese wrote:
> > > > > Isochronous endpoints on devices with speed == USB_SPEED_WIRELESS
> > > > > can have a max packet size ranging from 1-3584 bytes. Add a case to
> > > > > uvc_endpoint_max_bpi to handle USB_SPEED_WIRELESS. Otherwise
> > > > > endpoints for those devices will fall to the default case which
> > > > > masks off any values > 2047. This causes uvc_init_video to
> > > > > underestimate the bandwidth available and fail to find a suitable
> > > > > alt setting for high bandwidth video streams.
> > > > 
> > > > I'm not too familiar with wireless USB, but shouldn't the value be
> > > > multiplied by bMaxBurst from the endpoint companion descriptor ?
> > > > Superspeed devices provide the multiplied value in their endpoint
> > > > companion descriptor's wBytesPerInterval field, but there's no such
> > > > field for wireless devices.
> > > 
> > > For wireless USB isochronous endpoints, the values in the endpoint
> > > descriptor are the logical interval and max packet size that the
> > > endpoint can support. They are provided for backwards compatibility for
> > > just this type of situation. You are correct that the actual endpoint
> > > characteristics are the bMaxBurst, wOverTheAirPacketSize, and
> > > bOverTheAirInterval values from the WUSB endpoint companion descriptor
> > > but only the host controller really needs to know about those details. 
> > > In fact, the values from the endpoint companion descriptor might
> > > actually over-estimate the bandwidth available since the device can set
> > > bMaxBurst to a higher value than necessary to allow for retries.
> > 
> > OK, I'll trust you on that :-)
> > 
> > I've taken the patch in my tree and will send a pull request for v3.15.
> > 
> > > > Out of curiosity, which device have you tested this with ?
> > > 
> > > The device is a standard wired UVC webcam: Quanta CQEC2B (VID: 0x0408,
> > > PID: 0x9005).  It is connected to an Alereon Wireless USB bridge dev kit
> > > which allows it to operate as a WUSB device.
> > > 
> > > Thomas
> > > 
> > > > > Signed-off-by: Thomas Pugliese 
> > > > > ---
> > > > > 
> > > > >  drivers/media/usb/uvc/uvc_video.c | 3 +++
> > > > >  1 file changed, 3 insertions(+)
> 
> So it turns out that this change (commit 79af67e77f86404e77e65ad954bf)
> breaks wireless USB devices that were designed to work with Windows
> because Windows also does not differentiate between Wireless USB devices
> and USB 2.0 high speed devices.  This change should probably be reverted
> before it goes out in the 3.15 release.  Devices that are strictly WUSB
> spec compliant will not work with some max packet sizes but they never did
> anyway.
> 
> In order to support both compliant and non-compliant WUSB devices,
> uvc_endpoint_max_bpi should look at the endpoint companion descriptor but
> that descriptor is not readily available as it is for super speed devices
> so that patch will have to wait for another time.

Could you please send me a proper revert patch with the above description in 
the commit message and CC Mauro Carvalho Chehab  ?

-- 
Regards,

Laurent Pinchart

--
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: AW: AW: v4l2_buffer with PBO mapped memory

2014-04-15 Thread Hans Verkuil
On 04/15/2014 08:04 AM, Thomas Scheuermann wrote:
> Hi Laurent,
> 
> On 11.04.2014 07:56, Thomas Scheuermann wrote:
>> Hi Laurent,
>>
>> On 07.04.2014 01:37, Laurent Pinchart wrote:
>>> Hi Thomas,
>>>
>>> On Friday 04 April 2014 20:01:33 Scheuermann, Mail wrote:
 Hi Laurent,

 I've done the following:

 echo 3 >/sys/module/videobuf2_core/parameters/debug

 and found in /var/log/kern.log after starting my program:

 [239432.535077] vb2: Buffer 0, plane 0 offset 0x
 [239432.535080] vb2: Buffer 1, plane 0 offset 0x001c2000
 [239432.535082] vb2: Buffer 2, plane 0 offset 0x00384000
 [239432.535083] vb2: Allocated 3 buffers, 1 plane(s) each
 [239432.535085] vb2: qbuf: userspace address for plane 0 changed,
 reacquiring memory
 [239432.535087] vb2: qbuf: failed acquiring userspace memory for
 plane 0
>>> This confirms everything is working properly up to the point where
>>> videobuf2-
>>> vmalloc fails to acquire the user pointer memory. The problem comes from
>>> vb2_vmalloc_get_userptr() in
>>> drivers/media/v4l2-core/videobuf2-vmalloc.c.
>>> Unfortunately that function lacks debugging. Are you familiar enough
>>> with
>>> kernel programming to add printk statements there and see where it
>>> fails ?
>> I was able to put some debug output in vb2_vmalloc_get_userptr.
>> A call to 'vb2_get_contig_userptr' failed.

Unless I am mistaken vb2_get_contig_userptr() requires that the userptr
points to physically contiguous memory, but that should not be a
requirement for videobuf2-vmalloc.

Pawel, any idea why vb2_get_contig_userptr() is used here?

Regards,

Hans

>> I will also put some debug code there to get more information.
> 
> In vb2_get_contig_userptr I saw that the call to 'follow_pfn' failed and
> returned -22.
> Do you know what the problem here is?
 [239432.535088] vb2: qbuf: buffer preparation failed: -22
 [239432.535128] vb2: streamoff: not streaming
>>
>> This message is subject to the following terms and conditions: MAIL
>> DISCLAIMER
>> --
>> 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
> 
> This message is subject to the following terms and conditions: MAIL 
> DISCLAIMER
> --
> 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
> 

--
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: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Tomasz Stanislawski
On 04/15/2014 03:42 PM, Rahul Sharma wrote:
> On 15 April 2014 18:41, Tomasz Stanislawski  wrote:
>> On 04/15/2014 11:42 AM, Rahul Sharma wrote:
>>> Hi Tomasz,
>>>
>>> On 15 April 2014 14:57, Tomasz Stanislawski  
>>> wrote:
 Adds support for limitation of maximal pixel clock of HDMI
 signal. This feature is needed on boards that contains
 lines or bridges with frequency limitations.

 Signed-off-by: Tomasz Stanislawski 
[snip]

 diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
 index 181642b..7272d65 100644
 --- a/include/media/s5p_hdmi.h
 +++ b/include/media/s5p_hdmi.h
 @@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
 int mhl_bus;
 struct i2c_board_info *mhl_info;
 int hpd_gpio;
 +   u32 max_pixel_clock;
  };
>>>
>>> We have already removed Non DT support from the drm hdmi
>>> driver. IMO we should not be extending the pdata struct.
>>>
>>> Regards,
>>> Rahul Sharma
>>
>> Hi Rahul,
>>
>> This is not a non-DT patch. The s5p_hdmi_platform_data is
>> generated from DT itself. This structure is just
>> a parsed version of DT attributes.
>>
>> It may be a good idea to rename s5p_hdmi_platform_data
>> to exynos_hdmi_pdata and move it to exynos_hdmi_drm.c file
>> or parse DT directly in probe function.
>>
>> I can prepare a patch for that.
> 
> Else we can completely remove the dependency from
> s5p_hdmi_platform_data. We can directly assign to hdmi context
> variables. Later we can remove that struct itself from include/.
> What you say?

This structure cannot be removed from include yet because it is used by s5p-tv 
driver.
However its usage can be removed from both drivers.
I can prepare both.

> 
> Regards,
> Rahul Sharma
> 

Regards,
Tomasz Stanislawski

>>
>> Regards,
>> Tomasz Stanislawski
>>
>>
>>>

  #endif /* S5P_HDMI_H */
 --
 1.7.9.5

 ___
 dri-devel mailing list
 dri-de...@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
> 

--
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: stk1160: Avoid stack-allocated buffer for control URBs

2014-04-15 Thread Alan Stern
On Mon, 14 Apr 2014, Ezequiel Garcia wrote:

> On Apr 14, Alan Stern wrote:
> > On Mon, 14 Apr 2014, Ezequiel Garcia wrote:
> > 
> > > Currently stk1160_read_reg() uses a stack-allocated char to get the
> > > read control value. This is wrong because usb_control_msg() requires
> > > a kmalloc-ed buffer, and a DMA-API warning is produced:
> > > 
> > > WARNING: CPU: 0 PID: 1376 at lib/dma-debug.c:1153 
> > > check_for_stack+0xa0/0x100()
> > > ehci-pci :00:0a.0: DMA-API: device driver maps memory fromstack 
> > > [addr=88003d0b56bf]
> > > 
> > > This commit fixes such issue by using a 'usb_ctrl_read' field embedded
> > > in the device's struct to pass the value. In addition, we introduce a
> > > mutex to protect the value.
> > 
> > This isn't right either.  The buffer must be allocated in its own cache
> > line; it must not be part of a larger structure.
> > 
> 
> In that case, we can simply allocate 1 byte using kmalloc(). We won't
> be needing the mutex and it'll ensure proper cache alignment, right?

Yes, that will work fine.

Alan Stern

--
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: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Rahul Sharma
On 15 April 2014 18:41, Tomasz Stanislawski  wrote:
> On 04/15/2014 11:42 AM, Rahul Sharma wrote:
>> Hi Tomasz,
>>
>> On 15 April 2014 14:57, Tomasz Stanislawski  wrote:
>>> Adds support for limitation of maximal pixel clock of HDMI
>>> signal. This feature is needed on boards that contains
>>> lines or bridges with frequency limitations.
>>>
>>> Signed-off-by: Tomasz Stanislawski 
>>> ---
>>>  .../devicetree/bindings/video/exynos_hdmi.txt  |4 
>>>  drivers/gpu/drm/exynos/exynos_hdmi.c   |   12 
>>>  include/media/s5p_hdmi.h   |1 +
>>>  3 files changed, 17 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt 
>>> b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>>> index f9187a2..8718f8d 100644
>>> --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>>> +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>>> @@ -28,6 +28,10 @@ Required properties:
>>>  - ddc: phandle to the hdmi ddc node
>>>  - phy: phandle to the hdmi phy node
>>>
>>> +Optional properties:
>>> +- max-pixel-clock: used to limit the maximal pixel clock if a board has 
>>> lines,
>>> +   connectors or bridges not capable of carring higher frequencies
>>> +
>>>  Example:
>>>
>>> hdmi {
>>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
>>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> index 2a18f4e..404f1b7 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> @@ -195,6 +195,7 @@ struct hdmi_context {
>>> struct hdmi_resources   res;
>>>
>>> int hpd_gpio;
>>> +   u32 max_pixel_clock;
>>>
>>> enum hdmi_type  type;
>>>  };
>>> @@ -887,6 +888,9 @@ static int hdmi_mode_valid(struct drm_connector 
>>> *connector,
>>> if (ret)
>>> return MODE_BAD;
>>>
>>> +   if (mode->clock * 1000 > hdata->max_pixel_clock)
>>> +   return MODE_BAD;
>>> +
>>> ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
>>> if (ret < 0)
>>> return MODE_BAD;
>>> @@ -2031,6 +2035,8 @@ static struct s5p_hdmi_platform_data 
>>> *drm_hdmi_dt_parse_pdata
>>> return NULL;
>>> }
>>>
>>> +   of_property_read_u32(np, "max-pixel-clock", &pd->max_pixel_clock);
>>> +
>>> return pd;
>>>  }
>>>
>>> @@ -2067,6 +2073,11 @@ static int hdmi_probe(struct platform_device *pdev)
>>> if (!pdata)
>>> return -EINVAL;
>>>
>>> +   if (!pdata->max_pixel_clock) {
>>> +   DRM_INFO("max-pixel-clock is zero, using INF\n");
>>> +   pdata->max_pixel_clock = U32_MAX;
>>> +   }
>>> +
>>> hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
>>> if (!hdata)
>>> return -ENOMEM;
>>> @@ -2083,6 +2094,7 @@ static int hdmi_probe(struct platform_device *pdev)
>>> hdata->type = drv_data->type;
>>>
>>> hdata->hpd_gpio = pdata->hpd_gpio;
>>> +   hdata->max_pixel_clock = pdata->max_pixel_clock;
>>> hdata->dev = dev;
>>>
>>> ret = hdmi_resources_init(hdata);
>>> diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
>>> index 181642b..7272d65 100644
>>> --- a/include/media/s5p_hdmi.h
>>> +++ b/include/media/s5p_hdmi.h
>>> @@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
>>> int mhl_bus;
>>> struct i2c_board_info *mhl_info;
>>> int hpd_gpio;
>>> +   u32 max_pixel_clock;
>>>  };
>>
>> We have already removed Non DT support from the drm hdmi
>> driver. IMO we should not be extending the pdata struct.
>>
>> Regards,
>> Rahul Sharma
>
> Hi Rahul,
>
> This is not a non-DT patch. The s5p_hdmi_platform_data is
> generated from DT itself. This structure is just
> a parsed version of DT attributes.
>
> It may be a good idea to rename s5p_hdmi_platform_data
> to exynos_hdmi_pdata and move it to exynos_hdmi_drm.c file
> or parse DT directly in probe function.
>
> I can prepare a patch for that.

Else we can completely remove the dependency from
s5p_hdmi_platform_data. We can directly assign to hdmi context
variables. Later we can remove that struct itself from include/.
What you say?

Regards,
Rahul Sharma

>
> Regards,
> Tomasz Stanislawski
>
>
>>
>>>
>>>  #endif /* S5P_HDMI_H */
>>> --
>>> 1.7.9.5
>>>
>>> ___
>>> dri-devel mailing list
>>> dri-de...@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
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: [GIT PULL new driver for 3.15] media/usb/gspca: Add support for Scopium astro webcam (0547:7303)

2014-04-15 Thread Mauro Carvalho Chehab
Hi Hans,

Em Wed, 02 Apr 2014 10:40:58 +0200
Hans de Goede  escreveu:

> Hi Mauro,
> 
> Please pull from my gspca git tree for a new gspca based webcam driver,
> since this is a new driver which does not touch anything else, I would
> like to see this go into 3.15 .

Unfortunately, you sent this too late. The Kernel jenitors want to se those
patches one week before the merge window, at least, for them to review.

Also, this merge window was complex, as we merged a lot of patches there,
including some that conflicted with some DT changes.

I merged this series today for 3.16.

> 
> The following changes since commit a83b93a7480441a47856dc9104bea970e84cda87:
> 
>   [media] em28xx-dvb: fix PCTV 461e tuner I2C binding (2014-03-31 08:02:16 
> -0300)
> 
> are available in the git repository at:
> 
>   git://linuxtv.org/hgoede/gspca.git media-for_v3.15
> 
> for you to fetch changes up to 8ad536cb48ac13174acef9550095539931692d69:
> 
>   media/usb/gspca: Add support for Scopium astro webcam (0547:7303) 
> (2014-04-02 10:20:48 +0200)
> 
> 
> Robert Butora (1):
>   media/usb/gspca: Add support for Scopium astro webcam (0547:7303)
> 
>  drivers/media/usb/gspca/Kconfig   |  10 +
>  drivers/media/usb/gspca/Makefile  |   2 +
>  drivers/media/usb/gspca/dtcs033.c | 434 
> ++
>  3 files changed, 446 insertions(+)
>  create mode 100644 drivers/media/usb/gspca/dtcs033.c
> 
> Thanks & 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

Regard
-- 

Regards,
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: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Tomasz Stanislawski
On 04/15/2014 11:42 AM, Rahul Sharma wrote:
> Hi Tomasz,
> 
> On 15 April 2014 14:57, Tomasz Stanislawski  wrote:
>> Adds support for limitation of maximal pixel clock of HDMI
>> signal. This feature is needed on boards that contains
>> lines or bridges with frequency limitations.
>>
>> Signed-off-by: Tomasz Stanislawski 
>> ---
>>  .../devicetree/bindings/video/exynos_hdmi.txt  |4 
>>  drivers/gpu/drm/exynos/exynos_hdmi.c   |   12 
>>  include/media/s5p_hdmi.h   |1 +
>>  3 files changed, 17 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt 
>> b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>> index f9187a2..8718f8d 100644
>> --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>> +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
>> @@ -28,6 +28,10 @@ Required properties:
>>  - ddc: phandle to the hdmi ddc node
>>  - phy: phandle to the hdmi phy node
>>
>> +Optional properties:
>> +- max-pixel-clock: used to limit the maximal pixel clock if a board has 
>> lines,
>> +   connectors or bridges not capable of carring higher frequencies
>> +
>>  Example:
>>
>> hdmi {
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 2a18f4e..404f1b7 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -195,6 +195,7 @@ struct hdmi_context {
>> struct hdmi_resources   res;
>>
>> int hpd_gpio;
>> +   u32 max_pixel_clock;
>>
>> enum hdmi_type  type;
>>  };
>> @@ -887,6 +888,9 @@ static int hdmi_mode_valid(struct drm_connector 
>> *connector,
>> if (ret)
>> return MODE_BAD;
>>
>> +   if (mode->clock * 1000 > hdata->max_pixel_clock)
>> +   return MODE_BAD;
>> +
>> ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
>> if (ret < 0)
>> return MODE_BAD;
>> @@ -2031,6 +2035,8 @@ static struct s5p_hdmi_platform_data 
>> *drm_hdmi_dt_parse_pdata
>> return NULL;
>> }
>>
>> +   of_property_read_u32(np, "max-pixel-clock", &pd->max_pixel_clock);
>> +
>> return pd;
>>  }
>>
>> @@ -2067,6 +2073,11 @@ static int hdmi_probe(struct platform_device *pdev)
>> if (!pdata)
>> return -EINVAL;
>>
>> +   if (!pdata->max_pixel_clock) {
>> +   DRM_INFO("max-pixel-clock is zero, using INF\n");
>> +   pdata->max_pixel_clock = U32_MAX;
>> +   }
>> +
>> hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
>> if (!hdata)
>> return -ENOMEM;
>> @@ -2083,6 +2094,7 @@ static int hdmi_probe(struct platform_device *pdev)
>> hdata->type = drv_data->type;
>>
>> hdata->hpd_gpio = pdata->hpd_gpio;
>> +   hdata->max_pixel_clock = pdata->max_pixel_clock;
>> hdata->dev = dev;
>>
>> ret = hdmi_resources_init(hdata);
>> diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
>> index 181642b..7272d65 100644
>> --- a/include/media/s5p_hdmi.h
>> +++ b/include/media/s5p_hdmi.h
>> @@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
>> int mhl_bus;
>> struct i2c_board_info *mhl_info;
>> int hpd_gpio;
>> +   u32 max_pixel_clock;
>>  };
> 
> We have already removed Non DT support from the drm hdmi
> driver. IMO we should not be extending the pdata struct.
> 
> Regards,
> Rahul Sharma

Hi Rahul,

This is not a non-DT patch. The s5p_hdmi_platform_data is
generated from DT itself. This structure is just
a parsed version of DT attributes.

It may be a good idea to rename s5p_hdmi_platform_data
to exynos_hdmi_pdata and move it to exynos_hdmi_drm.c file
or parse DT directly in probe function.

I can prepare a patch for that.

Regards,
Tomasz Stanislawski


> 
>>
>>  #endif /* S5P_HDMI_H */
>> --
>> 1.7.9.5
>>
>> ___
>> dri-devel mailing list
>> dri-de...@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel

--
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 v3.15] davinci fixes

2014-04-15 Thread Hans Verkuil
This pull request was posted earlier, but it contained a patch of mine
that was wrong. Luckily it hasn't been merged yet, so this pull request
replaces the old one. It is identical, except for being rebased and without
my bad patch.

Regards,

Hans

The following changes since commit 277a163c83d7ba93fba1e8980d29a9f8bfcfba6c:

  Merge tag 'v3.15-rc1' into patchwork (2014-04-14 12:00:36 -0300)

are available in the git repository at:



  git://linuxtv.org/hverkuil/media_tree.git for-v3.15g  



for you to fetch changes up to eb174ed13a578141c494eadf9250d7fef32ce401:



  media: davinci: vpfe: make sure all the buffers unmapped and released 
(2014-04-15 14:35:21 +0200) 




Lad, Prabhakar (5): 

  media: davinci: vpif_capture: fix releasing of active buffers 

  media: davinci: vpif_display: fix releasing of active buffers 

  media: davinci: vpbe_display: fix releasing of active buffers 

  staging: media: davinci: vpfe: make sure all the buffers are released 

  media: davinci: vpfe: make sure all the buffers unmapped and released 



 drivers/media/platform/davinci/vpbe_display.c   | 16 +++-  

 drivers/media/platform/davinci/vpfe_capture.c   |  2 ++

 drivers/media/platform/davinci/vpif_capture.c   | 34 
+++---
 drivers/media/platform/davinci/vpif_display.c   | 35 
+++   
 drivers/staging/media/davinci_vpfe/vpfe_video.c | 13 +++-- 

 5 files changed, 74 insertions(+), 26 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


Re: [PATCH] [media] s2255drv: fix memory leak s2255_probe()

2014-04-15 Thread DaeSeok Youn
Hi, Sakari

2014-04-15 18:33 GMT+09:00 Sakari Ailus :
> Hi Daeseok,
>
> On Tue, Apr 15, 2014 at 01:49:34PM +0900, Daeseok Youn wrote:
>>
>> smatch says:
>>  drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
>> possible memory leak of 'dev'
>>
>> Signed-off-by: Daeseok Youn 
>> ---
>>  drivers/media/usb/s2255/s2255drv.c |1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/media/usb/s2255/s2255drv.c 
>> b/drivers/media/usb/s2255/s2255drv.c
>> index 1d4ba2b..8aca3ef 100644
>> --- a/drivers/media/usb/s2255/s2255drv.c
>> +++ b/drivers/media/usb/s2255/s2255drv.c
>> @@ -2243,6 +2243,7 @@ static int s2255_probe(struct usb_interface *interface,
>>   dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL);
>>   if (dev->cmdbuf == NULL) {
>>   s2255_dev_err(&interface->dev, "out of memory\n");
>> + kfree(dev);
>>   return -ENOMEM;
>>   }
>>
>
> The rest of the function already uses goto and labels for error handling. I
> think it'd take adding one more. dev is correctly released in other error
> cases.
I am not sure that adding a new label for error handling when
allocation for dev->cmdbuf is failed.
I think it is ok to me. :-) Because I think it is not good adding a
new label and use goto statement for this.

Thanks for review.

Regards,
Daeseok Youn.
>
> What do you think?
>
> --
> Kind 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


Re: [PATCH] cx23885: add support for Hauppauge ImpactVCB-e

2014-04-15 Thread Hans Verkuil
On 04/15/2014 12:41 PM, it-support wrote:
> Hi Guys,
> 
> This is a very noobie question,  but my 'patch' command does not return 
> to the command prompt.
> 
> I assume that my problem is one (or all four) of:
> 
> 1) the patch doesn't start or end where I think it does (I assume the 
> first line is
> 
> diff --git a/drivers/media/pci/cx23885/cx23885-cards.c 
> b/drivers/media/pci/cx23885/cx23885-cards.c
> 
> and the last line is:
> 
>   #define GPIO_1 0x0002
> 
> 2) I have put it in the wrong directory (I tried:
> 
> ~/linuxtv/media_build/linux/drivers/media/pci/cx23885/
> 
> and
> 
> ~/linuxtv/media_build
> 
> 3) My patch syntax is wrong.  I run it in the same directory as the file 
> like this: patch -b cx23885.diff

It's: patch -b http://vger.kernel.org/majordomo-info.html


Re: [PATCH] cx23885: add support for Hauppauge ImpactVCB-e

2014-04-15 Thread it-support

Hi Guys,

This is a very noobie question,  but my 'patch' command does not return 
to the command prompt.


I assume that my problem is one (or all four) of:

1) the patch doesn't start or end where I think it does (I assume the 
first line is


diff --git a/drivers/media/pci/cx23885/cx23885-cards.c 
b/drivers/media/pci/cx23885/cx23885-cards.c

and the last line is:

 #define GPIO_1 0x0002

2) I have put it in the wrong directory (I tried:

~/linuxtv/media_build/linux/drivers/media/pci/cx23885/

and

~/linuxtv/media_build

3) My patch syntax is wrong.  I run it in the same directory as the file 
like this: patch -b cx23885.diff


4) I don't need to apply because Steve has already patched it into 
linuxtv and I get it automaticallw when I build linux tv.


Regards

Steve


On 14/04/14 14:57, Hans Verkuil wrote:

This patch adds support for the Hauppauge ImpactVCB-e card to cx23885.

Tested with Composite input and S-Video.

While I do get audio it is very choppy. It is not clear whether that is
a general cx23885 driver problem or specific to this board. If it is specific
to the board, then I might have missed something.

Steven (Toth, not Cookson ;-) ), do you have an idea what it might be?

Regards,

Hans

Signed-off-by: Hans Verkuil 
---
  drivers/media/pci/cx23885/cx23885-cards.c | 30 +-
  drivers/media/pci/cx23885/cx23885-video.c |  1 +
  drivers/media/pci/cx23885/cx23885.h   |  1 +
  3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx23885/cx23885-cards.c 
b/drivers/media/pci/cx23885/cx23885-cards.c
index 79f20c8..49a3711 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -649,7 +649,25 @@ struct cx23885_board cx23885_boards[] = {
  CX25840_NONE1_CH3,
.amux   = CX25840_AUDIO6,
} },
-   }
+   },
+   [CX23885_BOARD_HAUPPAUGE_IMPACTVCBE] = {
+   .name   = "Hauppauge ImpactVCB-e",
+   .porta  = CX23885_ANALOG_VIDEO,
+   .input  = {{
+   .type   = CX23885_VMUX_COMPOSITE1,
+   .vmux   = CX25840_VIN7_CH3 |
+ CX25840_VIN4_CH2 |
+ CX25840_VIN6_CH1,
+   .amux   = CX25840_AUDIO7,
+   }, {
+   .type   = CX23885_VMUX_SVIDEO,
+   .vmux   = CX25840_VIN7_CH3 |
+ CX25840_VIN4_CH2 |
+ CX25840_VIN8_CH1 |
+ CX25840_SVIDEO_ON,
+   .amux   = CX25840_AUDIO7,
+   } },
+   },
  };
  const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
  
@@ -897,6 +915,10 @@ struct cx23885_subid cx23885_subids[] = {

.subvendor = 0x1461,
.subdevice = 0xd939,
.card  = CX23885_BOARD_AVERMEDIA_HC81R,
+   }, {
+   .subvendor = 0x0070,
+   .subdevice = 0x7133,
+   .card  = CX23885_BOARD_HAUPPAUGE_IMPACTVCBE,
},
  };
  const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -977,6 +999,9 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 
*eeprom_data)
case 71009:
/* WinTV-HVR1200 (PCIe, Retail, full height)
 * DVB-T and basic analog */
+   case 71100:
+   /* WinTV-ImpactVCB-e (PCIe, Retail, half height)
+* Basic analog */
case 71359:
/* WinTV-HVR1200 (PCIe, OEM, half height)
 * DVB-T and basic analog */
@@ -1701,6 +1726,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
case CX23885_BOARD_HAUPPAUGE_HVR1850:
case CX23885_BOARD_HAUPPAUGE_HVR1290:
case CX23885_BOARD_HAUPPAUGE_HVR4400:
+   case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE:
if (dev->i2c_bus[0].i2c_rc == 0)
hauppauge_eeprom(dev, eeprom+0xc0);
break;
@@ -1807,6 +1833,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
case CX23885_BOARD_HAUPPAUGE_HVR1200:
case CX23885_BOARD_HAUPPAUGE_HVR1700:
case CX23885_BOARD_HAUPPAUGE_HVR1400:
+   case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE:
case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200:
case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000:
@@ -1835,6 +1862,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
break;
case CX23885_BOARD_HAUPPAUGE_HVR1250:
case CX23885_BOARD_HAUPPAUGE_HVR1800:
+   case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE:
case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
case CX23885_BOARD_HAUPPAUGE_HVR1700:
case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
diff --git a/drivers/media/pci/cx23885/

Re: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Lucas Stach
Am Dienstag, den 15.04.2014, 11:27 +0200 schrieb Tomasz Stanislawski:
> Adds support for limitation of maximal pixel clock of HDMI
> signal. This feature is needed on boards that contains
> lines or bridges with frequency limitations.
> 
> Signed-off-by: Tomasz Stanislawski 
> ---
>  .../devicetree/bindings/video/exynos_hdmi.txt  |4 
>  drivers/gpu/drm/exynos/exynos_hdmi.c   |   12 
>  include/media/s5p_hdmi.h   |1 +
>  3 files changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt 
> b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> index f9187a2..8718f8d 100644
> --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> @@ -28,6 +28,10 @@ Required properties:
>  - ddc: phandle to the hdmi ddc node
>  - phy: phandle to the hdmi phy node
>  
> +Optional properties:
> +- max-pixel-clock: used to limit the maximal pixel clock if a board has 
> lines,
> + connectors or bridges not capable of carring higher frequencies
> +
>  Example:
>  
>   hdmi {
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 2a18f4e..404f1b7 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -195,6 +195,7 @@ struct hdmi_context {
>   struct hdmi_resources   res;
>  
>   int hpd_gpio;
> + u32 max_pixel_clock;
>  
>   enum hdmi_type  type;
>  };
> @@ -887,6 +888,9 @@ static int hdmi_mode_valid(struct drm_connector 
> *connector,
>   if (ret)
>   return MODE_BAD;
>  
> + if (mode->clock * 1000 > hdata->max_pixel_clock)
> + return MODE_BAD;
> +
This should be MODE_CLOCK_HIGH

Regards,
Lucas
-- 
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

--
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: [PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Rahul Sharma
Hi Tomasz,

On 15 April 2014 14:57, Tomasz Stanislawski  wrote:
> Adds support for limitation of maximal pixel clock of HDMI
> signal. This feature is needed on boards that contains
> lines or bridges with frequency limitations.
>
> Signed-off-by: Tomasz Stanislawski 
> ---
>  .../devicetree/bindings/video/exynos_hdmi.txt  |4 
>  drivers/gpu/drm/exynos/exynos_hdmi.c   |   12 
>  include/media/s5p_hdmi.h   |1 +
>  3 files changed, 17 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt 
> b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> index f9187a2..8718f8d 100644
> --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
> @@ -28,6 +28,10 @@ Required properties:
>  - ddc: phandle to the hdmi ddc node
>  - phy: phandle to the hdmi phy node
>
> +Optional properties:
> +- max-pixel-clock: used to limit the maximal pixel clock if a board has 
> lines,
> +   connectors or bridges not capable of carring higher frequencies
> +
>  Example:
>
> hdmi {
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 2a18f4e..404f1b7 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -195,6 +195,7 @@ struct hdmi_context {
> struct hdmi_resources   res;
>
> int hpd_gpio;
> +   u32 max_pixel_clock;
>
> enum hdmi_type  type;
>  };
> @@ -887,6 +888,9 @@ static int hdmi_mode_valid(struct drm_connector 
> *connector,
> if (ret)
> return MODE_BAD;
>
> +   if (mode->clock * 1000 > hdata->max_pixel_clock)
> +   return MODE_BAD;
> +
> ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
> if (ret < 0)
> return MODE_BAD;
> @@ -2031,6 +2035,8 @@ static struct s5p_hdmi_platform_data 
> *drm_hdmi_dt_parse_pdata
> return NULL;
> }
>
> +   of_property_read_u32(np, "max-pixel-clock", &pd->max_pixel_clock);
> +
> return pd;
>  }
>
> @@ -2067,6 +2073,11 @@ static int hdmi_probe(struct platform_device *pdev)
> if (!pdata)
> return -EINVAL;
>
> +   if (!pdata->max_pixel_clock) {
> +   DRM_INFO("max-pixel-clock is zero, using INF\n");
> +   pdata->max_pixel_clock = U32_MAX;
> +   }
> +
> hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
> if (!hdata)
> return -ENOMEM;
> @@ -2083,6 +2094,7 @@ static int hdmi_probe(struct platform_device *pdev)
> hdata->type = drv_data->type;
>
> hdata->hpd_gpio = pdata->hpd_gpio;
> +   hdata->max_pixel_clock = pdata->max_pixel_clock;
> hdata->dev = dev;
>
> ret = hdmi_resources_init(hdata);
> diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
> index 181642b..7272d65 100644
> --- a/include/media/s5p_hdmi.h
> +++ b/include/media/s5p_hdmi.h
> @@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
> int mhl_bus;
> struct i2c_board_info *mhl_info;
> int hpd_gpio;
> +   u32 max_pixel_clock;
>  };

We have already removed Non DT support from the drm hdmi
driver. IMO we should not be extending the pdata struct.

Regards,
Rahul Sharma

>
>  #endif /* S5P_HDMI_H */
> --
> 1.7.9.5
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
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] s2255drv: fix memory leak s2255_probe()

2014-04-15 Thread Sakari Ailus
Hi Daeseok,

On Tue, Apr 15, 2014 at 01:49:34PM +0900, Daeseok Youn wrote:
> 
> smatch says:
>  drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
> possible memory leak of 'dev'
> 
> Signed-off-by: Daeseok Youn 
> ---
>  drivers/media/usb/s2255/s2255drv.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/usb/s2255/s2255drv.c 
> b/drivers/media/usb/s2255/s2255drv.c
> index 1d4ba2b..8aca3ef 100644
> --- a/drivers/media/usb/s2255/s2255drv.c
> +++ b/drivers/media/usb/s2255/s2255drv.c
> @@ -2243,6 +2243,7 @@ static int s2255_probe(struct usb_interface *interface,
>   dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL);
>   if (dev->cmdbuf == NULL) {
>   s2255_dev_err(&interface->dev, "out of memory\n");
> + kfree(dev);
>   return -ENOMEM;
>   }
>  

The rest of the function already uses goto and labels for error handling. I
think it'd take adding one more. dev is correctly released in other error
cases.

What do you think?

-- 
Kind 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 01/10] si2157: Silicon Labs Si2157 silicon tuner driver

2014-04-15 Thread Antti Palosaari
Silicon Labs Si2157 silicon tuner driver.
Currently it supports only DVB-T.

Signed-off-by: Antti Palosaari 
---
 drivers/media/tuners/Kconfig   |   7 ++
 drivers/media/tuners/Makefile  |   1 +
 drivers/media/tuners/si2157.c  | 244 +
 drivers/media/tuners/si2157.h  |  18 +++
 drivers/media/tuners/si2157_priv.h |  21 
 5 files changed, 291 insertions(+)
 create mode 100644 drivers/media/tuners/si2157.c
 create mode 100644 drivers/media/tuners/si2157.h
 create mode 100644 drivers/media/tuners/si2157_priv.h

diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig
index a128488..22b6b8b 100644
--- a/drivers/media/tuners/Kconfig
+++ b/drivers/media/tuners/Kconfig
@@ -230,6 +230,13 @@ config MEDIA_TUNER_TUA9001
help
  Infineon TUA 9001 silicon tuner driver.
 
+config MEDIA_TUNER_SI2157
+   tristate "Silicon Labs Si2157 silicon tuner"
+   depends on MEDIA_SUPPORT && I2C
+   default m if !MEDIA_SUBDRV_AUTOSELECT
+   help
+ Silicon Labs Si2157 silicon tuner driver.
+
 config MEDIA_TUNER_IT913X
tristate "ITE Tech IT913x silicon tuner"
depends on MEDIA_SUPPORT && I2C
diff --git a/drivers/media/tuners/Makefile b/drivers/media/tuners/Makefile
index efe82a9..a6ff0c6 100644
--- a/drivers/media/tuners/Makefile
+++ b/drivers/media/tuners/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o
 obj-$(CONFIG_MEDIA_TUNER_E4000) += e4000.o
 obj-$(CONFIG_MEDIA_TUNER_FC2580) += fc2580.o
 obj-$(CONFIG_MEDIA_TUNER_TUA9001) += tua9001.o
+obj-$(CONFIG_MEDIA_TUNER_SI2157) += si2157.o
 obj-$(CONFIG_MEDIA_TUNER_M88TS2022) += m88ts2022.o
 obj-$(CONFIG_MEDIA_TUNER_FC0011) += fc0011.o
 obj-$(CONFIG_MEDIA_TUNER_FC0012) += fc0012.o
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
new file mode 100644
index 000..953f2e3
--- /dev/null
+++ b/drivers/media/tuners/si2157.c
@@ -0,0 +1,244 @@
+#include "si2157_priv.h"
+
+/* execute firmware command */
+static int si2157_cmd_execute(struct si2157 *s, struct si2157_cmd *cmd)
+{
+   int ret;
+   u8 buf[1];
+   unsigned long timeout;
+
+   mutex_lock(&s->i2c_mutex);
+
+   if (cmd->len) {
+   /* write cmd and args for firmware */
+   ret = i2c_master_send(s->client, cmd->args, cmd->len);
+   if (ret < 0) {
+   goto err_mutex_unlock;
+   } else if (ret != cmd->len) {
+   ret = -EREMOTEIO;
+   goto err_mutex_unlock;
+   }
+   }
+
+   /* wait cmd execution terminate */
+   #define TIMEOUT 80
+   timeout = jiffies + msecs_to_jiffies(TIMEOUT);
+   while (!time_after(jiffies, timeout)) {
+   ret = i2c_master_recv(s->client, buf, 1);
+   if (ret < 0) {
+   goto err_mutex_unlock;
+   } else if (ret != 1) {
+   ret = -EREMOTEIO;
+   goto err_mutex_unlock;
+   }
+
+   /* firmware ready? */
+   if ((buf[0] >> 7) & 0x01)
+   break;
+   }
+
+   dev_dbg(&s->client->dev, "%s: cmd execution took %d ms\n", __func__,
+   jiffies_to_msecs(jiffies) -
+   (jiffies_to_msecs(timeout) - TIMEOUT));
+
+   if (!(buf[0] >> 7) & 0x01) {
+   ret = -ETIMEDOUT;
+   goto err_mutex_unlock;
+   } else {
+   ret = 0;
+   }
+
+err_mutex_unlock:
+   mutex_unlock(&s->i2c_mutex);
+   if (ret)
+   goto err;
+
+   return 0;
+err:
+   dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret);
+   return ret;
+}
+
+static int si2157_init(struct dvb_frontend *fe)
+{
+   struct si2157 *s = fe->tuner_priv;
+
+   dev_dbg(&s->client->dev, "%s:\n", __func__);
+
+   s->active = true;
+
+   return 0;
+}
+
+static int si2157_sleep(struct dvb_frontend *fe)
+{
+   struct si2157 *s = fe->tuner_priv;
+
+   dev_dbg(&s->client->dev, "%s:\n", __func__);
+
+   s->active = false;
+
+   return 0;
+}
+
+static int si2157_set_params(struct dvb_frontend *fe)
+{
+   struct si2157 *s = fe->tuner_priv;
+   struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+   int ret;
+   struct si2157_cmd cmd;
+
+   dev_dbg(&s->client->dev,
+   "%s: delivery_system=%d frequency=%u bandwidth_hz=%u\n",
+   __func__, c->delivery_system, c->frequency,
+   c->bandwidth_hz);
+
+   if (!s->active) {
+   ret = -EAGAIN;
+   goto err;
+   }
+
+   /* configure? */
+   cmd.args[0] = 0xc0;
+   cmd.args[1] = 0x00;
+   cmd.args[2] = 0x0c;
+   cmd.args[3] = 0x00;
+   cmd.args[4] = 0x00;
+   cmd.args[5] = 0x01;
+   cmd.args[6] = 0x01;
+   cmd.args[7] = 0x01;
+   cmd.args[8] = 0x01;
+   cmd.args[9] =

[PATCH 10/10] MAINTAINERS: add si2157 driver

2014-04-15 Thread Antti Palosaari
Silicon Labs Si2157 silicon tuner driver.

Signed-off-by: Antti Palosaari 
---
 MAINTAINERS | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index c44c914..9322a3a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7813,6 +7813,16 @@ M:   Robin Holt 
 S: Maintained
 F: drivers/misc/sgi-xp/
 
+SI2157 MEDIA DRIVER
+M: Antti Palosaari 
+L: linux-media@vger.kernel.org
+W: http://linuxtv.org/
+W: http://palosaari.fi/linux/
+Q: http://patchwork.linuxtv.org/project/linux-media/list/
+T: git git://linuxtv.org/anttip/media_tree.git
+S: Maintained
+F: drivers/media/tuners/si2157*
+
 SI2168 MEDIA DRIVER
 M: Antti Palosaari 
 L: linux-media@vger.kernel.org
-- 
1.9.0

--
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 02/10] si2168: Silicon Labs Si2168 DVB-T/T2/C demod driver

2014-04-15 Thread Antti Palosaari
Silicon Labs Si2168 DVB-T/T2/C demod driver.
That driver version supports only DVB-T.

Signed-off-by: Antti Palosaari 
---
 drivers/media/dvb-frontends/Kconfig   |   7 +
 drivers/media/dvb-frontends/Makefile  |   1 +
 drivers/media/dvb-frontends/si2168.c  | 708 ++
 drivers/media/dvb-frontends/si2168.h  |  23 +
 drivers/media/dvb-frontends/si2168_priv.h |  30 ++
 5 files changed, 769 insertions(+)
 create mode 100644 drivers/media/dvb-frontends/si2168.c
 create mode 100644 drivers/media/dvb-frontends/si2168.h
 create mode 100644 drivers/media/dvb-frontends/si2168_priv.h

diff --git a/drivers/media/dvb-frontends/Kconfig 
b/drivers/media/dvb-frontends/Kconfig
index 025fc54..1469d44 100644
--- a/drivers/media/dvb-frontends/Kconfig
+++ b/drivers/media/dvb-frontends/Kconfig
@@ -446,6 +446,13 @@ config DVB_RTL2832
help
  Say Y when you want to support this frontend.
 
+config DVB_SI2168
+   tristate "Silicon Labs Si2168"
+   depends on DVB_CORE && I2C && I2C_MUX
+   default m if !MEDIA_SUBDRV_AUTOSELECT
+   help
+ Say Y when you want to support this frontend.
+
 comment "DVB-C (cable) frontends"
depends on DVB_CORE
 
diff --git a/drivers/media/dvb-frontends/Makefile 
b/drivers/media/dvb-frontends/Makefile
index 282aba2..dda0bee 100644
--- a/drivers/media/dvb-frontends/Makefile
+++ b/drivers/media/dvb-frontends/Makefile
@@ -78,6 +78,7 @@ obj-$(CONFIG_DVB_AF9013) += af9013.o
 obj-$(CONFIG_DVB_CX24116) += cx24116.o
 obj-$(CONFIG_DVB_CX24117) += cx24117.o
 obj-$(CONFIG_DVB_SI21XX) += si21xx.o
+obj-$(CONFIG_DVB_SI2168) += si2168.o
 obj-$(CONFIG_DVB_STV0288) += stv0288.o
 obj-$(CONFIG_DVB_STB6000) += stb6000.o
 obj-$(CONFIG_DVB_S921) += s921.o
diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
new file mode 100644
index 000..eef4e45
--- /dev/null
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -0,0 +1,708 @@
+#include "si2168_priv.h"
+
+static const struct dvb_frontend_ops si2168_ops;
+
+/* execute firmware command */
+static int si2168_cmd_execute(struct si2168 *s, struct si2168_cmd *cmd)
+{
+   int ret;
+   unsigned long timeout;
+
+   mutex_lock(&s->i2c_mutex);
+
+   if (cmd->wlen) {
+   /* write cmd and args for firmware */
+   ret = i2c_master_send(s->client, cmd->args, cmd->wlen);
+   if (ret < 0) {
+   goto err_mutex_unlock;
+   } else if (ret != cmd->wlen) {
+   ret = -EREMOTEIO;
+   goto err_mutex_unlock;
+   }
+   }
+
+   if (cmd->rlen) {
+   /* wait cmd execution terminate */
+   #define TIMEOUT 50
+   timeout = jiffies + msecs_to_jiffies(TIMEOUT);
+   while (!time_after(jiffies, timeout)) {
+   ret = i2c_master_recv(s->client, cmd->args, cmd->rlen);
+   if (ret < 0) {
+   goto err_mutex_unlock;
+   } else if (ret != cmd->rlen) {
+   ret = -EREMOTEIO;
+   goto err_mutex_unlock;
+   }
+
+   /* firmware ready? */
+   if ((cmd->args[0] >> 7) & 0x01)
+   break;
+   }
+
+   dev_dbg(&s->client->dev, "%s: cmd execution took %d ms\n",
+   __func__,
+   jiffies_to_msecs(jiffies) -
+   (jiffies_to_msecs(timeout) - TIMEOUT));
+
+   if (!(cmd->args[0] >> 7) & 0x01) {
+   ret = -ETIMEDOUT;
+   goto err_mutex_unlock;
+   }
+   }
+
+   ret = 0;
+
+err_mutex_unlock:
+   mutex_unlock(&s->i2c_mutex);
+   if (ret)
+   goto err;
+
+   return 0;
+err:
+   dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret);
+   return ret;
+}
+
+static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status)
+{
+   struct si2168 *s = fe->demodulator_priv;
+   int ret;
+   struct si2168_cmd cmd;
+
+   *status = 0;
+
+   if (!s->active) {
+   ret = -EAGAIN;
+   goto err;
+   }
+
+   cmd.args[0] = 0xa0;
+   cmd.args[1] = 0x01;
+   cmd.wlen = 2;
+   cmd.rlen = 13;
+   ret = si2168_cmd_execute(s, &cmd);
+   if (ret)
+   goto err;
+
+   /*
+* Possible values seen, in order from strong signal to weak:
+* 16 0001 0110 full lock
+* 1e 0001 1110 partial lock
+* 1a 0001 1010 partial lock
+* 18 0001 1000 no lock
+*
+* [b3:b1] lock bits
+* [b4] statistics ready? Set in a few secs after lock is gained.
+*/
+
+   switch ((cmd.args[2] >> 0) & 0x0f) {
+   case 0x0a:
+   *status = FE_HAS_SIGNAL | FE_HAS_CARRIER;
+

[PATCH 06/10] si2168: add support for DVB-C (annex A version)

2014-04-15 Thread Antti Palosaari
Add support for DVB-C (annex A version).

Signed-off-by: Antti Palosaari 
---
 drivers/media/dvb-frontends/si2168.c | 36 ++--
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index 4f3efbe..7aaac81 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -84,6 +84,12 @@ static int si2168_read_status(struct dvb_frontend *fe, 
fe_status_t *status)
cmd.wlen = 2;
cmd.rlen = 13;
break;
+   case SYS_DVBC_ANNEX_A:
+   cmd.args[0] = 0x90;
+   cmd.args[1] = 0x01;
+   cmd.wlen = 2;
+   cmd.rlen = 9;
+   break;
case SYS_DVBT2:
cmd.args[0] = 0x50;
cmd.args[1] = 0x01;
@@ -157,6 +163,9 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
case SYS_DVBT:
delivery_system = 0x20;
break;
+   case SYS_DVBC_ANNEX_A:
+   delivery_system = 0x30;
+   break;
case SYS_DVBT2:
delivery_system = 0x70;
break;
@@ -165,23 +174,20 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
goto err;
}
 
-   switch (c->bandwidth_hz) {
-   case 500:
+   if (c->bandwidth_hz <= 500)
bandwidth = 0x05;
-   break;
-   case 600:
+   else if (c->bandwidth_hz <= 600)
bandwidth = 0x06;
-   break;
-   case 700:
+   else if (c->bandwidth_hz <= 700)
bandwidth = 0x07;
-   break;
-   case 800:
+   else if (c->bandwidth_hz <= 800)
bandwidth = 0x08;
-   break;
-   default:
-   ret = -EINVAL;
-   goto err;
-   }
+   else if (c->bandwidth_hz <= 900)
+   bandwidth = 0x09;
+   else if (c->bandwidth_hz <= 1000)
+   bandwidth = 0x0a;
+   else
+   bandwidth = 0x0f;
 
/* program tuner */
if (fe->ops.tuner_ops.set_params) {
@@ -200,6 +206,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
/* that has no big effect */
if (c->delivery_system == SYS_DVBT)
memcpy(cmd.args, "\x89\x21\x06\x11\xff\x98", 6);
+   else if (c->delivery_system == SYS_DVBC_ANNEX_A)
+   memcpy(cmd.args, "\x89\x21\x06\x11\x89\xf0", 6);
else if (c->delivery_system == SYS_DVBT2)
memcpy(cmd.args, "\x89\x21\x06\x11\x89\x20", 6);
cmd.wlen = 6;
@@ -614,7 +622,7 @@ static int si2168_deselect(struct i2c_adapter *adap, void 
*mux_priv, u32 chan)
 }
 
 static const struct dvb_frontend_ops si2168_ops = {
-   .delsys = {SYS_DVBT, SYS_DVBT2},
+   .delsys = {SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A},
.info = {
.name = "Silicon Labs Si2168",
.caps = FE_CAN_FEC_1_2 |
-- 
1.9.0

--
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 08/10] si2168: add copyright and license

2014-04-15 Thread Antti Palosaari
Add copyright and license for each file.

Signed-off-by: Antti Palosaari 
---
 drivers/media/dvb-frontends/si2168.c  | 16 
 drivers/media/dvb-frontends/si2168.h  | 16 
 drivers/media/dvb-frontends/si2168_priv.h | 16 
 3 files changed, 48 insertions(+)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index 7aaac81..dc5b64a 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2168 DVB-T/T2/C demodulator driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #include "si2168_priv.h"
 
 static const struct dvb_frontend_ops si2168_ops;
diff --git a/drivers/media/dvb-frontends/si2168.h 
b/drivers/media/dvb-frontends/si2168.h
index 5a801aa..3c5b5ab 100644
--- a/drivers/media/dvb-frontends/si2168.h
+++ b/drivers/media/dvb-frontends/si2168.h
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2168 DVB-T/T2/C demodulator driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #ifndef SI2168_H
 #define SI2168_H
 
diff --git a/drivers/media/dvb-frontends/si2168_priv.h 
b/drivers/media/dvb-frontends/si2168_priv.h
index 3646324..2a343e8 100644
--- a/drivers/media/dvb-frontends/si2168_priv.h
+++ b/drivers/media/dvb-frontends/si2168_priv.h
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2168 DVB-T/T2/C demodulator driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #ifndef SI2168_PRIV_H
 #define SI2168_PRIV_H
 
-- 
1.9.0

--
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 04/10] si2168: add support for DVB-T2

2014-04-15 Thread Antti Palosaari
Add support for DVB-T2.

Signed-off-by: Antti Palosaari 
---
 drivers/media/dvb-frontends/si2168.c | 55 
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index eef4e45..4f3efbe 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -66,6 +66,7 @@ err:
 static int si2168_read_status(struct dvb_frontend *fe, fe_status_t *status)
 {
struct si2168 *s = fe->demodulator_priv;
+   struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int ret;
struct si2168_cmd cmd;
 
@@ -76,10 +77,24 @@ static int si2168_read_status(struct dvb_frontend *fe, 
fe_status_t *status)
goto err;
}
 
-   cmd.args[0] = 0xa0;
-   cmd.args[1] = 0x01;
-   cmd.wlen = 2;
-   cmd.rlen = 13;
+   switch (c->delivery_system) {
+   case SYS_DVBT:
+   cmd.args[0] = 0xa0;
+   cmd.args[1] = 0x01;
+   cmd.wlen = 2;
+   cmd.rlen = 13;
+   break;
+   case SYS_DVBT2:
+   cmd.args[0] = 0x50;
+   cmd.args[1] = 0x01;
+   cmd.wlen = 2;
+   cmd.rlen = 14;
+   break;
+   default:
+   ret = -EINVAL;
+   goto err;
+   }
+
ret = si2168_cmd_execute(s, &cmd);
if (ret)
goto err;
@@ -125,7 +140,7 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int ret;
struct si2168_cmd cmd;
-   u8 bandwidth;
+   u8 bandwidth, delivery_system;
 
dev_dbg(&s->client->dev,
"%s: delivery_system=%u modulation=%u frequency=%u 
bandwidth_hz=%u symbol_rate=%u inversion=%u\n",
@@ -138,18 +153,30 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
goto err;
}
 
+   switch (c->delivery_system) {
+   case SYS_DVBT:
+   delivery_system = 0x20;
+   break;
+   case SYS_DVBT2:
+   delivery_system = 0x70;
+   break;
+   default:
+   ret = -EINVAL;
+   goto err;
+   }
+
switch (c->bandwidth_hz) {
case 500:
-   bandwidth = 0x25;
+   bandwidth = 0x05;
break;
case 600:
-   bandwidth = 0x26;
+   bandwidth = 0x06;
break;
case 700:
-   bandwidth = 0x27;
+   bandwidth = 0x07;
break;
case 800:
-   bandwidth = 0x28;
+   bandwidth = 0x08;
break;
default:
ret = -EINVAL;
@@ -170,7 +197,11 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
if (ret)
goto err;
 
-   memcpy(cmd.args, "\x89\x21\x06\x11\xff\x98", 6);
+   /* that has no big effect */
+   if (c->delivery_system == SYS_DVBT)
+   memcpy(cmd.args, "\x89\x21\x06\x11\xff\x98", 6);
+   else if (c->delivery_system == SYS_DVBT2)
+   memcpy(cmd.args, "\x89\x21\x06\x11\x89\x20", 6);
cmd.wlen = 6;
cmd.rlen = 3;
ret = si2168_cmd_execute(s, &cmd);
@@ -241,7 +272,7 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
goto err;
 
memcpy(cmd.args, "\x14\x00\x0a\x10\x00\x00", 6);
-   cmd.args[4] = bandwidth;
+   cmd.args[4] = delivery_system | bandwidth;
cmd.wlen = 6;
cmd.rlen = 1;
ret = si2168_cmd_execute(s, &cmd);
@@ -583,7 +614,7 @@ static int si2168_deselect(struct i2c_adapter *adap, void 
*mux_priv, u32 chan)
 }
 
 static const struct dvb_frontend_ops si2168_ops = {
-   .delsys = {SYS_DVBT},
+   .delsys = {SYS_DVBT, SYS_DVBT2},
.info = {
.name = "Silicon Labs Si2168",
.caps = FE_CAN_FEC_1_2 |
-- 
1.9.0

--
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 05/10] si2157: extend frequency range for DVB-C

2014-04-15 Thread Antti Palosaari
DVB-C uses lower frequencies than DVB-T. Extend frequency range down to
110 MHz in order to support DVB-C. 110 - 862 MHz range is defined by
NorDig Unified 2.2 specification.

Signed-off-by: Antti Palosaari 
---
 drivers/media/tuners/si2157.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 953f2e3..5675448 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -155,7 +155,7 @@ err:
 static const struct dvb_tuner_ops si2157_tuner_ops = {
.info = {
.name   = "Silicon Labs Si2157",
-   .frequency_min  = 17400,
+   .frequency_min  = 11000,
.frequency_max  = 86200,
},
 
-- 
1.9.0

--
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 03/10] em28xx: add [2013:025f] PCTV tripleStick (292e)

2014-04-15 Thread Antti Palosaari
Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157.

Signed-off-by: Antti Palosaari 
---
 drivers/media/usb/em28xx/Kconfig|  2 +
 drivers/media/usb/em28xx/em28xx-cards.c | 25 +++
 drivers/media/usb/em28xx/em28xx-dvb.c   | 73 +
 drivers/media/usb/em28xx/em28xx.h   |  1 +
 4 files changed, 101 insertions(+)

diff --git a/drivers/media/usb/em28xx/Kconfig b/drivers/media/usb/em28xx/Kconfig
index d23a912..f5d7198 100644
--- a/drivers/media/usb/em28xx/Kconfig
+++ b/drivers/media/usb/em28xx/Kconfig
@@ -57,6 +57,8 @@ config VIDEO_EM28XX_DVB
select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
select DVB_DRX39XYJ if MEDIA_SUBDRV_AUTOSELECT
+   select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT
+   select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT
---help---
  This adds support for DVB cards based on the
  Empiatech em28xx chips.
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index 50aa5a5..437f73f 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -467,6 +467,18 @@ static struct em28xx_reg_seq 
speedlink_vad_laplace_reg_seq[] = {
{   -1, -1, -1, -1},
 };
 
+static struct em28xx_reg_seq pctv_292e[] = {
+   {EM2874_R80_GPIO_P0_CTRL,  0xff, 0xff,  0},
+   {0x0d, 0xff, 0xff,950},
+   {EM2874_R80_GPIO_P0_CTRL,  0xbd, 0xff,100},
+   {EM2874_R80_GPIO_P0_CTRL,  0xfd, 0xff,410},
+   {EM2874_R80_GPIO_P0_CTRL,  0x7d, 0xff,300},
+   {EM2874_R80_GPIO_P0_CTRL,  0x7c, 0xff, 60},
+   {0x0d, 0x42, 0xff, 50},
+   {EM2874_R5F_TS_ENABLE, 0x85, 0xff,  0},
+   {-1, -1,   -1, -1},
+};
+
 /*
  *  Button definitions
  */
@@ -2220,6 +2232,17 @@ struct em28xx_board em28xx_boards[] = {
.has_dvb   = 1,
.ir_codes  = RC_MAP_PINNACLE_PCTV_HD,
},
+   /* 2013:025f PCTV tripleStick (292e).
+* Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */
+   [EM28178_BOARD_PCTV_292E] = {
+   .name  = "PCTV tripleStick (292e)",
+   .def_i2c_bus   = 1,
+   .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | 
EM28XX_I2C_FREQ_400_KHZ,
+   .tuner_type= TUNER_ABSENT,
+   .tuner_gpio= pctv_292e,
+   .has_dvb   = 1,
+   .ir_codes  = RC_MAP_PINNACLE_PCTV_HD,
+   },
 };
 EXPORT_SYMBOL_GPL(em28xx_boards);
 
@@ -2397,6 +2420,8 @@ struct usb_device_id em28xx_id_table[] = {
.driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
{ USB_DEVICE(0x2013, 0x0258),
.driver_info = EM28178_BOARD_PCTV_461E },
+   { USB_DEVICE(0x2013, 0x025f),
+   .driver_info = EM28178_BOARD_PCTV_292E },
{ },
 };
 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c 
b/drivers/media/usb/em28xx/em28xx-dvb.c
index f599b18..b79e08b 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -55,6 +55,8 @@
 #include "mb86a20s.h"
 #include "m88ds3103.h"
 #include "m88ts2022.h"
+#include "si2168.h"
+#include "si2157.h"
 
 MODULE_AUTHOR("Mauro Carvalho Chehab ");
 MODULE_LICENSE("GPL");
@@ -93,6 +95,7 @@ struct em28xx_dvb {
struct semaphore  pll_mutex;
booldont_attach_fe1;
int lna_gpio;
+   struct i2c_client   *i2c_client_demod;
struct i2c_client   *i2c_client_tuner;
 };
 
@@ -1496,6 +1499,62 @@ static int em28xx_dvb_init(struct em28xx *dev)
dvb->i2c_client_tuner = client;
}
break;
+   case EM28178_BOARD_PCTV_292E:
+   {
+   struct i2c_adapter *adapter;
+   struct i2c_client *client;
+   struct i2c_board_info info;
+   struct si2168_config si2168_config;
+   struct si2157_config si2157_config;
+
+   /* attach demod */
+   si2168_config.i2c_adapter = &adapter;
+   si2168_config.fe = &dvb->fe[0];
+   memset(&info, 0, sizeof(struct i2c_board_info));
+   strlcpy(info.type, "si2168", I2C_NAME_SIZE);
+   info.addr = 0x64;
+   info.platform_data = &si2168_config;
+   request_module(info.type);
+   client = 
i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info);
+   if (client == NULL || client->dev.driver == NULL) {
+   result = -E

[PATCH 09/10] MAINTAINERS: add si2168 driver

2014-04-15 Thread Antti Palosaari
Silicon Labs Si2168 DVB-T/T2/C demod driver

Signed-off-by: Antti Palosaari 
---
 MAINTAINERS | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 94c9cff..c44c914 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7813,6 +7813,16 @@ M:   Robin Holt 
 S: Maintained
 F: drivers/misc/sgi-xp/
 
+SI2168 MEDIA DRIVER
+M: Antti Palosaari 
+L: linux-media@vger.kernel.org
+W: http://linuxtv.org/
+W: http://palosaari.fi/linux/
+Q: http://patchwork.linuxtv.org/project/linux-media/list/
+T: git git://linuxtv.org/anttip/media_tree.git
+S: Maintained
+F: drivers/media/dvb-frontends/si2168*
+
 SI470X FM RADIO RECEIVER I2C DRIVER
 M: Hans Verkuil 
 L: linux-media@vger.kernel.org
-- 
1.9.0

--
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 07/10] si2157: add copyright and license

2014-04-15 Thread Antti Palosaari
Add copyright and license for each file.

Signed-off-by: Antti Palosaari 
---
 drivers/media/tuners/si2157.c  | 16 
 drivers/media/tuners/si2157.h  | 16 
 drivers/media/tuners/si2157_priv.h | 16 
 3 files changed, 48 insertions(+)

diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 5675448..271a752 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2157 silicon tuner driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #include "si2157_priv.h"
 
 /* execute firmware command */
diff --git a/drivers/media/tuners/si2157.h b/drivers/media/tuners/si2157.h
index 5de47d4..f469a09 100644
--- a/drivers/media/tuners/si2157.h
+++ b/drivers/media/tuners/si2157.h
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2157 silicon tuner driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #ifndef SI2157_H
 #define SI2157_H
 
diff --git a/drivers/media/tuners/si2157_priv.h 
b/drivers/media/tuners/si2157_priv.h
index 6018851..6cc6c6f 100644
--- a/drivers/media/tuners/si2157_priv.h
+++ b/drivers/media/tuners/si2157_priv.h
@@ -1,3 +1,19 @@
+/*
+ * Silicon Labs Si2157 silicon tuner driver
+ *
+ * Copyright (C) 2014 Antti Palosaari 
+ *
+ *This program is free software; you can redistribute it and/or modify
+ *it under the terms of the GNU General Public License as published by
+ *the Free Software Foundation; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *This program is distributed in the hope that it will be useful,
+ *but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *GNU General Public License for more details.
+ */
+
 #ifndef SI2157_PRIV_H
 #define SI2157_PRIV_H
 
-- 
1.9.0

--
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 00/10] [2013:025f] PCTV tripleStick (292e)

2014-04-15 Thread Antti Palosaari
http://blog.palosaari.fi/2014/04/naked-hardware-15-pctv-triplestick-292e.html


Antti

Antti Palosaari (10):
  si2157: Silicon Labs Si2157 silicon tuner driver
  si2168: Silicon Labs Si2168 DVB-T/T2/C demod driver
  em28xx: add [2013:025f] PCTV tripleStick (292e)
  si2168: add support for DVB-T2
  si2157: extend frequency range for DVB-C
  si2168: add support for DVB-C (annex A version)
  si2157: add copyright and license
  si2168: add copyright and license
  MAINTAINERS: add si2168 driver
  MAINTAINERS: add si2157 driver

 MAINTAINERS   |  20 +
 drivers/media/dvb-frontends/Kconfig   |   7 +
 drivers/media/dvb-frontends/Makefile  |   1 +
 drivers/media/dvb-frontends/si2168.c  | 763 ++
 drivers/media/dvb-frontends/si2168.h  |  39 ++
 drivers/media/dvb-frontends/si2168_priv.h |  46 ++
 drivers/media/tuners/Kconfig  |   7 +
 drivers/media/tuners/Makefile |   1 +
 drivers/media/tuners/si2157.c | 260 ++
 drivers/media/tuners/si2157.h |  34 ++
 drivers/media/tuners/si2157_priv.h|  37 ++
 drivers/media/usb/em28xx/Kconfig  |   2 +
 drivers/media/usb/em28xx/em28xx-cards.c   |  25 +
 drivers/media/usb/em28xx/em28xx-dvb.c |  73 +++
 drivers/media/usb/em28xx/em28xx.h |   1 +
 15 files changed, 1316 insertions(+)
 create mode 100644 drivers/media/dvb-frontends/si2168.c
 create mode 100644 drivers/media/dvb-frontends/si2168.h
 create mode 100644 drivers/media/dvb-frontends/si2168_priv.h
 create mode 100644 drivers/media/tuners/si2157.c
 create mode 100644 drivers/media/tuners/si2157.h
 create mode 100644 drivers/media/tuners/si2157_priv.h

-- 
1.9.0

--
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


[PATCHv2 4/4] drm: exynos: hdmi: add support for pixel clock limitation

2014-04-15 Thread Tomasz Stanislawski
Adds support for limitation of maximal pixel clock of HDMI
signal. This feature is needed on boards that contains
lines or bridges with frequency limitations.

Signed-off-by: Tomasz Stanislawski 
---
 .../devicetree/bindings/video/exynos_hdmi.txt  |4 
 drivers/gpu/drm/exynos/exynos_hdmi.c   |   12 
 include/media/s5p_hdmi.h   |1 +
 3 files changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt 
b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
index f9187a2..8718f8d 100644
--- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
+++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
@@ -28,6 +28,10 @@ Required properties:
 - ddc: phandle to the hdmi ddc node
 - phy: phandle to the hdmi phy node
 
+Optional properties:
+- max-pixel-clock: used to limit the maximal pixel clock if a board has lines,
+   connectors or bridges not capable of carring higher frequencies
+
 Example:
 
hdmi {
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 2a18f4e..404f1b7 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -195,6 +195,7 @@ struct hdmi_context {
struct hdmi_resources   res;
 
int hpd_gpio;
+   u32 max_pixel_clock;
 
enum hdmi_type  type;
 };
@@ -887,6 +888,9 @@ static int hdmi_mode_valid(struct drm_connector *connector,
if (ret)
return MODE_BAD;
 
+   if (mode->clock * 1000 > hdata->max_pixel_clock)
+   return MODE_BAD;
+
ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
if (ret < 0)
return MODE_BAD;
@@ -2031,6 +2035,8 @@ static struct s5p_hdmi_platform_data 
*drm_hdmi_dt_parse_pdata
return NULL;
}
 
+   of_property_read_u32(np, "max-pixel-clock", &pd->max_pixel_clock);
+
return pd;
 }
 
@@ -2067,6 +2073,11 @@ static int hdmi_probe(struct platform_device *pdev)
if (!pdata)
return -EINVAL;
 
+   if (!pdata->max_pixel_clock) {
+   DRM_INFO("max-pixel-clock is zero, using INF\n");
+   pdata->max_pixel_clock = U32_MAX;
+   }
+
hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), GFP_KERNEL);
if (!hdata)
return -ENOMEM;
@@ -2083,6 +2094,7 @@ static int hdmi_probe(struct platform_device *pdev)
hdata->type = drv_data->type;
 
hdata->hpd_gpio = pdata->hpd_gpio;
+   hdata->max_pixel_clock = pdata->max_pixel_clock;
hdata->dev = dev;
 
ret = hdmi_resources_init(hdata);
diff --git a/include/media/s5p_hdmi.h b/include/media/s5p_hdmi.h
index 181642b..7272d65 100644
--- a/include/media/s5p_hdmi.h
+++ b/include/media/s5p_hdmi.h
@@ -31,6 +31,7 @@ struct s5p_hdmi_platform_data {
int mhl_bus;
struct i2c_board_info *mhl_info;
int hpd_gpio;
+   u32 max_pixel_clock;
 };
 
 #endif /* S5P_HDMI_H */
-- 
1.7.9.5

--
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


[PATCHv2 2/4] drm: exynos: mixer: fix using usleep() in atomic context

2014-04-15 Thread Tomasz Stanislawski
This patch fixes calling usleep_range() after taking reg_slock
using spin_lock_irqsave(). The mdelay() is used instead.
Waiting in atomic context is not the best idea in general.
Hopefully, waiting occurs only when Video Processor fails
to reset correctly.

Signed-off-by: Tomasz Stanislawski 
---
 drivers/gpu/drm/exynos/exynos_mixer.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c 
b/drivers/gpu/drm/exynos/exynos_mixer.c
index ce28881..e3306c8 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -615,7 +615,7 @@ static void vp_win_reset(struct mixer_context *ctx)
/* waiting until VP_SRESET_PROCESSING is 0 */
if (~vp_reg_read(res, VP_SRESET) & VP_SRESET_PROCESSING)
break;
-   usleep_range(1, 12000);
+   mdelay(10);
}
WARN(tries == 0, "failed to reset Video Processor\n");
 }
-- 
1.7.9.5

--
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


[PATCHv2 3/4] drm: exynos: add compatibles for HDMI and Mixer chips and exynos4210 SoC

2014-04-15 Thread Tomasz Stanislawski
This patch add proper compatibles for Mixer and HDMI chip
available on exynos4210 SoCs.

Signed-off-by: Tomasz Stanislawski 
---
 drivers/gpu/drm/exynos/exynos_hdmi.c  |7 +++
 drivers/gpu/drm/exynos/exynos_mixer.c |3 +++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 47c6e85..2a18f4e 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -204,6 +204,10 @@ struct hdmiphy_config {
u8 conf[32];
 };
 
+struct hdmi_driver_data exynos4210_hdmi_driver_data = {
+   .type   = HDMI_TYPE13,
+};
+
 struct hdmi_driver_data exynos4212_hdmi_driver_data = {
.type   = HDMI_TYPE14,
 };
@@ -2032,6 +2036,9 @@ static struct s5p_hdmi_platform_data 
*drm_hdmi_dt_parse_pdata
 
 static struct of_device_id hdmi_match_types[] = {
{
+   .compatible = "samsung,exynos4210-hdmi",
+   .data = &exynos4210_hdmi_driver_data,
+   }, {
.compatible = "samsung,exynos5-hdmi",
.data = &exynos5_hdmi_driver_data,
}, {
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c 
b/drivers/gpu/drm/exynos/exynos_mixer.c
index e3306c8..fd8a9a0 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -1187,6 +1187,9 @@ static struct platform_device_id mixer_driver_types[] = {
 
 static struct of_device_id mixer_match_types[] = {
{
+   .compatible = "samsung,exynos4210-mixer",
+   .data   = &exynos4210_mxr_drv_data,
+   }, {
.compatible = "samsung,exynos5-mixer",
.data   = &exynos5250_mxr_drv_data,
}, {
-- 
1.7.9.5

--
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


[PATCHv2 0/4] drm: exynos: update/fixes to HDMI driver

2014-04-15 Thread Tomasz Stanislawski
Hi everyone,
This patchset adds 4 fixes/updates to EXYNOS DRM driver for
HDMI subsystem.

All comments are welcome.

Regards,
Tomasz Stanislawski

Changelog:

v2:
* fix check with gpio_is_valid()
* use U32_MAX instead of ULONG_MAX to be 64-bit-friendly
* use hdmi_driver_data as hdmi's compatile data

v1:
* initial version

Tomasz Stanislawski (4):
  drm: exynos: hdmi: simplify extracting hpd-gpio from DT
  drm: exynos: mixer: fix using usleep() in atomic context
  drm: exynos: add compatibles for HDMI and Mixer chips and exynos4210
SoC
  drm: exynos: hdmi: add support for pixel clock limitation

 .../devicetree/bindings/video/exynos_hdmi.txt  |4 +++
 drivers/gpu/drm/exynos/exynos_hdmi.c   |   30 ++--
 drivers/gpu/drm/exynos/exynos_mixer.c  |5 +++-
 include/media/s5p_hdmi.h   |1 +
 4 files changed, 31 insertions(+), 9 deletions(-)

-- 
1.7.9.5

--
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


[PATCHv2 1/4] drm: exynos: hdmi: simplify extracting hpd-gpio from DT

2014-04-15 Thread Tomasz Stanislawski
This patch eliminates redundant checks while retrieving HPD gpio from DT during
HDMI's probe().

Signed-off-by: Tomasz Stanislawski 
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |   13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 9a6d652..47c6e85 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2016,23 +2016,18 @@ static struct s5p_hdmi_platform_data 
*drm_hdmi_dt_parse_pdata
 {
struct device_node *np = dev->of_node;
struct s5p_hdmi_platform_data *pd;
-   u32 value;
 
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
if (!pd)
-   goto err_data;
+   return NULL;
 
-   if (!of_find_property(np, "hpd-gpio", &value)) {
+   pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
+   if (!gpio_is_valid(pd->hpd_gpio)) {
DRM_ERROR("no hpd gpio property found\n");
-   goto err_data;
+   return NULL;
}
 
-   pd->hpd_gpio = of_get_named_gpio(np, "hpd-gpio", 0);
-
return pd;
-
-err_data:
-   return NULL;
 }
 
 static struct of_device_id hdmi_match_types[] = {
-- 
1.7.9.5

--
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] Drop support for kernel 2.6.31 in the media_build

2014-04-15 Thread Hans Verkuil
I've been updating the compatibility build for 3.15-rc1 (it should be OK again)
and as usual it is the 2.6.31 kernel that gives me the most trouble due to
changes in device.h.

I would like to drop support for 2.6.31 because of this. Frankly, I have better
things to do with my time :-)

Comments?

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