NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
IInterruptStatus.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef IINTERRUPTSTATUS_HPP
14 #define IINTERRUPTSTATUS_HPP
15 
16 #include "NvSIPLInterrupts.hpp"
17 
18 #include <array>
19 #include <cstdint>
20 
28 namespace nvsipl
29 {
30 
44 static constexpr uint32_t MAX_DEVGRP_NTFNS_PER_INTR { 16U };
45 
52 static constexpr uint32_t ERRMON_INTR_POLL_INTERVAL_MS { 500U };
53 
58 {
59 public:
71  uint64_t data;
73  uint32_t gpioIdx;
78  uint32_t linkMask;
83  bool valid;
84  };
85 
89  friend bool operator==(
90  InterruptNotification const &self, InterruptNotification const &other) noexcept
91  {
92  return (self.valid) && (other.valid)
93  && (self.code == other.code)
94  && (self.gpioIdx == other.gpioIdx)
95  && (self.linkMask == other.linkMask);
96  }
97 
101  friend bool operator!=(
102  InterruptNotification const &self, InterruptNotification const &other) noexcept
103  {
104  return !(self == other);
105  }
106 
165  uint32_t const gpioIdx,
166  std::array<InterruptNotification, MAX_DEVGRP_NTFNS_PER_INTR> &intrNtfns) const noexcept
167  {
168  static_cast<void>(gpioIdx);
169  static_cast<void>(intrNtfns[0]);
171  }
172 
208  }
209 
210 protected:
214  IInterruptStatus() = default;
215 
219  IInterruptStatus(IInterruptStatus const &) = delete;
220 
224  IInterruptStatus(IInterruptStatus &&) = delete;
225 
229  IInterruptStatus& operator=(IInterruptStatus const &) & = delete;
230 
235 
239  virtual ~IInterruptStatus() = default;
240 
241 };
242 
247  { InterruptCode::INTR_STATUS_FAILURE, 0ULL, 0U, 0U, false };
248 
251 } // end of namespace nvsipl
252 
253 #endif // IINTERRUPTSTATUS_HPP
nvsipl::EMPTY_INTR_NTFN
Empty (invalid) InterruptNotification.
Definition: IInterruptStatus.hpp:246
nvsipl::IInterruptStatus::InterruptNotification::linkMask
uint32_t linkMask
The one-hot link masks indicating which Camera Module link(s) this notification describes.
Definition: IInterruptStatus.hpp:78
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in NvSIPL modules.
Definition: NvSIPLCommon.hpp:168
nvsipl::ERRMON_INTR_POLL_INTERVAL_MS
static constexpr uint32_t ERRMON_INTR_POLL_INTERVAL_MS
Polling interval in milliseconds for the error monitor interrupt status.
Definition: IInterruptStatus.hpp:52
nvsipl::NVSIPL_STATUS_NOT_SUPPORTED
@ NVSIPL_STATUS_NOT_SUPPORTED
Indicates an unsupported operation or argument was encountered.
Definition: NvSIPLCommon.hpp:179
nvsipl::InterruptCode
InterruptCode
Interrupt Status Codes.
Definition: NvSIPLInterrupts.hpp:37
nvsipl::IInterruptStatus
Interface defining Interrupt Status functionality.
Definition: IInterruptStatus.hpp:57
nvsipl::IInterruptStatus::operator==
friend bool operator==(InterruptNotification const &self, InterruptNotification const &other) noexcept
Equality comparison operator.
Definition: IInterruptStatus.hpp:89
nvsipl::IInterruptStatus::InterruptNotification::gpioIdx
uint32_t gpioIdx
The interrupt CDAC GPIO index.
Definition: IInterruptStatus.hpp:73
nvsipl::IInterruptStatus::InterruptNotification::valid
bool valid
Whether this interrupt notification is valid (filled).
Definition: IInterruptStatus.hpp:83
nvsipl::MAX_DEVGRP_NTFNS_PER_INTR
static constexpr uint32_t MAX_DEVGRP_NTFNS_PER_INTR
Maximum number of error notifications to dispatch to the client per device group (i....
Definition: IInterruptStatus.hpp:44
nvsipl::IInterruptStatus::InterruptNotification::data
uint64_t data
Fixed-sized storage for custom driver-defined payload.
Definition: IInterruptStatus.hpp:71
nvsipl::IInterruptStatus::operator=
IInterruptStatus & operator=(IInterruptStatus const &) &=delete
Prevent IInterruptStatus from being copy assigned.
nvsipl::IInterruptStatus::GetInterruptStatus
virtual SIPLStatus GetInterruptStatus(uint32_t const gpioIdx, std::array< InterruptNotification, MAX_DEVGRP_NTFNS_PER_INTR > &intrNtfns) const noexcept
Requests the driver to query the status of a device in response to an asserted interrupt,...
Definition: IInterruptStatus.hpp:164
NvSIPLInterrupts.hpp
NVIDIA SIPL: Interrupts
nvsipl::IInterruptStatus::IInterruptStatus
IInterruptStatus()=default
Constructor.
nvsipl::IInterruptStatus::~IInterruptStatus
virtual ~IInterruptStatus()=default
destructor
nvsipl::InterruptCode::INTR_STATUS_FAILURE
@ INTR_STATUS_FAILURE
Device Block or Camera Link-level event, indicates general failure.
nvsipl::IInterruptStatus::InterruptNotification::code
InterruptCode code
The interrupt code to send to the client in the notification.
Definition: IInterruptStatus.hpp:69
nvsipl::IInterruptStatus::InterruptNotification
Interrupt Notification from hardware device drivers to be delivered to the client.
Definition: IInterruptStatus.hpp:67
nvsipl::IInterruptStatus::operator!=
friend bool operator!=(InterruptNotification const &self, InterruptNotification const &other) noexcept
Inequality comparison operator.
Definition: IInterruptStatus.hpp:101
nvsipl
Describes the custom interface for IMX623.
Definition: AR0820_CUST1_CustomInterface.hpp:21
nvsipl::IInterruptStatus::ResetInterruptNotifications
virtual SIPLStatus ResetInterruptNotifications() const
Resets the interrupt notifications in the driver context.
Definition: IInterruptStatus.hpp:206