public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, video4linux-list@redhat.com,
	Markus Rechberger <mrechberger@gmail.com>
Subject: Re: [PATCH 1/1] V4L: stk11xx, add a new webcam driver
Date: Fri, 01 Jun 2007 20:00:22 -0300	[thread overview]
Message-ID: <1180738822.3904.35.camel@localhost> (raw)
In-Reply-To: <465DD40B.10409@gmail.com>


> >> + * Copyright (C) Nicolas VIVIEN
> > 
> > It would be interesting to have Nicolas SOB as well, if possible.
> 
> I don't think he ever knows about this version of the driver. I got his GPL
> driver, cleaned up -- coding style, v4l1 and v4l2 ioctl conversion to v4l2
> functions, some bug fixes and so on... If you still want him to sign this
> of, I'll try my best to catch him but can't guarantee any results.

It would be nice. I can accept it without his ack, but it would be
better to have it, if possible.
> 
> >> +
> >> +#ifndef CONFIG_STK11XX_DEBUG_STREAM
> >> +#define CONFIG_STK11XX_DEBUG_STREAM	0
> >> +#endif
> >> +
> >> +#if CONFIG_STK11XX_DEBUG_STREAM
> > 
> > I would instead use:
> > #ifdef CONFIG_STK11XX_DEBUG_STREAM
> 
> Hmm, no, I would rather get rid of CONFIG_ thing, it may make things
> unclear, beacuse there is (will be) no option in Kconfig for this, because
> this is the most verbose option for the driver mainly used for algorithms
> debugging.
Seems ok to me.

> > We don't do format conversions in kernel. Instead, you should return a
> > proper Bayer Fourcc format (like V4L2_PIX_FMT_SBGGR8).
> 
> 
> Ok, there is a debate about this, I will do the changes after some decision
> will be made.

As you wish.

> > Please use instead the load_firmware routines. It is not a good idea to
> > have firmware inside the kernel. Also, this might rise some legal issues
> > due to licensing models.
> 
> Markus wrote:
> <cite>
> Jiri, are you allowed to include that microcode, did you get any
> information about this from the manufacturer which could allow the
> inclusion?
> The sequences are rather small not putting it into extra firmware
> files would make life much easier for some users, on the other side if
> it raises legal issues Mauro's right with loading it from a file
> </cite>
> 
> This seems to be a reverse engineered driver, I think, all those values are
> intercepted, so there are no licensing issues.

Are those a code, or just another internal driver configuration (for
example, maybe some register initialization inside the sensors)? We
should take care to avoid adding material here that can be later
complained.
> > 
> > Instead of using all those write, you should consider creating a table
> > of values and use something like:
> > 	stk11xx_write_regs(dev, table1);
> 
> There is a problem with this approach. There are reads every 3-5 writes and
> this can grow into many small tables.

Maybe you can do this then just for the bigger tables.

> > You may also consider writing a separate c file for stk1135. Having a
> > large .c file is not very nice. The better is to split the code into a
> > few parts.
> 
> I don't like many files for one driver and finding little pieces of code
> in each file separately -- 1125 + 1235 will be small pieces. Not considering
> the static functions and warning about unused code. But it's up to you, it's
> your subtree, make a decision.

Your driver have about 3600 lines. We target to keep newer files with a
maximum of about 1000 lines on the same file (unfortunately, some
drivers are bigger than that), separating the driver into logical
pieces. I think it would be interesting to split it into two or tree
files.

> 
> >> +static void *stk11xx_rvmalloc(unsigned long size)
> > 
> > Another rvmalloc implementation? You should consider using the one
> > already at kernel.
> 
> What's the name, I can't find it?

There are some rvmalloc on cpia, cpia2, em28xx, ... 

What the current drivers are doing is to replace it to vmalloc_32:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
                if ((buff = rvmalloc(dev->num_frames * imagesize))) {
#else
                if ((buff = vmalloc_32(dev->num_frames * imagesize))) {
#endif

> 
> The rest of comments has been applied, thanks,

You're welcome.

-- 
Cheers,
Mauro


  reply	other threads:[~2007-06-01 23:01 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 14:01 [PATCH 1/1] V4L: stk11xx, add a new webcam driver Jiri Slaby
2007-05-24 14:24 ` Markus Rechberger
2007-05-24 15:07   ` Jiri Slaby
2007-05-28 15:21     ` Markus Rechberger
2007-05-24 23:07   ` Jiri Slaby
2007-05-25  8:22     ` Stefan Richter
2007-05-25  8:30       ` Jiri Slaby
2007-05-24 17:38 ` Diego Calleja
2007-05-24 18:01   ` Ismail Dönmez
2007-05-25  8:19     ` Stefan Richter
     [not found]       ` <4af2d03a0705250127j3d05cd6bkb114cad0e6ecb449@mail.gmail.com>
2007-05-25  9:50         ` Stefan Richter
2007-05-28 15:00 ` Mauro Carvalho Chehab
2007-05-28 15:14   ` Markus Rechberger
2007-05-28 16:28     ` Luca Risolia
2007-05-28 16:42       ` Markus Rechberger
2007-05-28 18:57     ` Mauro Carvalho Chehab
2007-05-28 19:17       ` Markus Rechberger
2007-05-28 20:11         ` Mauro Carvalho Chehab
2007-05-28 21:30           ` Thierry Merle
2007-05-29  5:32             ` Thierry Merle
2007-05-29 14:25               ` Mauro Carvalho Chehab
2007-05-29 19:04                 ` Thierry Merle
2007-05-29 19:31                   ` Mauro Carvalho Chehab
2007-05-31 20:43                     ` Thierry Merle
2007-06-01 23:10                       ` Mauro Carvalho Chehab
2007-06-02  9:00                         ` Thierry Merle
2007-06-04 18:55                           ` Mauro Carvalho Chehab
2007-06-15 21:08                             ` Jiri Slaby
2007-06-16 11:46                               ` Thierry Merle
2007-06-16 12:07                                 ` Jiri Slaby
     [not found]                               ` <200706190941.47459.oliver@neukum.org>
2007-06-19  7:44                                 ` Jiri Slaby
2007-05-30 19:44   ` Jiri Slaby
2007-06-01 23:00     ` Mauro Carvalho Chehab [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-26 14:09 Jiri Slaby
2007-08-27 22:40 ` Andrew Morton
2007-08-28  5:33   ` Jiri Slaby
2007-08-28  5:36     ` Andrew Morton
2007-08-28  5:41       ` Jiri Slaby
2007-08-28  6:35 ` Alexander E. Patrakov
2007-11-06  7:40 ` Andrew Morton
2007-11-06 10:48   ` Jiri Slaby
2007-11-07 17:57     ` Mauro Carvalho Chehab

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=1180738822.3904.35.camel@localhost \
    --to=mchehab@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrechberger@gmail.com \
    --cc=video4linux-list@redhat.com \
    /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