1 /*
2 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following
11 * disclaimer in the documentation and/or other materials provided
12 * with the distribution.
13 * * Neither the name of The Linux Foundation nor the names of its
14 * contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 #define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
31 #define DEBUG 0
32 #include "QtiMapper4.h"
33
34 #include <cutils/trace.h>
35 #include <qdMetaData.h>
36 #include <sync/sync.h>
37
38 #include <vector>
39
40 #include "gr_utils.h"
41
42 namespace vendor {
43 namespace qti {
44 namespace hardware {
45 namespace display {
46 namespace mapper {
47 namespace V4_0 {
48 namespace implementation {
49
50 using gralloc::BufferInfo;
51
52 using aidl::android::hardware::graphics::common::StandardMetadataType;
QtiMapper()53 QtiMapper::QtiMapper() {
54 extensions_ = new QtiMapperExtensions();
55 buf_mgr_ = BufferManager::GetInstance();
56 ALOGD_IF(DEBUG, "Created QtiMapper instance");
57 }
58
ValidDescriptor(const BufferDescriptorInfo_4_0 & bd)59 bool QtiMapper::ValidDescriptor(const BufferDescriptorInfo_4_0 &bd) {
60 if (bd.width == 0 || bd.height == 0 || (static_cast<int32_t>(bd.format) <= 0) ||
61 bd.layerCount <= 0) {
62 return false;
63 }
64
65 return true;
66 }
67
CreateDescriptor(const BufferDescriptorInfo_4_0 & descriptor_info,IMapperBufferDescriptor * descriptor)68 Error QtiMapper::CreateDescriptor(const BufferDescriptorInfo_4_0 &descriptor_info,
69 IMapperBufferDescriptor *descriptor) {
70 ALOGD_IF(DEBUG,
71 "BufferDescriptorInfo: name %s wxh: %dx%d usage: 0x%" PRIu64
72 " format: %d layer_count: %d",
73 descriptor_info.name.c_str(), descriptor_info.width, descriptor_info.height,
74 descriptor_info.usage, static_cast<uint32_t>(descriptor_info.format),
75 descriptor_info.layerCount);
76
77 if (ValidDescriptor(descriptor_info)) {
78 auto vec = Encode(descriptor_info);
79 *descriptor = vec;
80 return Error::NONE;
81 } else {
82 return Error::BAD_VALUE;
83 }
84 }
85
86 // Methods from ::android::hardware::graphics::mapper::V2_0::IMapper follow.
createDescriptor(const BufferDescriptorInfo_4_0 & descriptor_info,createDescriptor_cb hidl_cb)87 Return<void> QtiMapper::createDescriptor(const BufferDescriptorInfo_4_0 &descriptor_info,
88 createDescriptor_cb hidl_cb) {
89 IMapperBufferDescriptor descriptor;
90 auto info_4_0 = BufferDescriptorInfo_4_0{descriptor_info.name,
91 descriptor_info.width,
92 descriptor_info.height,
93 descriptor_info.layerCount,
94 static_cast<PixelFormat>(descriptor_info.format),
95 descriptor_info.usage,
96 descriptor_info.reservedSize};
97 auto err = CreateDescriptor(info_4_0, &descriptor);
98 hidl_cb(err, descriptor);
99 return Void();
100 }
101
importBuffer(const hidl_handle & raw_handle,importBuffer_cb hidl_cb)102 Return<void> QtiMapper::importBuffer(const hidl_handle &raw_handle, importBuffer_cb hidl_cb) {
103 if (!raw_handle.getNativeHandle()) {
104 ALOGE("%s: Unable to import handle", __FUNCTION__);
105 hidl_cb(Error::BAD_BUFFER, nullptr);
106 return Void();
107 }
108
109 native_handle_t *buffer_handle = native_handle_clone(raw_handle.getNativeHandle());
110 if (!buffer_handle) {
111 ALOGE("%s: Unable to clone handle", __FUNCTION__);
112 hidl_cb(Error::NO_RESOURCES, nullptr);
113 return Void();
114 }
115
116 auto error =
117 static_cast<IMapper_4_0_Error>(buf_mgr_->RetainBuffer(PRIV_HANDLE_CONST(buffer_handle)));
118 if (error != Error::NONE) {
119 ALOGE("%s: Unable to retain handle: %p", __FUNCTION__, buffer_handle);
120 native_handle_close(buffer_handle);
121 native_handle_delete(buffer_handle);
122
123 hidl_cb(error, nullptr);
124 return Void();
125 }
126 ALOGD_IF(DEBUG, "Imported handle: %p id: %" PRIu64, buffer_handle,
127 PRIV_HANDLE_CONST(buffer_handle)->id);
128 hidl_cb(Error::NONE, buffer_handle);
129 return Void();
130 }
131
freeBuffer(void * buffer)132 Return<Error> QtiMapper::freeBuffer(void *buffer) {
133 if (!buffer) {
134 return Error::BAD_BUFFER;
135 }
136 return static_cast<IMapper_4_0_Error>(buf_mgr_->ReleaseBuffer(PRIV_HANDLE_CONST(buffer)));
137 }
138
GetFenceFd(const hidl_handle & fence_handle,int * outFenceFd)139 bool QtiMapper::GetFenceFd(const hidl_handle &fence_handle, int *outFenceFd) {
140 auto handle = fence_handle.getNativeHandle();
141 if (handle && handle->numFds > 1) {
142 ALOGE("invalid fence handle with %d fds", handle->numFds);
143 return false;
144 }
145
146 *outFenceFd = (handle && handle->numFds == 1) ? handle->data[0] : -1;
147 return true;
148 }
149
WaitFenceFd(int fence_fd)150 void QtiMapper::WaitFenceFd(int fence_fd) {
151 if (fence_fd < 0) {
152 return;
153 }
154
155 const int timeout = 3000;
156 ATRACE_BEGIN("fence wait");
157 const int error = sync_wait(fence_fd, timeout);
158 ATRACE_END();
159 if (error < 0) {
160 ALOGE("QtiMapper: lock fence %d didn't signal in %u ms - error: %s", fence_fd, timeout,
161 strerror(errno));
162 }
163 }
164
LockBuffer(void * buffer,uint64_t usage,const hidl_handle & acquire_fence,const IMapper::Rect & access_region)165 Error QtiMapper::LockBuffer(void *buffer, uint64_t usage, const hidl_handle &acquire_fence,
166 const IMapper::Rect &access_region) {
167 if (!buffer) {
168 return Error::BAD_BUFFER;
169 }
170
171 int fence_fd;
172 if (!GetFenceFd(acquire_fence, &fence_fd)) {
173 return Error::BAD_VALUE;
174 }
175
176 if (fence_fd > 0) {
177 WaitFenceFd(fence_fd);
178 }
179
180 auto hnd = PRIV_HANDLE_CONST(buffer);
181
182 if (access_region.top < 0 || access_region.left < 0 || access_region.width < 0 ||
183 access_region.height < 0 || access_region.width > hnd->width ||
184 access_region.height > hnd->height) {
185 return Error::BAD_VALUE;
186 }
187 return static_cast<IMapper_4_0_Error>(buf_mgr_->LockBuffer(hnd, usage));
188 }
189
lock(void * buffer,uint64_t cpu_usage,const IMapper::Rect & access_region,const hidl_handle & acquire_fence,lock_cb hidl_cb)190 Return<void> QtiMapper::lock(void *buffer, uint64_t cpu_usage, const IMapper::Rect &access_region,
191 const hidl_handle &acquire_fence, lock_cb hidl_cb) {
192 auto err = LockBuffer(buffer, cpu_usage, acquire_fence, access_region);
193 if (err != Error::NONE) {
194 hidl_cb(err, nullptr);
195 return Void();
196 }
197
198 auto hnd = PRIV_HANDLE_CONST(buffer);
199 auto *out_data = reinterpret_cast<void *>(hnd->base);
200
201 hidl_cb(err, out_data);
202 return Void();
203 }
204
unlock(void * buffer,unlock_cb hidl_cb)205 Return<void> QtiMapper::unlock(void *buffer, unlock_cb hidl_cb) {
206 auto err = Error::BAD_BUFFER;
207 if (buffer != nullptr) {
208 err = static_cast<IMapper_4_0_Error>(buf_mgr_->UnlockBuffer(PRIV_HANDLE_CONST(buffer)));
209 }
210 // We don't have a release fence
211 hidl_cb(err, hidl_handle(nullptr));
212 return Void();
213 }
214
validateBufferSize(void * buffer,const BufferDescriptorInfo_4_0 & descriptor_info,uint32_t)215 Return<Error> QtiMapper::validateBufferSize(void *buffer,
216 const BufferDescriptorInfo_4_0 &descriptor_info,
217 uint32_t /*stride*/) {
218 auto err = Error::BAD_BUFFER;
219 auto hnd = static_cast<private_handle_t *>(buffer);
220 if (buffer != nullptr && private_handle_t::validate(hnd) == 0) {
221 if (static_cast<IMapper_4_0_Error>(buf_mgr_->IsBufferImported(hnd)) != Error::NONE) {
222 return Error::BAD_BUFFER;
223 }
224 auto info = gralloc::BufferInfo(descriptor_info.width, descriptor_info.height,
225 static_cast<uint32_t>(descriptor_info.format),
226 static_cast<uint64_t>(descriptor_info.usage));
227 info.layer_count = descriptor_info.layerCount;
228 err = static_cast<IMapper_4_0_Error>(buf_mgr_->ValidateBufferSize(hnd, info));
229 }
230 return err;
231 }
232
getTransportSize(void * buffer,getTransportSize_cb hidl_cb)233 Return<void> QtiMapper::getTransportSize(void *buffer, getTransportSize_cb hidl_cb) {
234 auto err = Error::BAD_BUFFER;
235 auto hnd = static_cast<private_handle_t *>(buffer);
236 uint32_t num_fds = 0, num_ints = 0;
237 if (buffer != nullptr && private_handle_t::validate(hnd) == 0) {
238 if (static_cast<IMapper_4_0_Error>(buf_mgr_->IsBufferImported(hnd)) != Error::NONE) {
239 hidl_cb(err, num_fds, num_ints);
240 return Void();
241 }
242 num_fds = 2;
243 // TODO(user): reduce to transported values;
244 num_ints = static_cast<uint32_t>(hnd->numInts);
245 err = Error::NONE;
246 }
247 ALOGD_IF(DEBUG, "GetTransportSize: num fds: %d num ints: %d err:%d", num_fds, num_ints, err);
248 hidl_cb(err, num_fds, num_ints);
249 return Void();
250 }
251
get(void * buffer,const MetadataType & metadataType,get_cb hidl_cb)252 Return<void> QtiMapper::get(void *buffer, const MetadataType &metadataType, get_cb hidl_cb) {
253 auto err = Error::BAD_BUFFER;
254 hidl_vec<uint8_t> metadata;
255 if (buffer != nullptr) {
256 if (metadataType.name != GRALLOC4_STANDARD_METADATA_TYPE &&
257 metadataType.name != qtigralloc::VENDOR_QTI) {
258 hidl_cb(Error::UNSUPPORTED, metadata);
259 return Void();
260 }
261 auto hnd = static_cast<private_handle_t *>(buffer);
262 err = static_cast<IMapper_4_0_Error>(buf_mgr_->GetMetadata(hnd, metadataType.value, &metadata));
263 }
264 hidl_cb(err, metadata);
265 return Void();
266 }
267
set(void * buffer,const MetadataType & metadataType,const hidl_vec<uint8_t> & metadata)268 Return<Error> QtiMapper::set(void *buffer, const MetadataType &metadataType,
269 const hidl_vec<uint8_t> &metadata) {
270 auto err = Error::BAD_BUFFER;
271 if (buffer != nullptr) {
272 auto hnd = static_cast<private_handle_t *>(buffer);
273 err = static_cast<IMapper_4_0_Error>(buf_mgr_->SetMetadata(hnd, metadataType.value, metadata));
274 }
275 return err;
276 }
277
getFromBufferDescriptorInfo(const BufferDescriptorInfo & description,const MetadataType & metadataType,getFromBufferDescriptorInfo_cb hidl_cb)278 Return<void> QtiMapper::getFromBufferDescriptorInfo(const BufferDescriptorInfo &description,
279 const MetadataType &metadataType,
280 getFromBufferDescriptorInfo_cb hidl_cb) {
281 hidl_vec<uint8_t> out;
282 auto err = Error::UNSUPPORTED;
283 switch (metadataType.value) {
284 case static_cast<int64_t>(StandardMetadataType::NAME):
285 err = static_cast<IMapper_4_0_Error>(android::gralloc4::encodeName(description.name, &out));
286 break;
287 case static_cast<int64_t>(StandardMetadataType::WIDTH):
288 err = static_cast<IMapper_4_0_Error>(android::gralloc4::encodeWidth(description.width, &out));
289 break;
290 case static_cast<int64_t>(StandardMetadataType::HEIGHT):
291 err =
292 static_cast<IMapper_4_0_Error>(android::gralloc4::encodeHeight(description.height, &out));
293 break;
294 case static_cast<int64_t>(StandardMetadataType::LAYER_COUNT):
295 err = static_cast<IMapper_4_0_Error>(
296 android::gralloc4::encodeLayerCount(description.layerCount, &out));
297 break;
298 case static_cast<int64_t>(StandardMetadataType::PIXEL_FORMAT_REQUESTED):
299 err = static_cast<IMapper_4_0_Error>(
300 android::gralloc4::encodePixelFormatRequested(description.format, &out));
301 break;
302 case static_cast<int64_t>(StandardMetadataType::USAGE):
303 err = static_cast<IMapper_4_0_Error>(android::gralloc4::encodeUsage(description.usage, &out));
304 break;
305 case static_cast<int64_t>(StandardMetadataType::COMPRESSION): {
306 int format =
307 gralloc::GetImplDefinedFormat(description.usage, static_cast<int>(description.format));
308 if (gralloc::IsUBwcEnabled(format, description.usage)) {
309 err = static_cast<IMapper_4_0_Error>(
310 android::gralloc4::encodeCompression(qtigralloc::Compression_QtiUBWC, &out));
311 } else {
312 err = static_cast<IMapper_4_0_Error>(
313 android::gralloc4::encodeCompression(android::gralloc4::Compression_None, &out));
314 }
315 break;
316 }
317 case static_cast<int64_t>(StandardMetadataType::PROTECTED_CONTENT): {
318 uint64_t protected_content = 0;
319 if (description.usage & GRALLOC_USAGE_PROTECTED &&
320 !(description.usage & GRALLOC_USAGE_SW_READ_MASK) &&
321 !(description.usage & GRALLOC_USAGE_SW_WRITE_MASK)) {
322 protected_content = 1;
323 }
324 err = static_cast<IMapper_4_0_Error>(
325 android::gralloc4::encodeProtectedContent(protected_content, &out));
326 break;
327 }
328 case static_cast<int64_t>(StandardMetadataType::PIXEL_FORMAT_FOURCC):
329 case static_cast<int64_t>(StandardMetadataType::PIXEL_FORMAT_MODIFIER): {
330 int format =
331 gralloc::GetImplDefinedFormat(description.usage, static_cast<int>(description.format));
332 uint32_t drm_format;
333 uint64_t drm_format_modifier;
334 if (gralloc::IsUBwcEnabled(format, description.usage)) {
335 gralloc::GetDRMFormat(format, private_handle_t::PRIV_FLAGS_UBWC_ALIGNED, &drm_format,
336 &drm_format_modifier);
337 } else {
338 gralloc::GetDRMFormat(format, 0, &drm_format, &drm_format_modifier);
339 }
340 if (metadataType.value == static_cast<int64_t>(StandardMetadataType::PIXEL_FORMAT_FOURCC)) {
341 err = static_cast<IMapper_4_0_Error>(
342 android::gralloc4::encodePixelFormatFourCC(drm_format, &out));
343 } else {
344 err = static_cast<IMapper_4_0_Error>(
345 android::gralloc4::encodePixelFormatModifier(drm_format_modifier, &out));
346 }
347 break;
348 }
349 default:
350 break;
351 }
352
353 hidl_cb(err, out);
354 return Void();
355 }
flushLockedBuffer(void * buffer,flushLockedBuffer_cb hidl_cb)356 Return<void> QtiMapper::flushLockedBuffer(void *buffer, flushLockedBuffer_cb hidl_cb) {
357 auto err = Error::BAD_BUFFER;
358 if (buffer != nullptr) {
359 err = static_cast<IMapper_4_0_Error>(buf_mgr_->FlushBuffer(PRIV_HANDLE_CONST(buffer)));
360 }
361 // We don't have a release fence
362 hidl_cb(err, hidl_handle(nullptr));
363 return Void();
364 }
365
rereadLockedBuffer(void * buffer)366 Return<Error> QtiMapper::rereadLockedBuffer(void *buffer) {
367 auto err = Error::BAD_BUFFER;
368 if (buffer != nullptr) {
369 err = static_cast<IMapper_4_0_Error>(buf_mgr_->RereadBuffer(PRIV_HANDLE_CONST(buffer)));
370 }
371 return err;
372 }
373
getReservedRegion(void * buffer,getReservedRegion_cb hidl_cb)374 Return<void> QtiMapper::getReservedRegion(void *buffer, getReservedRegion_cb hidl_cb) {
375 auto hnd = static_cast<private_handle_t *>(buffer);
376 void *reserved_region = nullptr;
377 uint64_t reserved_size = 0;
378 if (static_cast<IMapper_4_0_Error>(buf_mgr_->IsBufferImported(hnd)) != Error::NONE) {
379 hidl_cb(Error::BAD_BUFFER, reserved_region, reserved_size);
380 }
381 auto err = static_cast<IMapper_4_0_Error>(
382 buf_mgr_->GetReservedRegion(hnd, &reserved_region, &reserved_size));
383
384 hidl_cb(err, reserved_region, reserved_size);
385 return Void();
386 }
387
DumpBufferMetadata(const private_handle_t * buffer,BufferDump * outBufferDump)388 Error QtiMapper::DumpBufferMetadata(const private_handle_t *buffer, BufferDump *outBufferDump) {
389 outBufferDump->metadataDump.resize(metadata_type_descriptions_.size());
390 for (int i = 0; i < static_cast<int>(metadata_type_descriptions_.size()); i++) {
391 auto type = metadata_type_descriptions_[i].metadataType;
392 hidl_vec<uint8_t> metadata;
393 if (static_cast<IMapper_4_0_Error>(buf_mgr_->GetMetadata(
394 const_cast<private_handle_t *>(buffer), type.value, &metadata)) == Error::BAD_BUFFER) {
395 // If buffer is deleted during metadata dump, return BAD_BUFFER
396 return Error::BAD_BUFFER;
397 }
398 MetadataDump metadata_dump = {type, metadata};
399 outBufferDump->metadataDump[i] = metadata_dump;
400 }
401 return Error::NONE;
402 }
dumpBuffer(void * buffer,dumpBuffer_cb hidl_cb)403 Return<void> QtiMapper::dumpBuffer(void *buffer, dumpBuffer_cb hidl_cb) {
404 BufferDump buffer_dump;
405 auto hnd = PRIV_HANDLE_CONST(buffer);
406 if (buffer != nullptr) {
407 if (DumpBufferMetadata(hnd, &buffer_dump) == Error::NONE) {
408 hidl_cb(Error::NONE, buffer_dump);
409 return Void();
410 }
411 }
412 hidl_cb(Error::BAD_BUFFER, buffer_dump);
413 return Void();
414 }
dumpBuffers(dumpBuffers_cb hidl_cb)415 Return<void> QtiMapper::dumpBuffers(dumpBuffers_cb hidl_cb) {
416 hidl_vec<BufferDump> buffers_dump;
417 std::vector<const private_handle_t *> handle_list;
418 if (static_cast<IMapper_4_0_Error>(buf_mgr_->GetAllHandles(&handle_list)) != Error::NONE) {
419 hidl_cb(Error::NO_RESOURCES, buffers_dump);
420 }
421 buffers_dump.resize(handle_list.size());
422 for (int i = 0; i < handle_list.size(); i++) {
423 BufferDump buffer_dump;
424 if (DumpBufferMetadata(handle_list[i], &buffer_dump) != Error::NONE) {
425 continue;
426 }
427 buffers_dump[i] = buffer_dump;
428 }
429 hidl_cb(Error::NONE, buffers_dump);
430 return Void();
431 }
432
listSupportedMetadataTypes(listSupportedMetadataTypes_cb hidl_cb)433 Return<void> QtiMapper::listSupportedMetadataTypes(listSupportedMetadataTypes_cb hidl_cb) {
434 hidl_cb(Error::NONE, metadata_type_descriptions_);
435 return Void();
436 }
437
isSupported(const BufferDescriptorInfo_4_0 & descriptor_info,isSupported_cb hidl_cb)438 Return<void> QtiMapper::isSupported(const BufferDescriptorInfo_4_0 &descriptor_info,
439 isSupported_cb hidl_cb) {
440 IMapperBufferDescriptor descriptor;
441 auto err = CreateDescriptor(descriptor_info, &descriptor);
442 if (err != Error::NONE) {
443 hidl_cb(err, false);
444 return Void();
445 }
446
447 gralloc::BufferDescriptor desc;
448 err = static_cast<Error>(Decode(descriptor, &desc));
449 if (err != Error::NONE) {
450 hidl_cb(err, false);
451 return Void();
452 }
453
454 buffer_handle_t buffer;
455 err = static_cast<IMapper_4_0_Error>(buf_mgr_->AllocateBuffer(desc, &buffer, 0, true));
456 if (err != Error::NONE) {
457 hidl_cb(err, false);
458 } else {
459 hidl_cb(err, true);
460 }
461
462 return Void();
463 }
464
getMapperExtensions(QtiMapper::getMapperExtensions_cb hidl_cb)465 Return<void> QtiMapper::getMapperExtensions(QtiMapper::getMapperExtensions_cb hidl_cb) {
466 if (extensions_ != nullptr) {
467 hidl_cb(Error::NONE, extensions_);
468 } else {
469 hidl_cb(Error::UNSUPPORTED, extensions_);
470 }
471 return Void();
472 }
473
474 // Methods from ::android::hidl::base::V1_0::IBase follow.
475
476 // When we are in passthrough mode, this method is used
477 // by hidl to obtain the SP HAL object
HIDL_FETCH_IMapper(const char *)478 extern "C" IMapper *HIDL_FETCH_IMapper(const char * /* name */) {
479 ALOGD_IF(DEBUG, "Fetching IMapper from QtiMapper");
480 auto mapper = new QtiMapper();
481 return static_cast<IMapper *>(mapper);
482 }
483
HIDL_FETCH_IQtiMapper(const char *)484 extern "C" IQtiMapper *HIDL_FETCH_IQtiMapper(const char * /* name */) {
485 ALOGD_IF(DEBUG, "Fetching QtiMapper");
486 return new QtiMapper();
487 }
488
489 } // namespace implementation
490 } // namespace V4_0
491 } // namespace mapper
492 } // namespace display
493 } // namespace hardware
494 } // namespace qti
495 } // namespace vendor
496