Skip to content

Commit

Permalink
Reduce v4l messages report level
Browse files Browse the repository at this point in the history
Don't override videobuf2 modules prior to kernel 5

(cherry picked from commit 4ec8f88)
  • Loading branch information
ev-mp committed Dec 15, 2020
1 parent 4fedb62 commit c6a8d2b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions scripts/patch-realsense-ubuntu-lts.sh
Expand Up @@ -273,7 +273,7 @@ echo -e "\e[32mPatched kernels modules were created successfully\n\e[0m"
# As a precausion start with unloading the core uvcvideo:
try_unload_module uvcvideo
try_unload_module videobuf2_v4l2
try_unload_module videobuf2_common
[ ${k_maj_min} -ge 500 ] && try_unload_module videobuf2_common
try_unload_module videodev


Expand Down Expand Up @@ -305,8 +305,8 @@ if [ $build_usbcore_modules -eq 1 ]; then
fi

try_module_insert videodev ~/$LINUX_BRANCH-videodev.ko /lib/modules/`uname -r`/kernel/drivers/media/v4l2-core/videodev.ko
try_module_insert videobuf2-common ~/$LINUX_BRANCH-videobuf2-common.ko /lib/modules/`uname -r`/kernel/drivers/media/common/videobuf2/videobuf2-common.ko
try_module_insert videobuf2-v4l2 ~/$LINUX_BRANCH-videobuf2-v4l2.ko /lib/modules/`uname -r`/kernel/drivers/media/common/videobuf2/videobuf2-v4l2.ko
[ ${k_maj_min} -ge 500 ] && try_module_insert videobuf2-common ~/$LINUX_BRANCH-videobuf2-common.ko /lib/modules/`uname -r`/kernel/drivers/media/common/videobuf2/videobuf2-common.ko
[ ${k_maj_min} -ge 500 ] && try_module_insert videobuf2-v4l2 ~/$LINUX_BRANCH-videobuf2-v4l2.ko /lib/modules/`uname -r`/kernel/drivers/media/common/videobuf2/videobuf2-v4l2.ko
try_module_insert uvcvideo ~/$LINUX_BRANCH-uvcvideo.ko /lib/modules/`uname -r`/kernel/drivers/media/usb/uvc/uvcvideo.ko
try_module_insert hid_sensor_accel_3d ~/$LINUX_BRANCH-hid-sensor-accel-3d.ko /lib/modules/`uname -r`/kernel/drivers/iio/accel/hid-sensor-accel-3d.ko
try_module_insert hid_sensor_gyro_3d ~/$LINUX_BRANCH-hid-sensor-gyro-3d.ko /lib/modules/`uname -r`/kernel/drivers/iio/gyro/hid-sensor-gyro-3d.ko
Expand Down
6 changes: 3 additions & 3 deletions src/linux/backend-v4l2.cpp
Expand Up @@ -398,7 +398,7 @@ namespace librealsense

if (nullptr == md_start)
{
LOG_WARNING("Could not parse metadata");
LOG_DEBUG("Could not parse metadata");
}
set_md_attributes(static_cast<uint8_t>(md_size),md_start);
}
Expand Down Expand Up @@ -1025,7 +1025,7 @@ namespace librealsense
{
if(buf.bytesused == 0)
{
LOG_INFO("Empty video frame arrived, index " << buf.index);
LOG_DEBUG_V4L("Empty video frame arrived, index " << buf.index);
return;
}

Expand Down Expand Up @@ -1106,7 +1106,7 @@ namespace librealsense
}
else
{
LOG_INFO("Video frame arrived in idle mode."); // TODO - verification
LOG_DEBUG_V4L("Video frame arrived in idle mode."); // TODO - verification
}
}
else
Expand Down
10 changes: 5 additions & 5 deletions src/linux/backend-v4l2.h
Expand Up @@ -197,17 +197,17 @@ namespace librealsense
{
if (xioctl(_file_desc, (int)VIDIOC_QBUF, &_dq_buf) < 0)
{
LOG_ERROR("xioctl(VIDIOC_QBUF) guard failed for fd " << std::dec << _file_desc);
LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) guard failed for fd " << std::dec << _file_desc);
if (xioctl(_file_desc, (int)VIDIOC_DQBUF, &_dq_buf) >= 0)
{
LOG_WARNING("xioctl(VIDIOC_QBUF) Re-enqueue succeeded for fd " << std::dec << _file_desc);
LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) Re-enqueue succeeded for fd " << std::dec << _file_desc);
if (xioctl(_file_desc, (int)VIDIOC_QBUF, &_dq_buf) < 0)
LOG_WARNING("xioctl(VIDIOC_QBUF) re-deque failed for fd " << std::dec << _file_desc);
LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) re-deque failed for fd " << std::dec << _file_desc);
else
LOG_WARNING("xioctl(VIDIOC_QBUF) re-deque succeeded for fd " << std::dec << _file_desc);
LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) re-deque succeeded for fd " << std::dec << _file_desc);
}
else
LOG_WARNING("xioctl(VIDIOC_QBUF) Re-enqueue failed for fd " << std::dec << _file_desc);
LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) Re-enqueue failed for fd " << std::dec << _file_desc);
}
else
LOG_DEBUG_V4L("Enqueue (e) buf " << std::dec << _dq_buf.index << " for fd " << _file_desc);
Expand Down

0 comments on commit c6a8d2b

Please sign in to comment.