linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Scheller <d.scheller.oss@gmail.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>, rjkm@metzlerbros.de
Cc: linux-media@vger.kernel.org, mchehab@kernel.org,
	r.scobie@clear.net.nz, jasmin@anw.at, d_spingler@freenet.de,
	Manfred.Knick@t-online.de
Subject: Re: [PATCH v2 03/14] [media] ddbridge: bump ddbridge code to version 0.9.29
Date: Wed, 9 Aug 2017 19:01:52 +0200	[thread overview]
Message-ID: <20170809190152.3c94adaa@macbox> (raw)
In-Reply-To: <20170809134731.60f97705@vento.lan>

On Wed, 9 Aug 2017 13:47:31 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> wrote:

> Em Sat, 29 Jul 2017 13:28:37 +0200
> Daniel Scheller <d.scheller.oss@gmail.com> escreveu:
> 
> > From: Daniel Scheller <d.scheller@gmx.net>
> > 
> > This huge patch bumps the ddbridge driver to version 0.9.29.
> > Compared to the vendor driver package, DD OctoNET including GTL
> > link support, and all DVB-C Modulator card support has been removed
> > since this requires large changes to the underlying DVB core API,
> > which should eventually be done separately, and, after that, the
> > functionality/device support can be added back rather easy.
> > 
> > While the diff is rather large, the bump is mostly a big refactor
> > of all data structures. Yet, the MSI support (message signaled
> > interrupts) is greatly improved, also all currently available CI
> > single/duo bridge cards are fully supported.
> > 
> > More changes compared to the upstream driver:
> >  - the DDB_USE_WORKER flag/define was removed, kernel worker
> > functionality will be used.
> >  - coding style is properly fixed (zero complaints from checkpatch)
> >  - all (not much though) CamelCase has been fixed to kernel_case
> > 
> > Great care has been taken to keep all previous changes and fixes
> > (e.g. kernel logging via dev_*(), pointer annotations and such)
> > intact.
> > 
> > Permission to reuse and mainline the driver code was formally
> > granted by Ralph Metzler <rjkm@metzlerbros.de>.
> > 
> > Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
> > Tested-by: Richard Scobie <r.scobie@clear.net.nz>
> > Tested-by: Jasmin Jessich <jasmin@anw.at>
> > Tested-by: Dietmar Spingler <d_spingler@freenet.de>
> > Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
> > ---
> >  drivers/media/pci/ddbridge/ddbridge-core.c | 3496
> > ++++++++++++++++++++++------
> > drivers/media/pci/ddbridge/ddbridge-i2c.c  |  217 +-
> > drivers/media/pci/ddbridge/ddbridge-i2c.h  |   41 +-
> > drivers/media/pci/ddbridge/ddbridge-main.c |  490 ++--
> > drivers/media/pci/ddbridge/ddbridge-regs.h |  138 +-
> > drivers/media/pci/ddbridge/ddbridge.h      |  366 ++- 6 files
> > changed, 3613 insertions(+), 1135 deletions(-)
> > 
> > diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c
> > b/drivers/media/pci/ddbridge/ddbridge-core.c index
> > 7e164a370273..5045ad6c36fe 100644 ---
> > a/drivers/media/pci/ddbridge/ddbridge-core.c +++
> > b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -1,7 +1,10 @@
> > [...]snip[...]
> > +struct ddb_i2c_msg {
> > +	__u8   bus;
> > +	__u8   adr;
> > +	__u8  *hdr;
> > +	__u32  hlen;
> > +	__u8  *msg;
> > +	__u32  mlen;
> >  };
> >  
> > -#define IOCTL_DDB_FLASHIO  _IOWR(DDB_MAGIC, 0x00, struct
> > ddb_flashio) +#define IOCTL_DDB_FLASHIO    _IOWR(DDB_MAGIC, 0x00,
> > struct ddb_flashio) +#define IOCTL_DDB_GPIO_IN    _IOWR(DDB_MAGIC,
> > 0x01, struct ddb_gpio) +#define IOCTL_DDB_GPIO_OUT
> > _IOWR(DDB_MAGIC, 0x02, struct ddb_gpio) +#define
> > IOCTL_DDB_ID         _IOR(DDB_MAGIC, 0x03, struct ddb_id) +#define
> > IOCTL_DDB_READ_REG   _IOWR(DDB_MAGIC, 0x04, struct ddb_reg)
> > +#define IOCTL_DDB_WRITE_REG  _IOW(DDB_MAGIC, 0x05, struct ddb_reg)
> > +#define IOCTL_DDB_READ_MEM   _IOWR(DDB_MAGIC, 0x06, struct
> > ddb_mem) +#define IOCTL_DDB_WRITE_MEM  _IOR(DDB_MAGIC, 0x07, struct
> > ddb_mem) +#define IOCTL_DDB_READ_MDIO  _IOWR(DDB_MAGIC, 0x08,
> > struct ddb_mdio) +#define IOCTL_DDB_WRITE_MDIO _IOR(DDB_MAGIC,
> > 0x09, struct ddb_mdio) +#define IOCTL_DDB_READ_I2C
> > _IOWR(DDB_MAGIC, 0x0a, struct ddb_i2c_msg) +#define
> > IOCTL_DDB_WRITE_I2C  _IOR(DDB_MAGIC, 0x0b, struct ddb_i2c_msg)  
> 
> That part of the driver is not OK. Those are part of some
> proprietary API. We need to discuss carefully all APIs that we're
> willing to introduce, to be sure that, whatever is there won't
> conflict with an existing API on Linux, and if it makes sense.

Uhh. Hm, well, these are just some IOCTLs solely used
on /dev/ddbridge/cardX devnodes to ie. be able to flash updated FPGA
code onto the cards using the dddvb userspace apps (and other things),
nothing thats intended for global use throughout the rest of the
kernel. While we can strip this from this patchset (together with the
ioctl handler), I really "prefer" not to do so since this will cause
breakage for users wanting to perform such updates.

Ping Ralph, really need help on this one. Can "some" of these go or is
DDB_FLASHIO enough for all tuner cards?

> Even if we accept it, those new APIs should be well documented.

What and where should that go? As mentioned, this is stuff solely used
for DD card control...

> Btw, I noticed that even the existing driver has already one such
> API, with is currently undocumented (IOCTL_DDB_FLASHIO). What's its
> purpose?

FPGA flashing as described above.

> PS.: As patches 1 and 2 are just code rearrangements, I'm applying
> them.

Thanks.

Best regards,
Daniel Scheller
-- 
https://github.com/herrnst

  reply	other threads:[~2017-08-09 17:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29 11:28 [PATCH v2 00/14] ddbridge: bump to ddbridge-0.9.29 Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 01/14] [media] ddbridge: move/reorder functions Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 02/14] [media] ddbridge: split code into multiple files Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 03/14] [media] ddbridge: bump ddbridge code to version 0.9.29 Daniel Scheller
2017-08-09 16:47   ` Mauro Carvalho Chehab
2017-08-09 17:01     ` Daniel Scheller [this message]
2017-07-29 11:28 ` [PATCH v2 04/14] [media] ddbridge: split I/O related functions off from ddbridge.h Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 05/14] [media] ddbridge: split off IRQ handling Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 06/14] [media] ddbridge: split off hardware definitions and mappings Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 07/14] [media] ddbridge: check pointers before dereferencing Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 08/14] [media] ddbridge: only register frontends in fe2 if fe is not NULL Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 09/14] [media] ddbridge: fix possible buffer overflow in ddb_ports_init() Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 10/14] [media] ddbridge: remove unreachable code Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 11/14] [media] ddbridge: fix impossible condition warning Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 12/14] [media] ddbridge: fix dereference before check Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 13/14] [media] ddbridge: Kconfig option to control the MSI modparam default Daniel Scheller
2017-07-29 11:28 ` [PATCH v2 14/14] [media] MAINTAINERS: add entry for ddbridge Daniel Scheller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170809190152.3c94adaa@macbox \
    --to=d.scheller.oss@gmail.com \
    --cc=Manfred.Knick@t-online.de \
    --cc=d_spingler@freenet.de \
    --cc=jasmin@anw.at \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=r.scobie@clear.net.nz \
    --cc=rjkm@metzlerbros.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).