All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: backports@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 08/12] backports: disable DVB_RTL2832 and DVB_USB_RTL28XXU
Date: Tue, 08 Apr 2014 18:56:45 +0300	[thread overview]
Message-ID: <53441C3D.8060509@iki.fi> (raw)
In-Reply-To: <20140408094352.202fabb3@samsung.com>

Moikka!

On 08.04.2014 15:43, Mauro Carvalho Chehab wrote:
> Em Mon, 07 Apr 2014 20:32:19 -0700
> "Luis R. Rodriguez" <mcgrof@do-not-panic.com> escreveu:
>
>> Commit bcf43393 as of linux-next next-20140320 added this Makefile
>> header extension:
>>
>> ccflags-y += -I$(srctree)/drivers/staging/media/rtl2832u_sdr
>>
>> This ends up calling a staging exported symbol rtl2832_sdr_attach().
>> Let's not pollute driver code with staging code or dependencies.
>>
>> Folks, can this be cleaned up? This sets a precedent for doing more
>> of this, and this can get hairy. Its also not fair for folks who
>> don't want to carry over any staging code. This forces them to, and
>> its not just a header file, its a full exported symbol. What about
>> synchronization with differen trees? Was this addressed with Greg?
>
> The SDR code is at staging not because it has low quality, but because
> we're still testing the SDR API before setting it into a stone.
>
> The rtl2832u can operate in two modes: DVB-T and SDR. On DVB-T,
> the hardware collects samples of a tuned channel and decodes it
> with a hardware decoder, sending to userspace a MPEG TS stream.
>
> On SDR, the hardware decoder is disabled, and the raw samples
> are sent to userspace.
>
> Yet, I agree that, if the SDR code is disabled, the rtl2832_sdr_attach()
> should not be called. However, the code seems to be doing it
> already. Take a look at drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.h:
>
> #if IS_ENABLED(CONFIG_DVB_RTL2832_SDR)
> extern struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
> 	struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
> 	struct v4l2_subdev *sd);
> #else
> static inline struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
> 	struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
> 	struct v4l2_subdev *sd)
> {
> 	dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
> 	return NULL;
> }
> #endif
>
> Antti, please correct if I'm wrong, but the rtl2832u_tuner_attach()
> code seems to not expect that the attach code succeeds. So, the only thing
> that will happen DVB_RTL2832_SDR is disabled is that warning saying that
> SDR is disabled will be sent to dmesg.

That is what happen and IIRC I tested it too once.

> So, I don't see why to disable the entire driver due to that. Instead,
> Just revert changeset bcf43393579e at the backport trees should be enough,
> if don't want to backport the SDR driver.

I will look if I can make mainline rtl28xxu driver compile without a 
staging directory (as that new SDR extension is on staging directory 
currently).


regards
Antti

>
> Regards,
> Mauro
>
>> commit bcf43393579e3d4069e75a9200a87703185bcf11
>> Author: Antti Palosaari <crope@iki.fi>
>> Date:   Tue Sep 10 00:13:57 2013 -0300
>>
>>      [media] rtl28xxu: attach SDR extension module
>>
>>      With that extension module it supports SDR.
>>
>>      Signed-off-by: Antti Palosaari <crope@iki.fi>
>>      Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
>>
>> Cc: Antti Palosaari <crope@iki.fi>
>> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
>> ---
>>   dependencies | 9 +++++++--
>>   1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/dependencies b/dependencies
>> index 6193ed1..b85268d 100644
>> --- a/dependencies
>> +++ b/dependencies
>> @@ -185,8 +185,13 @@ VIDEO_RENESAS_VSP1 3.6
>>   # This was added as of 3.7. Although we should be able to only enable
>>   # this for 3.7 DVB_USB_RTL28XXU ends up selecting DVB_RTL2832 and
>>   # that seems to currently require pegging both.
>> -DVB_RTL2832 3.7
>> -DVB_USB_RTL28XXU 3.7
>> +#
>> +# DVB_USB_RTL28XXU has a nasty ccflag usage thoug that includes staging
>> +# headers introduced via commit bcf43393:
>> +# ccflags-y += -I$(srctree)/drivers/staging/media/rtl2832u_sdr
>> +# Let's not support this nastiness.
>> +DVB_RTL2832 DISABLE
>> +DVB_USB_RTL28XXU DISABLE
>>
>>   # struct gpio_chip only got the required members in 2.6.28
>>   BCMA_DRIVER_GPIO 2.6.28
>
>


-- 
http://palosaari.fi/

  reply	other threads:[~2014-04-08 15:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08  3:32 [PATCH 00/12] backports: cath up to next-20140320 Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 01/12] backports: backport u64_stats_fetch_begin_irq() and u64_stats_fetch_retry_irq() Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 02/12] backports: backport APIs for manipulating skb page fragments Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 03/12] backports: backport skb_set_hash() Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 04/12] backports: complete backport of frag size accessors Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 05/12] backports: complete backport of translation of MMD EEE registers Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 06/12] backports: add GRO_* enums, and its new gro_result_t typedef Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 07/12] backports: bump kernel requirements for drivers that use s2mps14.h Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 08/12] backports: disable DVB_RTL2832 and DVB_USB_RTL28XXU Luis R. Rodriguez
2014-04-08 12:43   ` Mauro Carvalho Chehab
2014-04-08 15:56     ` Antti Palosaari [this message]
2014-04-08 16:20       ` Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 09/12] backports: bump NFC_TRF7970A requirements to 3.5 Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 10/12] backports: make IEEE802154_AT86RF230 depend require 3.3 Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 11/12] backports: add kernel base requirement of 3.5 to IR_IMG Luis R. Rodriguez
2014-04-08  3:32 ` [PATCH 12/12] backports: refresh patches for next-20140320 Luis R. Rodriguez
2014-04-09  1:20 ` [PATCH 00/12] backports: cath up to next-20140320 Luis R. Rodriguez
2014-04-09  1:26   ` Luis R. Rodriguez
2014-04-09 11:54     ` Johannes Berg
2014-04-09 18:21       ` Luis R. Rodriguez

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=53441C3D.8060509@iki.fi \
    --to=crope@iki.fi \
    --cc=backports@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=m.chehab@samsung.com \
    --cc=mcgrof@do-not-panic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.