sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftargetE/translations/zh_CN/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/zh_TW/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/it_IT/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/ja_JP/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/ko_KR/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetE/translations/sp_SP/userspace-api/media/mediactl/media-ioc-g-topologymodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh_/var/lib/git/docbuild/linux/Documentation/userspace-api/media/mediactl/media-ioc-g-topology.rsthKubhtarget)}(h.. _media_ioc_g_topology:h]h}(h]h ]h"]h$]h&]refidmedia-ioc-g-topologyuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hioctl MEDIA_IOC_G_TOPOLOGYh]hioctl MEDIA_IOC_G_TOPOLOGY}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hPMEDIA_IOC_G_TOPOLOGY - Enumerate the graph topology and graph element propertiesh]hPMEDIA_IOC_G_TOPOLOGY - Enumerate the graph topology and graph element properties}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single!MC.MEDIA_IOC_G_TOPOLOGY (C macro)c.MC.MEDIA_IOC_G_TOPOLOGYhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hMEDIA_IOC_G_TOPOLOGYh]hdesc_signature_line)}(hMEDIA_IOC_G_TOPOLOGYh]h desc_name)}(hMEDIA_IOC_G_TOPOLOGYh]h desc_sig_name)}(hj+h]hMEDIA_IOC_G_TOPOLOGY}(hj;hhhNhNubah}(h]h ]nah"]h$]h&]uh1j9hj5ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j3hj/hhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhhhKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hhhKhj$hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jehj$hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjsobjtypejtdesctypejtnoindex noindexentrynocontentsentryuh1j"hhhjhNhNubh)}(hK``int ioctl(int fd, MEDIA_IOC_G_TOPOLOGY, struct media_v2_topology *argp)``h]hliteral)}(hjh]hGint ioctl(int fd, MEDIA_IOC_G_TOPOLOGY, struct media_v2_topology *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](xrefjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc1userspace-api/media/mediactl/media-ioc-g-topology refdomainjsreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)} identifierMCsbNasb reftargetopenuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h8``argp`` Pointer to struct :c:type:`media_v2_topology`. h](j)}(h``argp``h]j)}(hj.h]hargp}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jhhhKhj(ubj)}(hhh]h)}(h.Pointer to struct :c:type:`media_v2_topology`.h](hPointer to struct }(hjFhhhNhNubh)}(h:c:type:`media_v2_topology`h]j)}(hjPh]hmedia_v2_topology}(hjRhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjmedia_v2_topologyuh1hhhhKhjFubh.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK ubh)}(hX#The typical usage of this ioctl is to call it twice. On the first call, the structure defined at struct :c:type:`media_v2_topology` should be zeroed. At return, if no errors happen, this ioctl will return the ``topology_version`` and the total number of entities, interfaces, pads and links.h](hhThe typical usage of this ioctl is to call it twice. On the first call, the structure defined at struct }(hjhhhNhNubh)}(h:c:type:`media_v2_topology`h]j)}(hjh]hmedia_v2_topology}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjmedia_v2_topologyuh1hhhhK"hjubhN should be zeroed. At return, if no errors happen, this ioctl will return the }(hjhhhNhNubj)}(h``topology_version``h]htopology_version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> and the total number of entities, interfaces, pads and links.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hjhhubh)}(hBefore the second call, the userspace should allocate arrays to store the graph elements that are desired, putting the pointers to them at the ptr_entities, ptr_interfaces, ptr_links and/or ptr_pads, keeping the other values untouched.h]hBefore the second call, the userspace should allocate arrays to store the graph elements that are desired, putting the pointers to them at the ptr_entities, ptr_interfaces, ptr_links and/or ptr_pads, keeping the other values untouched.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubh)}(huIf the ``topology_version`` remains the same, the ioctl should fill the desired arrays with the media graph elements.h](hIf the }(hjhhhNhNubj)}(h``topology_version``h]htopology_version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhZ remains the same, the ioctl should fill the desired arrays with the media graph elements.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK.hjhhubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{1.6cm}|p{3.4cm}|p{12.3cm}|uh1jhhhK1hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jMC.media_v2_topology (C type)c.MC.media_v2_topologyhNtauh1jhjhhhNhNubj#)}(hhh](j()}(hmedia_v2_topologyh]j.)}(htype media_v2_topologyh](hdesc_sig_keyword)}(htypeh]htype}(hj;hhhNhNubah}(h]h ]kah"]h$]h&]uh1j9hj5hhhhhK3ubhdesc_sig_space)}(h h]h }(hjLhhhNhNubah}(h]h ]wah"]h$]h&]uh1jJhj5hhhhhK3ubj4)}(hmedia_v2_topologyh]j:)}(hj3h]hmedia_v2_topology}(hj_hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hj[ubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hj5hhhhhK3ubeh}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhj1hhhhhK3ubah}(h]j,ah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhK3hj.hhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehj.hhhhhK3ubeh}(h]h ](jstypeeh"]h$]h&]jxjsjyjjzjj{j|j}uh1j"hhhjhNhNubhtable)}(hhh](h)}(hstruct media_v2_topologyh]hstruct media_v2_topology}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u64h]h__u64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``topology_version``h]j)}(hjh]htopology_version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hVersion of the media graph topology. When the graph is created, this field starts with zero. Every time a graph element is added or removed, this field is incremented.h]hVersion of the media graph topology. When the graph is created, this field starts with zero. Every time a graph element is added or removed, this field is incremented.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK` chapter.h](h.On success 0 is returned, on error -1 and the }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhM variable is set appropriately. The generic error codes are described at the }(hjhhhNhNubh)}(h':ref:`Generic Error Codes `h]j) )}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j( hjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj gen-errorsuh1hhhhMhjubh chapter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh]j)}(hXENOSPC This is returned when either one or more of the num_entities, num_interfaces, num_links or num_pads are non-zero and are smaller than the actual number of elements inside the graph. This may happen if the ``topology_version`` changed when compared to the last time this ioctl was called. Userspace should usually free the area for the pointers, zero the struct elements and call this ioctl again.h](j)}(hENOSPCh]hENOSPC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM%hjubj)}(hhh]h)}(hXThis is returned when either one or more of the num_entities, num_interfaces, num_links or num_pads are non-zero and are smaller than the actual number of elements inside the graph. This may happen if the ``topology_version`` changed when compared to the last time this ioctl was called. Userspace should usually free the area for the pointers, zero the struct elements and call this ioctl again.h](hThis is returned when either one or more of the num_entities, num_interfaces, num_links or num_pads are non-zero and are smaller than the actual number of elements inside the graph. This may happen if the }(hjhhhNhNubj)}(h``topology_version``h]htopology_version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh changed when compared to the last time this ioctl was called. Userspace should usually free the area for the pointers, zero the struct elements and call this ioctl again.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM%hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhMubeh}(h](ioctl-media-ioc-g-topologyheh ]h"](ioctl media_ioc_g_topologymedia_ioc_g_topologyeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}j;hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjderror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(j;hj:j7hhjjjjjjj2j/u nametypes}(j;j:hjjjj2uh}(hhj7hhhjjj j)jjjjj,j1jjj j jjjjjjj/jjjj jjfj# jjjjDjjEu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jrKsRparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h:Hyperlink target "media-ioc-g-topology" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1juba transformerN include_log] decorationNhhub.