#v4l 2017-04-10,Mon

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

WhoWhatWhen
***macmaN_ has quit IRC (Read error: Connection reset by peer) [08:45]
...... (idle for 25mn)
tfigapinchartl: Hey :) [09:10]
.... (idle for 18mn)
pinchartltfiga: hi ! [09:28]
tfigapinchartl: How are you doing? Very busy I guess ;) [09:28]
pinchartlI've more or less recovered from my holidays
people have a tendency to keep me busy, yes
and I have a feeling that you won't be an exception ;-)
regarding requests, I've resumed working on them today
(and I've already made a pause for lunch, but will continue in the afternoon ;-))
[09:33]
tfigapinchartl: I think I might be the complete opposite ;)
I wouldn't mind offloading this work
[09:39]
pinchartl:-) [09:39]
tfigaand we actually have one more person that could do this [09:39]
pinchartlI was actually thinking about that [09:39]
tfigaand, by the way, I think you even know this person [09:39]
pinchartlI think I do :-)
information spread very very fast, I've heard about it even before that person told me they joined Google :-)
I'd like to post my work in progress, then we should discuss how to collaborate
if that's fine with you
[09:40]
hverkuilI probably should be involved in that discussion? Since the main missing piece AFAIK is the support for controls in the request API, right? [09:42]
pinchartlhverkuil: sure, I'd like you to be involved [09:43]
tfigapinchartl: yeah, that's what I had in my mind [09:43]
pinchartltfiga: while you're here, I was wondering whether your planned to attend LinuxCon Japan this year
if you are, we should have dinner
and you're not, we should still have dinner :-)
with Pawel and this new person you've been talking about, if they're available
(by the way is that official already, or should his name be kept secret until an official announcement ?)
[09:44]
tfigapinchartl: I'm still wondering
it looks like the conference has become too much container-oriented
actually it's not even LinuxCon
[09:51]
pinchartlgnurou: hi. what a surprise :-)
yes, it's OSS now
[09:51]
gnuroupinchartl: is it? :) [09:51]
pinchartlI'm only attending it as an excuse to go to Japan ;-) [09:51]
tfigaanyone here going to attend it? hverkuil, mchehab?
sailus? :)
[09:51]
hverkuiltfiga: no, I stopped attending LinuxCon/OSS/whatever conferences altogether. It stopped being interesting several years ago. [09:52]
pinchartlsailus: I think you should attend OSS Japan :-) [09:54]
hverkuilELC(E) are the only conferences I go to (and Kernel Recipes if I can present). [09:54]
gnurouanyone attending Linuxcon Japan gets a chance to see Marex
's amazing performance
I am not telling more - let the hype build
[09:55]
larscIs he going to dance?
dressed up as tux?
while juggling a bunch of boards?
[09:56]
snawrockioh, it's becoming interesting :) [09:57]
pinchartlgnurou: you're good :-) [09:58]
gnuroube quick! I'm not sure how many places are remaining [09:59]
tfigaoh, snawrocki, how are you doing? :) [09:59]
snawrockitfiga: hi, it's Monday, let's leave difficult questions for tomorrow ;) [10:06]
tfigasnawrocki: :) [10:08]
snawrockitfiga: I don't think I'm going to OSS Japan but perhaps you're planning a trip to PL or Europe in near future? :) [10:10]
tfigasnawrocki: yeah, I might be comming some time around summer [10:10]
........... (idle for 51mn)
pinchartlmchehab: patchwork notified me that you've accepted the uvcvideo pull request
I'm not holding my breath for the VSP one :-)
s/not/now/
[11:01]
...... (idle for 27mn)
hverkuilmchehab: posted "[GIT PULL FOR v4.12] ov2640: move out of soc-camera (rebased)" for the remainder of the ov2640 patches. [11:29]
pinchartlhverkuil: don't distract Mauro from my pull request :-D [11:31]
........ (idle for 36mn)
mchehabpinchartl: partially merged VSP series
but I think we need an extra flag for controls that modify the buffer layout
sent you an email about that
bbiab
[12:07]
............ (idle for 55mn)
sailushverkuil: Ping? [13:05]
hverkuilsailus: pong [13:13]
sailushverkuil: How are you doing? [13:16]
hverkuilgood, looking forward to Easter vacation :-)
and you?
[13:16]
sailusI'm doing fine.
Is it the Good Friday and the second Easter day in Norway as well?
[13:17]
hverkuilYes, and Thursday too. And the week after I've taken off as well. [13:18]
sailusOh, that's generous indeed. :-) [13:18]
hverkuilMost take this week off, so it is very quiet at work. [13:18]
sailusThat helps concentration, too.
I'd like to ask a little bit of your help actually.
[13:18]
hverkuilsure [13:19]
sailusI'm replacing the V4L2 OF framework by a more generic V4L2 fwnode framework that also supports ACPI.
That patchset also converts existing drivers using V4L2 OF framework to V4L2 fwnode framework and removes the V4L2 fwnode framework.
I have tested Nokia N9. Albeit the changes are mostly mechanical and no-brainers, it'd be good to have some additional testing coverage.
Then I remembered that you had just converted atmel-isi to OF.
Would you happen to be able to test the hardware with some new patches? :-)
They're here:
https://git.linuxtv.org/sailus/media_tree.git/log/?h=v4l2-acpi-merge
[13:19]
hverkuilNext week. One disadvantage of going back and forth between the Netherlands and Norway is that the hardware is always in the wrong country :-) [13:22]
sailusAck. [13:22]
hverkuilI'm going back to the Netherlands Wednesday next week, so I can test on Thursday. [13:22]
sailusThat'd be great! [13:23]
hverkuilI've made a reminder for myself. [13:23]
sailuspinchartl has reviewed them and I've addressed his comments, plus converted atmel-isi which you moved to use V4L2 OF framework. [13:23]
pinchartlhverkuil: what do you think of Mauro's proposal to add a V4L2_CTRL_FLAG_MODIFY_BUF_LAYOUT control flag ?
sailus: ^^
mchehab: if I fix that, can we get the rest of the series merged this week ?
[13:25]
sailushverkuil: Thank you!
pinchartl: What's the subject on linux-media?
[13:26]
hverkuilpinchartl: I think it is a good idea. I'm not sure about the name of the flag, though.
MODIFY_FORMAT might be better.
MODIFIES_FORMAT?
[13:28]
mchehabpinchartl: provided that the remaining patches won't have other surprises, I guess so ;) [13:30]
pinchartlsailus: "Re: [PATCH v2.3] v4l: Clearly document interactions between formats, controls and buffers" [13:31]
hverkuilV4L2_CTRL_FLAG_MODIFIES_FORMAT works well for both video and v4l-subdev devices. [13:31]
pinchartlmchehab: could you already have a look at the remaining patches ? if you review one patch per pull request it will take a looooooong time [13:32]
hverkuilBUF_LAYOUT doesn't really apply to subdevs since those usually only deal with mediabus formats. [13:32]
mchehabpinchartl: I applied the patches before that one already [13:32]
pinchartlhverkuil: I'm fine with that name
mchehab: how about the patches after it ? :-)
[13:32]
mchehabbut I didn't review the remaining patches at the series [13:32]
pinchartlmchehab: let's assume we'll add such a flag
could you check if there are other issues ?
[13:33]
mchehabsorry, got sidetracked by other things...
let's first decide with regards to ctrl name
not sure about MODIFIES_FORMAT...
I don't want to have controls that really modifies the format (doing things like, for example, changing from bayer to RGB)
as we have already an API for that
[13:35]
pinchartlcontrols should not modify the pixel format, I think I agree with that [13:36]
hverkuilYou do: the HFLIP control (not sure about the VFLIP control) can change the Bayer pixelformat [13:37]
pinchartland as far as I know, the proposed documentation patch doesn't imply that a control can modify formats
hverkuil: the sensors drivers I wrote adjust the location of the crop rectangle to keep the format unchanged if I recall correctly
[13:37]
hverkuilMODIFIES_SIZE? [13:38]
pinchartlit's not the size either, it's really the buffer layout [13:38]
sailusI like the idea of having such a control flag. [13:40]
hverkuilMODIFIES_LAYOUT? (this works better with subdevs) [13:40]
sailusV4L2_CTRL_FLAG_BUFFER_LAYOUT? [13:40]
pinchartl(the layout can influence the size though, but it doesn't have to)
V4L2_CTRL_FLAG_DATA_LAYOUT ?
that way we don't mention "buffer", so it's applicable to subdevs
[13:40]
sailuspinchartl: What terms do you use to refer to this in documentation? [13:41]
mchehabworks for me [13:42]
hverkuilthat define doesn't give any indication of the meaning. [13:42]
mchehabthe meaning itself should be written at the docs [13:43]
hverkuilYou need something like MODIFY or MODIFIES in the name, because the fact that the layout is modified is what the flag is about. [13:43]
pinchartlsailus: the documentation uses "buffer layout" as it focusses on video nodes [13:43]
sailuspinchartl: Fair enough. [13:43]
pinchartlV4L2_CTRL_FLAG_MODIFY_DATA_LAYOUT ? [13:43]
mchehabok [13:43]
hverkuilThat or just MODIFY_LAYOUT [13:43]
mchehabalso ok [13:43]
sailushverkuil: We also have the "UPDATE" flag.
The macro name doesn't really tell the full meaning of the flag as such.
[13:44]
mchehabupdate just means that other controls should be read
A hint that changing this control may affect the value of other controls within the same control class. Applications should update their user interface accordingly.
(from the documentation)
[13:44]
pinchartlI'm fine with V4L2_CTRL_FLAG_MODIFY_LAYOUT too. any preference ?
it's a bit shorter, which is always nice
[13:44]
sailusWhat I want to say is that you may need to read the documentation to know what the UPDATE flag signals. [13:45]
mchehabif both work, i would prefer the shorter one [13:45]
hverkuilditto [13:45]
sailusV4L2_CTRL_FLAG_MODIFY_DATA_LAYOUT is getting rather long as well. [13:45]
pinchartllet's go for the shorter one then [13:45]
sailusI also prefer V4L2_CTRL_FLAG_MODIFY_LAYOUT (or V4L2_CTRL_FLAG_DATA_LAYOUT). [13:45]
mchehabok [13:45]
sailusPerhaps leaning towards V4L2_CTRL_FLAG_MODIFY_LAYOUT. [13:46]
pinchartlI'll update the patch to add that control. if preferred I can add the control in a separate patch, but I think it belongs to the documentation patch
as the flag is needed to explain how controls and buffers interact
and a patch adding the flag alone wouldn't tell much about how it works
[13:46]
mchehabpinchartl: if you can write such patch and submit today with the remaining patches on the series, I should very likely be able to review it today [13:46]
pinchartlis that ok ?
mchehab: or would you prefer a separate patch ?
[13:46]
mchehabyes
yes = together with documentation patch
no need for a separate patch
[13:47]
pinchartlok. I'll thus submit a new version of the documentation patch
I'll add support for the flag to the control framework in a separate patch
[13:47]
mchehabok. I guess you'll also need to change the patches on your series adding support for rotation...
and patch other drivers that use rotation and change buffer layout (not sure how many, if any)
such change should be on a separate patch
[13:48]
pinchartlI'll modify the other patches in the series, yes [13:49]
mchehab$ git grep -l CID_ROTATE drivers/media/
drivers/media/platform/exynos-gsc/gsc-core.c
drivers/media/platform/exynos4-is/fimc-core.c
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
drivers/media/platform/omap/omap_vout.c
[13:49]
pinchartlI'll add the flag to existing drivers separately though [13:49]
mchehabyeah, sure [13:49]
pinchartlas they need to be carefully reviewed
and possibly tested
I don't want to block the VSP series on that if possible
[13:49]
mchehabbut we should ensure that this API change will all hapen on a single Kernel version [13:49]
pinchartlis that an issue if documentation is added in v4.12 and drivers updated in v4.13 ? v4.12 won't have any effect on applications
furthermore
the current drivers are broken when it comes to rotation
at least most of them
as they don't prevent rotation from being changed while streaming
but they don't support it either
they either ignore the change, or worse, could crash
so they need to be fixed
and that's definitely not v4.12 material
one more thing
the flag is only about drivers that implement the more complex sequence described in the documentation
drivers that don't support control changes with buffers allocated don't need to be updated
as the documentation for that case just describes the current behaviour
it doesn't change it
so no flag is needed for that case
we already handle it
[13:50]
mchehabok [13:54]
pinchartlso I don't think we need to update existing drivers for v4.12 [13:55]
mchehabit would be good to describe it at the control flags session
when you add the description for it
[13:55]
pinchartlyes, I'll explain that [13:55]
mchehaband likely at the longer explanation chapter you wrote [13:56]
pinchartlhverkuil: ack on the fact that the flag shouldn't be set when the control can't be modified with buffers allocated ?
sailus: same question
[13:56]
mchehabon such case, I guess such contontrol should use flag V4L2_CTRL_FLAG_INACTIVE
while streaming
[13:57]
hverkuilmchehab: actually, it should use FLAG_GRABBED while streaming. Yeah, ugly name, but I didn't come up with it. [13:58]
mchehabyeah, that makes more sense [13:59]
pinchartlthat's an interesting idea, but I think it should be discussed separately from the v4.12 pull request :-) [13:59]
mchehabugly name [13:59]
hverkuilWhy shouldn't it be set? I would say that it is useful regardless of whether or not the driver can handle this without re-allocating buffers? [14:00]
pinchartlhverkuil: which flag ? GRABBED OR MODIFY_LAYOUT ? [14:01]
hverkuilMODIFY_LAYOUT.
MODIFY_LAYOUT indicates that changing the control can modify the layout. GRABBED indicates that you can't change this control while streaming.
[14:01]
mchehabmakes sense... [14:02]
pinchartlhow are applications supposed to handle existing kernels where the flag doesn't exist ? [14:02]
hverkuilDrivers that can handle changing this on the fly wouldn't set the GRABBED flag, existing drivers hopefully always set this flag for ROTATE. [14:02]
pinchartlhverkuil: no driver sets the GRABBED flag for rotate, ever [14:02]
mchehabthat should be fixed
if they don't support changing it in runtione
[14:02]
pinchartlmchehab: yes, but separately :-) [14:03]
mchehab*runtime
this is already a violation of V4L2 API
[14:03]
pinchartlit's an existing issue unrelated to the patch series [14:03]
mchehabif I understood hverkuil's proposal: [14:03]
hverkuilROTATE has never been well tested. HW that supports it is rare and usually hard to find. [14:04]
mchehabif a control like CID_ROTATE would change the buffer, due to the need for PAD, it will rise MODIFY_LAYOUT [14:04]
hverkuilI'm not surprised support is flaky. [14:04]
mchehabif streaming, if the driver doesn't allow rotating while streaming, GRABBED will be rised
with that, at application side, if a control comes with MODIFY_LAYOUT...
and user requests to change the control, if the buffer is not big enough and GRABBED is set, it will stop/requeue buffers/start. Otherwise, it will just send the control
err...
[14:05]
pinchartlI'm not sure to see how MODIFY_LAYOUT will help to be honest. applications need to support controls today, without the MODIFY_LAYOUT flag as it doesn't exist [14:07]
mchehabif the buffer is not big enough and GRABBED is not set, it will stop/requeue buffers/start. Otherwise, it will just send the control [14:07]
pinchartlthe proposed documentation patch clarifies how the interaction between buffers and controls work today
it doesn't modify the API, it documents it
if we add a MODIFY_LAYOUT flag applications will still need to handle controls and buffers interactions without the flag, as existing kernels don't set it
[14:07]
mchehabpinchartl: at the moment we allow a control to modify the buffer size at runtime, we're modifying the API [14:08]
hverkuilMODIFY_LAYOUT gives additional information. It allows applications to detect that this particular control can have side-effects. That's all. [14:08]
pinchartlmchehab: it's not disallowed by the API today. it's completely undocumented
the API doesn't say anything about it
it doesn't tell how to handle the ROTATE control for instance
I'm not extending the API here, I'm documenting it
[14:08]
mchehabpinchartl: the way I see is that CID_ROTATE implementations that would allow format changes currently violates the API [14:09]
pinchartlat least the common case (controls can't be changed with buffers allocated) is not a violation of the existing API
so it has to keep working without any new flag
we can add a flag
but we need to keep the existing API working without that new flag
if we use the flag for the common, existing case
we'll basically tell applications
there's a new flag to gives you information
but it might or might not be set, regardless of whether it should be set
now figure it out
that wouldn't be very helpful :-)
[14:10]
hverkuilpinchartl: that happens all the time. The reality is that applications won't use it until we're 2-3 years further and every distro has this support available. [14:12]
pinchartlhverkuil: still, applications could run on older kernels that don't have this flag
I'm also concerned about the feasibility of implementing such a flag
when happens when V4L2_CID_ROTATE is implemented by the sensor subdev
?
padding is controlled at the DMA engine level
the sensor has no way to know whether the rotate flag will change the buffer size
[14:13]
hverkuilAlso, since this flag would be specific to ROTATE I really don't care since any application written for such things will be custom anyway. [14:14]
pinchartlit can't decide whether to allow changes to the control based on whether buffer are allocated, as it knows nothing about buffers [14:15]
hverkuilIf you rotate by 90 or 270 degrees, wouldn't it always change the layout? I.e. width and height get swapped. The size may be the same, but the layout isn't. [14:16]
pinchartlthe layout is always changed
but the size might not be
so whether to allow S_CTRL with buffers allocated is not something that the subdev can decide on its own
[14:16]
hverkuilWhat should the flag indicate: that the size changes or that the layout changes? You said earlier that it indicates that the layout changes, not necessarily the size. [14:17]
pinchartlthe comment wasn't related to the flag, sorry
the flag should always be set for the rotation control
my question was related to how drivers should handle the rotation control when implemented by a subdev
[14:17]
hverkuilAh. [14:19]
pinchartlwhen a driver doesn't want to allow control changes with buffers allocated
how can it do so ?
for the VSP driver it's easy
there's a single driver, no external subdev
[14:19]
hverkuilDo we need to think about this now? [14:20]
pinchartlnot necessarily, but I'm not sure we should add a flag without thinking about the whole issue
again, the documentation patch doesn't try to extend the API
its goal is to document it
as it's currently not documented, and drivers do different things
so it's not an API extension
[14:20]
mchehabpinchartl: if you think we need more time to discuss, let's keep it out of 4.12 [14:22]
pinchartlI think we need more time to discuss the flag, yes
but I don't think it should block the VSP pull request
[14:22]
mchehabVSP pull request has dependencies on it [14:22]
pinchartlno
it depends on the documentation
but it does not extend the API
at least not that part of the API
the histogram formats it adds are API extensions, but they're not related to interactions with buffers
mchehab: furthermore, the rotation support patch for the VSP driver doesn't allow rotation to be changed with buffers allocated
so it's clearly not a violation of the existing, non-documented API :-)
[14:22]
hverkuilpinchartl: does it set the GRABBED flag? [14:24]
mchehabthis patch:
vsp1: wpf: Implement rotation support
seems to assume that it is possible to rotate without stop streaming
we need to agree with API bits before adding it
[14:25]
pinchartlhverkuil: no. no driver does currently. that should be fixed, and I will fix that for the VSP driver. I could even fix it today if needed
mchehab: no, rotation can't be modified without stopping the stream
it can't even be modified with buffers allocated
[14:25]
mchehabah, ok [14:26]
pinchartlin vsp1_wpf_set_rotation()
/* Changing rotation isn't allowed when buffers are allocated. */
mutex_lock(&video->lock);
if (vb2_is_busy(&video->queue)) {
ret = -EBUSY;
goto done;

that's very explicit :-)
[14:26]
hverkuil(regarding existing drivers: it's not clear to me when the rotate control is actually programmed: it might only happen when you start streaming. [14:26]
pinchartlhverkuil: some drivers do that, they accept modifications of controls at any time, but they will only take effect when starting streaming
that's not really V4L2-compliant
but it's a common behaviour
same for formats or selection rectangles in subdev drivers
[14:26]
hverkuilthat seems to be the case for exynos4-is/fimc. [14:28]
pinchartlwhen it comes to rotation, different drivers are broken in different ways
and I think we still need to discuss a bit more how to fix them
as we need an API that is possible to implement in drivers :-)
the VSP rotation patch it least is fine, but that's because it's an easy case
it's a single driver
and I decided to disallow rotation changes with buffers allocate to keep it simple to start with
s/allocate/allocated/
[14:28]
hverkuilexynos-gsc and mtk-mdp are m2m devices, so that's set per-frame anyway. [14:30]
pinchartlno external subdevs for them either, so it shouldn't be too difficult to fix
the fimc driver is different
but it implements rotation in the ISP
so there's a single driver that covers both the video nodes and the rotation
that shouldn't be too difficult to fix
[14:30]
hverkuilomap_vout.c I do not trust. [14:32]
pinchartlstill, I'd like to discuss the general case to make sure that the proposed new flag will be useable in practice
no external subdev for omap_vout either
and I'd like to get rid of omap_vout completely
the only blocker is rotation support in the omapdrm driver
once we get that, omapfb + omap_vout can go away
but that's not on anyone's to-do list :-S
[14:32]
hverkuilbcm2835 I do not trust either (but it's staging) [14:33]
pinchartlhverkuil: do you think the new MODIFY_LAYOUT flag is v4.12 material or v4.13 ? I think v4.13 is safer [14:34]
mchehabpinchartl: IMHO, we should modify the API documentation together with MODIFY_LAYOUT [14:37]
hverkuilI have no problem with this flag going into 4.12. Signaling that changing a control may change the layout as well (memory or mediabus) is fine and useful IMHO. [14:38]
pinchartlmchehab: again I'm not modifying the API, I'm only documenting the existing API :-)
most drivers don't allow control changes with buffers allocated
some do
[14:38]
mchehabI agree with hverkuil: I don't see any reason why not doing it on 4.12 [14:38]
pinchartlthat's the existing date
s/date/state/
and that's all the documentation patch is doing, it documents the existing API
I don't feel comfortable adding a new flag, which is an API extension, two weeks before the merge window
[14:38]
hverkuilThe issues raised here have more to do with how rotate is implemented today and what to do about it in the future if a subdev implements this.
Which are valid concerns, but not related to this control flag IMHO.
[14:40]
pinchartlthe control flag should be properly reviewed on the list
sending it today to get it merged by the end of the week isn't a good idea I think
Linus would yell at us again :-S
[14:40]
hverkuilThat's a valid concern. We're at rc6, so that's a bit close. [14:42]
mchehabpinchartl: my suggestion here is then to delay the documentation patch too [14:43]
pinchartlmchehab: why ? it only documents the current API [14:43]
mchehabwhat you see as "clarify" I see as "modify" [14:43]
pinchartlwhy should we delay documenting what is implemented today ?
which part do you see as an API modification ?
[14:43]
mchehabpinchartl: currently, some behaviors are an API violation (if not explicitly allowed, then it is denied) [14:44]
pinchartlwhich behaviour(s) ? [14:45]
mchehabit makes the API more flexible, by explicitly allowing format changes by a control [14:45]
pinchartlno, the format doesn't change. only the buffer layout does. the pixel format must not be changed by a control [14:45]
mchehabI nack allowing it without a flag to signalize it
s/format changes/buffer layout changes/
[14:45]
pinchartlcould you tell me clearly which part of the documentation patch you see as an API modification ? [14:46]
mchehabread the patch description... it clearly says so
if something is not fully specified, and you're specifying things, you're changing the API
the way I see, currently CID_ROTATE violates the API (in a number of ways)
[14:47]
pinchartlI've just re-read the commit message and it doesn't tell that it extends the API
we have an existing API
and part of it isn't documented in writing
[14:49]
mchehab> The interaction between those parameters and buffers is currently only
> partially specified by the V4L2 API.
[14:50]
pinchartlyou can argue that this patch extends the API in addition to documenting it [14:50]
mchehab> The behaviour of the
> VIDIOC_S_FMT and VIDIOC_S_SELECTION ioctls when buffers are allocated is
> also not fully specified.
> This patch clearly defines and documents the interactions between
> formats, selections, controls and buffers.
[14:50]
pinchartlbut you can't say there's no existing API [14:50]
snawrockihverkuil: In the exynos4 SoCs within the FIMC IP block there is a resizer after the rotator, so the driver allows changing rotation after STREAMON, any new settings are applied to H/W in VSYNC interrupt handler, V4L2_CID_ROTATE is exposed on the video node. [14:50]
mchehabno, I'm saying it is modifying the API [14:50]
pinchartlso, my question is, which parts of the patch do you consider as documenting the existing API, and which parts do you consider as extending it ? [14:50]
mchehabby defining the behavior
snawrocki: does it add/change PAD bytes when a buffer is rotated?
[14:50]
snawrockimchehab: no, they are unchanged, but the image aspect ratio is not maintained [14:52]
mchehabpinchartl: I don't see any sense on your question. On V4L2, the API is what should rule. The drivers should follow it, or they aren't compliant with the API
so, everything added there modifies the API
[14:53]
pinchartllet me ask the question differently
what is the existing API ?
[14:53]
mchehabfor example, if we add something like:
.. note:: for CID_ROTATE, drivers shoudn't set CTRL_GRABBER
we're modifying the API
the reverse would be the same:
.. note:: for CID_ROTATE, if drivers don't support rotating while streaming, they should set CTRL_GRABBER
both modifies the API
the existing API is what's written at the API documentation
[14:53]
pinchartlso, what you're saying, is that drivers can do whatever they want as long as this isn't documented ?
in that case drop the documentation patch and merge the code changes only
[14:55]
mchehabpinchartl: no. what I'm saying is that it is the documentation that rules, not the implementation
if the driver doesn't follow the documentation, it is a driver's issue
[14:55]
pinchartlBUT THERE'S NO DOCUMENTATION ?
s/?/!/
[14:56]
mchehab??????????????????????????/ [14:56]
pinchartlhow can a driver follow a documentation that doesn't exist ??? [14:56]
mchehabhttps://linuxtv.org/downloads/v4l-dvb-apis-new/ [14:56]
pinchartlthe existing documentation doesn't tell ANYTHING about interactions between controls and buffers [14:56]
mchehabit should follow whatever is ruled there [14:56]
pinchartlit's completely silent
nothing, nada
[14:56]
mchehabthen documentation should be written first [14:56]
pinchartlwe've had drivers that use controls and buffers for as long as V4L2 has existed [14:57]
mchehaband v4l2-compliance should detect
yes. we also have a driver that streams MPEG audio under /dev/video0 devnode
[14:57]
pinchartlwe're not talking about a single driver that does something wrong [14:58]
mchehab(with is clearly a violation of the API) [14:58]
pinchartlwe're talking about something fundamental implemented by all drivers [14:58]
mchehabno, we're talking about 3 drivers that implement CID_ROTATE
and one more that it is adding support for it
no other control affects the buffer layout
[14:58]
pinchartlthen tell me what how the *existing* API should be documented [15:00]
mchehabdon't have time for this [15:00]
pinchartl*without* adding a new flag because it's the *existing* API
ah
[15:00]
mchehabalready told you
let me keep handling the other patches
[15:00]
pinchartlso you're essentially telling me that what I propose is wrong, but that you don't have time to tell me what is the right solution ?
am I supposed to just guess until I get it right ?
[15:00]
mchehabsee the IRC log
we've been discussing it over the last 1:30 hours
[15:01]
pinchartlyes and you still refuse to answer the question [15:02]
mchehabif you were unable to understand, we'll need to postpone it to some other time
as I have other things to do
[15:02]
pinchartlif you're enable to clearly explain what should be done, how are we supposed to submit patches ? [15:02]
hverkuilmchehab: pinchartl: to be honest, I've lost the plot as well. [15:02]
mchehabI did it already. See my e-mail
if we're allowing controls to change format, we need to document it, and have a flag for it. It is as simple as that
[15:02]
pinchartlmchehab: that doesn't answer the question. before *extending* the API, I want to document the *existing* API
*extensions* should come on top of what is *existing*
[15:03]
mchehabThe existing API is that controls shouldn't change format
but you know that
[15:04]
pinchartlare you saying that the existing API is that a control that influences the buffer layout should not be allowed to be changed with buffers allocated ? [15:04]
mchehabanyway, have to go
ttyl
[15:04]
hverkuilmchehab: ??? But they do, and I don't think it is documented anywhere that controls shouldn't change the format.
Sorry, I agree with Laurent here.
[15:05]
mchehabhverkuil: just one control does that [15:05]
hverkuilSo? [15:06]
mchehaband it doesn't follow what's at the API, as it doesn't rise GRABBER flag [15:06]
pinchartlmchehab: that's an implementation problem [15:06]
mchehabyes, the control was added violating the API
and need to be fixed
anyway, I don't have time for discussions today.
we can schedule discussing it next week
[15:06]
pinchartlmchehab: I don't think I want to discuss V4L2 anymore [15:07]
hverkuilmchehab: well, you acked it at the time :-) And there is no rule in the API that prohibits controls from changing the format. [15:07]
mchehabhverkuil: yes. my mistake. I didn't realize that it would be modifying the format
hverkuil: there's no rule at API that allows controls from changing the format
adding a rule that would either allow (or deny) is modifying the API
[15:09]
hverkuilJust for the record: I'm not happy with the rotate control either. I wouldn't have used a control for that today. [15:10]
mchehabthe way I read specs is that, everything that it is not explicitly allowed is denyed
no specs will ever have everything documented - so, IMHO, assuming that something not document is invalid usually makes easier for everybody...
as everything that it is not document will rise a flag that documentation is needed for such feature
[15:10]
pinchartlno spec can ever document everything with the finest level of details
it's impossible
[15:13]
mchehabyes, that's what I just said [15:13]
pinchartland you can't retrospectively say that developers should have read your mind to understand how things should work [15:13]
mchehabno. they should read the docs [15:13]
pinchartlthe documentation doesn't tell me explicitly that my driver can implement 5 controls. is it forbidden ? [15:14]
hverkuilV4L2_CID_ROTATE (integer)
Rotates the image by specified angle. Common angles are 90, 270 and 180. Rotating the image to 90 and 270 will reverse the height and width of the display window. It is necessary to set the new height and width of the picture using the VIDIOC_S_FMT ioctl according to the rotation angle selected.
^^^^ That's really vague documentation for this control :-(
[15:14]
mchehabyes :-( [15:14]
hverkuilOK, this won't go in for 4.12, that's a safe conclusion. [15:14]
pinchartlit won't go in v4.13 either [15:15]
hverkuilI suggest we pick a date/time to look at this fresh. [15:15]
pinchartlwithout me [15:15]
mchehabhverkuil: agreed [15:15]
pinchartlpick any date or time you want
and have fun
[15:15]
hverkuilpinchartl: do the patches after 'v4l: vsp1: wpf: Implement rotation support' depend on that patch? [15:20]
pinchartlthey conflict with it
they could be rebased to go in before rotation support
for they add histogram controls that influence the buffer layout
at least for one of the two histogram engines
the other one has no such control
[15:20]
hverkuilAh yes. Since there is another histogram control that changes that buffer layout there is not much point in rebasing this. [15:23]
pinchartlprobably not, no
too bad, it will stay out-of-tree
[15:23]
hverkuilI'll discuss this further with Mauro. For some reason discussions between the two of you get out of hand :-( [15:26]
pinchartldo whatever you want, I don't care much
thanks for trying to help though
that I care about, and it's appreciated
however, I don't think we'll get anymore
please also feel free to take over the request API, I don't think I'll continue working on it
or on any other V4L2 API extensions
I know how I'd like the request API to look like, but there's no point in working on it myself
s/anymore/anywhere/
[15:26]
mchehabhverkuil: with regards to this pull request:
Subject: [GIT, PULL, FOR, v4.12] Add support for the RainShadow Tech HDMI CEC adapter
you're adding there at the pull request e-mail two "patches": one for udev and another one for linuxconsoletools. The best would be to send those to the owners of those apps
[15:29]
hverkuilOf course. I added those for completeness so that someone who wants to use this driver can find this information. [15:30]
mchehabok
btw, while you're on it, it would be good to send a patch adding /dev/media too on udev
e. g. adding this to /lib/udev/rules.d/50-udev-default.rules:
+SUBSYSTEM=="media", GROUP="video"
[15:31]
hverkuilI need to look into udev, I never actually made any changes there (or to systemd for that matter). [15:32]
mchehabshouldn't be hard. I submitted a patch for them (systemd, I guess) 3 years ago, fixing an issue on my old notebook's keyboard mapping... just don't remember anymore the procedure
hverkuil: back to the previous question, my suggestion would be if you could send a patch, after Lauren't documentation one, adding a proposal for GRABBER/MODIFY_LAYOUT flags
[15:33]
hverkuilA proposal for a MODIFY_LAYOUT flag I understand, but what is there to document for the GRABBER flag? [15:37]
mchehabI don't think that adding a single new control flag would be too late for 4.12. We already added new FOURCC's on late -rc cycle and this was never a problem
I mean: IMHO, it would be good to add a note at the new documentation section, added by pinchartl's patch...
saying that, if a control that modifies the layout can't be changed while stream, it should rise the GRABBER flag
[15:38]
hverkuilah, you mean that this should be mentioned more explicitly. OK. [15:39]
mchehab(not really required, as the spec already says that, but IMHO it would help driver developers to not forget of doing it)
yep
[15:39]
........ (idle for 36mn)
hverkuilpinchartl: which vsp1 histogram control can change the layout? [16:16]
pinchartlhverkuil: V4L2_CID_VSP1_HGO_MAX_RGB and V4L2_CID_VSP1_HGO_NUM_BINS [16:17]
hverkuilAh, I misread an earlier comment from you. OK, thanks! [16:18]
mchehabmost of media drivers that used to be at staging are now in main line... remaining ones are bcm2048, cxd2099, davinci_vpfe, lirc_zilog and omap4iss (not including the new ones adding for 4.12: atomisp and bcm2835)
sean is already working on converting lirc_zilog. cxd2099 is there due to a misusage of a DVB API - not sure how to address it
hverkuil: do you know what's the status of bcm2048 and davinci_vpfe?
[16:19]
hverkuilI don't see bcm2048 going anywhere. [16:23]
mchehabit seems that nobody is doing anything on omap4iss
sailus did some work on davinci_vpfe last year
but its todo list is big
(not sure if it is updated)
[16:25]
hverkuilFor the imap4iss there is no alternative. I wouldn't remove it. But I wonder what is needed to get that out of staging. [16:29]
mchehabthe omap4iss TODO list is small [16:29]
pinchartlhverkuil: it shouldn't take too much, but there's nobody to do the work [16:30]
mchehabbasically:
* Fix FIFO/buffer overflows and underflows
* Replace dummy resizer code with a real implementation
(and coding style, but we've been receiving coding style fixes for it - hopefully, everything is sorted out there already)
hmm... it builds fine with COMPILE_TEST
[16:30]
.... (idle for 18mn)
hverkuilmchehab: pinchartl: posted a patch for the new MODIFY_LAYOUT flag and how to use it. It's an RFC patch only, see the link to my vsp1 branch for the actual code changes.
I'll post a proper patch series once everyone agrees with these documentation changes.
[16:50]
pinchartlhverkuil: thank you, but I think it's too late [16:51]
mchehabhverkuil: patch looks good on my eye [16:59]
hverkuilmchehab: so let me get this straight: with this in place you are OK with merging the "Clearly document interactions between formats, controls and buffers
" patch?
[17:10]
mchehabyes, and pinchartl's patch series, provided that it handles both flags on the controls that modify layout
(that could be an extra patch at the end of the series)
[17:11]
hverkuilIt's OK if my patches come at the end of pinchartl's original patch series? I don't see any reason why that would be a problem. [17:13]
mchehab(provided that I won't see any other API change there that would require further discussions)
hverkuil: that's OK
I just want them to be merged at the same Kernel version, as I said earlier today
e.g. as we're modifying the API, let's do it on just one Kernel version
[17:14]
hverkuilPlease review 'v4l: Add metadata buffer type and format' as well, since that's another API addition.
I'll post a patch series adding the MODIFY_LAYOUT flag today or tomorrow at the latest.
(need to go shopping now, ttyl)
[17:17]
mchehabmchehab is reviewing it [17:18]
yeah, patch looks OK on my eyes.
I guess I already saw already an earlier version of this patch before
just had two minor comments to it
[17:24]
............................................................. (idle for 5h4mn)
***rellla has quit IRC (Ping timeout: 240 seconds) [22:29]

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