#media-maint 2018-02-22,Thu

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***ChanServ sets mode: +v mchehab [00:29]
.......................................................................................................................................... (idle for 11h28mn)
hverkuilgood morning/afternoon! [11:57]
sailusHello! [11:58]
hverkuilmchehab: ping [12:02]
pinchartlhello [12:03]
sailusmchehab: Bom dia! [12:06]
hverkuilhmm... [12:09]
sailusBefore mchehab is here, I'd like to notify I wrote a small patch to address videobuf2 build failures.
It's here:
https://patchwork.linuxtv.org/patch/47350/
Feel free to review.
I'll repost that for a wider audience as it involves files outside the media tree.
Once at least someone else is happy with it, that is. :-)
[12:09]
pinchartlsailus: sounds complicated [12:10]
sailusDoes it? [12:10]
pinchartlI don't like having to select VIDEOBUF2_V4L2 explicitly [12:11]
sailusReposting the patch, or the patch itself? [12:11]
pinchartlcan't you make it so that it will be selected if VIDEO_V4L2 ? [12:11]
sailuspinchartl: Yes, I could.
But it'd involve building videobuf2-v4l2 even if it's not needed in case V4L2 is enabled and videobuf2 is built.
But no V4L2 driver uses videobuf2.
That's entirely possible.
Phone call.
[12:11]
pinchartlpossible but very unlikely [12:14]
sailusBack.
Would you prefer that instead?
[12:16]
hverkuilyou could select it if (VIDEO_V4L2 && (VIDEOBUF2_VMALLOC || VIDEOBUF2_DMA_CONTIG || VIDEOBUF2_DMA_SG) [12:16]
sailusI don't object to it, but opted for the current implementation to avoid building videobuf2-v4l2 if it's not needed. [12:16]
hverkuilIn theory though even that can fail if you have DVB-only devices using vb2 and otherwise only radio devices. [12:17]
sailushverkuil: Yes, but it will mean videobuf2-v4l2 may be built even if it's not needed. [12:17]
pinchartlhverkuil: or just if (VIDEO_V4L2 && VIDEOBUF2_CORE) ? [12:17]
sailuspinchartl: That's shorter, yes. [12:17]
hverkuilah, yes. [12:17]
pinchartland yes it will build it unnecessarily if we only have radio devices on the V4L2 side, but I don't think that's a big issue [12:17]
sailusOr other drivers not using videobuf2. But all drivers dealing with buffers should use videobuf2 OTOH.
I'll post v2 with that change.
The patch will be much smaller.
[12:18]
hverkuilsailus: should yes, but that won't happen. [12:19]
sailushverkuil: This gives one more motive to do that. :-) [12:19]
hverkuilI'm OK with this change. [12:20]
sailusAnything else? :-)
I'll have another phone call in 8 minutes.
[12:22]
pinchartlnope [12:22]
hverkuilI'm really waiting for mchehab since I need to know when he's going to merge pull requests. [12:23]
sailusI'd be interested in that as well.
pinchartl, hverkuil: Feel free to review "[PATCH 0/5] Move finding the best match for size to V4L2 common" if you have time, too.
It's making selection of discrete modes in the framework actually useful for drivers.
[12:23]
pinchartlsailus: I'll check that after reviewing the request API :-) [12:25]
sailuspinchartl: Bah. These are trivial patches. A bunch of sensor drivers have been posted that could already use them. [12:25]
syoungHello
Sorry for being late
[12:28]
hverkuilsyoung: we're still waiting for Mauro. I guess he forgot or is traveling.
I haven't heard from him in a while.
[12:30]
syounghverkuil: ok, thanks [12:36]
..... (idle for 23mn)
mchehabgah, sorry, daylight saving time shifted this week
my alarm ringed at the wrong time
mchehab is reading the backlogs
[12:59]
hverkuilOK, I'm still here. [13:01]
mchehabdone
yeah, a patch making VB2 selection independent from V4L2 seems required
I partially agree with pinchartl: having to add a select on every driver doesn't sound good
[13:04]
hverkuil(back in a minute, have to grab some coffee) [13:07]
mchehabbut building it when no drivers need seems a bad idea [13:07]
sailusmchehab: I'm fine changing the patch. After all the situations where videobuf2-v4l2 is built when it's not really needed are rare. [13:07]
mchehabmaybe some depends on magic could be used, just like we did in the past for tuners - it is complex, but doesn't give much headaches
sailus: well, for drivers that depends on VB 1, it is not needed
[13:07]
sailusAlso the videodev module contains a lot of stuff that might not be needed by a lot of drivers.
No-one complains about that.
[13:08]
mchehabnor for radio devices [13:08]
sailusYes. But how common is it that only drivers for radio devices are built? [13:09]
hverkuilback [13:09]
mchehabsailus: we have no idea :-) [13:09]
sailusAnd if it's built as a module, it won't be loaded automatically anyway. [13:09]
mchehabthe thing is that it makes kernel larger for embedded environments where this is not needed [13:10]
sailusWhich is a lot better than v4l2-clk which has always been part of videodev.
v4l2-clk is needed almost nowhere these days.
[13:10]
pinchartlmchehab: we'll only build the module unnecessarily if the kernel is build with DVB drivers that need VB2 + V4L2 radio only. that's an unlikely configuration [13:10]
sailusWhereas videobuf2-v4l2 is very, very commonly needed. [13:10]
mchehabyes, I know that there aren't many cases
well, come up with a newer proposal. I'll think about that too
[13:11]
sailusA new proposal?
There are two options here essentially.
[13:11]
mchehabwith regards to pull requests, I should be handling today and tomorrow
I mean, a v2
[13:12]
sailusMy original patch adds a Kconfig option.
Right.
I'll send v2, without requiring a lot of Kconfig changes.
It'll be just few lines actually.
mchehab: I'm looking forward to that. :-)
[13:12]
mchehabI like the idea of a VB2_V4L2 kconfig var
maybe if you add a:
depends on <something>
[13:13]
hverkuilmchehab: OK, I have four pull requests (two have been posted, two are pending), but they have dependencies. [13:13]
mchehabdefault y
would do the righ thing
something like:
[13:13]
sailusThat might cause a lot of make oldconfig churn. I prefer solutions that are quiet. :-) [13:14]
hverkuilThese pull requests should go first: "[GIT PULL v2 FOR v4.17] media: replace g/s_parm by g/s_frame_interval" and "[GIT PULL FOR v4.17] Add tda1997x.c" [13:15]
mchehabconfig VIDEOBUF2_V4L2
tristate
select VIDEOBUF2_CORE
depends on VIDEO_V4L2
depends on VIDEOBUF2_DVB | VIDEOBUF2_DMA_SG | VIDEOBUF2_VMALLOC
default y
[13:15]
sailusAnd drivers would still need to depend on that option to be buildable.
Plus you'd have one more Kconfig option visible to the user.
So in that respect I see no benefits in this solution compared to either of the two discussed previously.
If I understand the above right, that is.
[13:15]
hverkuilIf they can be merged today, then I can rebase the other two on top (media compliance cleanups and the new sh ceu driver) and post the pull request for those. [13:16]
mchehabsailus: with the sabove, drivers don't need to depend on it
s/sabove/above/
[13:16]
sailusBut if you disable that, then there will be a build failure. [13:16]
mchehaband this is not visible to the user [13:16]
sailusI don't think that's acceptable. [13:16]
mchehabdisable? how? [13:16]
sailusAh. [13:16]
mchehabit is not visible [13:17]
sailusRight. [13:17]
mchehabhverkuil: I'll handle those two pull requests today [13:17]
sailusIsn't that achieving the same thing than building videobuf2-v4l2 if both videobuf2 and V4L2 are enabled? [13:17]
mchehabsailus: I didn't actually looked at the building issue [13:18]
sailusThe drivers don't depend on VIDEOBUF2_CORE now either.
:-)
[13:18]
mchehabyou would need to do some work, in order to adjust the exact dependency chain there :-) [13:18]
sailusI'll post v2 and let's proceed from that. [13:19]
mchehabOK [13:19]
sailuss/that/there/ [13:19]
hverkuilYou need the 'depends on VIDEOBUF2_DMA_CONTIG || ...' to get the 'y' vs 'm' right for the videobuf2-v4l2 module. [13:19]
mchehabyes
but if done right, no changes elsewhere would be needed
[13:20]
hverkuil(it was a nightmare getting that right for CEC :-) ) [13:21]
sailusmchehab: Please send a patch. :-) [13:21]
mchehabsailus: basically, it need to depends on every VIDEOBUF2_* that drivers select
maybe depends on VB2 core would be enough
[13:22]
hverkuilmchehab: I think a depends on vb2 core is enough given the sequence in videobuf2/Kconfig [13:24]
mchehabselect VIDEOBUF2_CORE
select VIDEOBUF2_DMA_CONTIG
select VIDEOBUF2_DMA_SG
select VIDEOBUF2_MEMOPS
select VIDEOBUF2_VMALLOC
btw, while here I would also change the logic at VIDEOBUF2_CORE
to use the same approach
and remove explicit select for it
[13:25]
sailusActually radio devices don't depend on VIDEO_V4L2, but VIDEO_DEV.
So if videobuf2-v4l2 is built when both VIDEO_V4L2 and VIDEOBUF2_CORE are enabled, there are only remote chances of building it without needing it.
[13:31]
hverkuilYeah, VIDEO_DEV vs VIDEO_V4L2 always confused me. [13:32]
mchehabsailus, something like: https://pastebin.com/2FpaVqa5
radio devices don't use VB2
ah, you just said the same thing :-)
I guess the patch snippet I posted should do the trick and simplify the Kconfig logic
[13:32]
sailusIt seems less obvious to me than the current state. [13:35]
mchehabsailus: it can be less obvious, but using depends on works better than using select [13:36]
sailusWhat's wrong with using select? [13:37]
mchehabit doesn't properly evaluate dependencies
the less we use it, the better
for example:
config VIDEOBUF2_DMA_SG
tristate
depends on HAS_DMA
the depends on here does nothing
all drivers that use this symbol *need* to have a "depends on HAS_DMA" themselves
[13:37]
sailusHmm.
Let me see if I can get somewhere with this approach.
[13:40]
mchehabok [13:42]
.................. (idle for 1h27mn)
sailusI looked into this a bit --- I don't think there's a way to improve the videobuf2 Kconfig options work by converting select to depends on.
Unless you add more options visible to drivers, that is.
It'd be like that a driver depends on something such as HAS_VIDEOBUF2_DMA_SG, and then would select VIDEOBUF2_DMA_SG.
I'm certainly open to doing that, though, if people think it's really worth it.
[15:09]
***snawrocki has quit IRC (Quit: Leaving) [15:19]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)