From: Takashi Iwai <tiwai@suse.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: uvcvideo: Fix spurious DMA max segment size warnings
Date: Thu, 9 Jun 2022 10:22:46 +0200 [thread overview]
Message-ID: <20220609082246.13182-1-tiwai@suse.de> (raw)
As default, the DMA max segment size is set to 64k, and uvcvideo may
overflow that size easily, resulting in a warning like:
DMA-API: xhci_hcd 0000:00:14.0: mapping sg segment longer than device claims to support [len=98304] [max=65536]
Explicitly set up the DMA max segment size for avoiding spurious kernel
warnings.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/media/usb/uvc/uvc_video.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 1b4cc934109e..25aa6e6a6906 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -2160,6 +2160,8 @@ int uvc_video_init(struct uvc_streaming *stream)
for_each_uvc_urb(uvc_urb, stream)
INIT_WORK(&uvc_urb->work, uvc_video_copy_data_work);
+ dma_set_max_seg_size(uvc_stream_to_dmadev(stream), UINT_MAX);
+
return 0;
}
--
2.35.3
next reply other threads:[~2022-06-09 8:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 8:22 Takashi Iwai [this message]
2022-06-09 9:18 ` Laurent Pinchart
2022-06-10 8:57 ` Greg Kroah-Hartman
2022-06-10 11:13 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220609082246.13182-1-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®