From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71D37C4363D for ; Fri, 2 Oct 2020 11:28:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3589F206DC for ; Fri, 2 Oct 2020 11:28:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LpZo9hsK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726090AbgJBL17 (ORCPT ); Fri, 2 Oct 2020 07:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgJBL17 (ORCPT ); Fri, 2 Oct 2020 07:27:59 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45DDFC0613E2 for ; Fri, 2 Oct 2020 04:27:59 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id y15so1381394wmi.0 for ; Fri, 02 Oct 2020 04:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nZaxcsHwMmqRPsyL6ppaPkTXtNppFwnVLVfBNIDn8RA=; b=LpZo9hsKVHJ/d3LgWdx2dR41bi0OJrzJHno8HKljIBBcT05uCIqKgnRUpcXxOKr9VT ICFFsTreZQX+y6q/d8z0ATkO2MGzW6QgUL4StOUpo6yBckf7mB8MhvZY4elJw9jwSG+i f6/hePK8HjwEDDLfAJqV9YSXPsLeYiFGvFGJGGn1aZA0v9zqS24LP00zrA/tlsFFz0Wt 2ECtUR98SSQFGoOzn5hSyzZ8ZMRUSu5u+U6KW2GhD7R+GrT5x7vJJWihJ7dpJ2XYfH+4 HAqYIAq4MkV6LNg4/xFfucK5VrSMj7GJO9e10hJWXghygWCam9ykYGd47q6CVC41Pcka pJSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nZaxcsHwMmqRPsyL6ppaPkTXtNppFwnVLVfBNIDn8RA=; b=Tw7CQoMeQAWYxkACdC3sIZ3wpQ+M9Fc5bxD4bA9MhuoFU8alZ88K2xR5Lz2+KBCTPj IZl/zLQ7rF5Y1cWFgH799xCL5B6ZP8s+fPGQwu0IIpF1n+dmCAzkNxmlhhFMm0cWLE6T d0GKS5DUj6xUnrfA+07aYqqhiqlEstGXaKgjfViBq/yU+LSLQPugvaN0ilmM6irQq/IE tIgR7AKR5Un1rr+CZgbYQcSlg1I2FoUVx6Sb0xeT5AJO+vrEyoB9dtOkbk9KMU7Svk/F KXCYB2b3nK7EExZ8cOI2bqW4m7VYN1BUnyyEs4WXW9fU+W4v6GK/PnIp1dRyxjTwMeek ZpmQ== X-Gm-Message-State: AOAM530Tow2I5hMUU3kQtoi5oK6eLmJzD5n8hOy/VVkn2cKFZo0g45oa pmWGPZIxgrEipemcUKTYZ0uSbw== X-Google-Smtp-Source: ABdhPJwzF6SLRHc3X27XrYXf2pJ/zyKCxeMIfZkKvKSF7aEcnbg1geeQMMFSeNwWSBugDYWKmZiGjw== X-Received: by 2002:a7b:cb8c:: with SMTP id m12mr2497325wmi.12.1601638077797; Fri, 02 Oct 2020 04:27:57 -0700 (PDT) Received: from [192.168.1.7] ([195.24.90.54]) by smtp.googlemail.com with ESMTPSA id k4sm1522245wrx.51.2020.10.02.04.27.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Oct 2020 04:27:57 -0700 (PDT) Subject: Re: [PATCH] media: venus: core: Drop local dma_parms To: Sai Prakash Ranjan , Robin Murphy Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org References: From: Stanimir Varbanov Message-ID: Date: Fri, 2 Oct 2020 14:27:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 10/2/20 11:06 AM, Sai Prakash Ranjan wrote: > Hi Robin, > > On 2020-09-04 02:44, Robin Murphy wrote: >> Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms >> for platform devices"), struct platform_device already provides a >> dma_parms structure, so we can save allocating another one. >> >> Also the DMA segment size is simply a size, not a bitmask. >> >> Signed-off-by: Robin Murphy >> --- >>  drivers/media/platform/qcom/venus/core.c | 8 +------- >>  1 file changed, 1 insertion(+), 7 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/venus/core.c >> b/drivers/media/platform/qcom/venus/core.c >> index 203c6538044f..2fa9275d75ff 100644 >> --- a/drivers/media/platform/qcom/venus/core.c >> +++ b/drivers/media/platform/qcom/venus/core.c >> @@ -226,13 +226,7 @@ static int venus_probe(struct platform_device *pdev) >>      if (ret) >>          return ret; >> >> -    if (!dev->dma_parms) { >> -        dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms), >> -                          GFP_KERNEL); >> -        if (!dev->dma_parms) >> -            return -ENOMEM; >> -    } >> -    dma_set_max_seg_size(dev, DMA_BIT_MASK(32)); >> +    dma_set_max_seg_size(dev, UINT_MAX); >> >>      INIT_LIST_HEAD(&core->instances); >>      mutex_init(&core->lock); > > This reintroduced dma api debug warning which the original commit was > addressing or rather thought it addressed. > >  DMA-API: qcom-venus aa00000.video-codec: mapping sg segment longer than > device claims to support [len=4194304] [max=65536] >  WARNING: CPU: 3 PID: 5365 at kernel/dma/debug.c:1225 > debug_dma_map_sg+0x1ac/0x2c8 >  <...> >  pstate: 60400009 (nZCv daif +PAN -UAO) >  pc : debug_dma_map_sg+0x1ac/0x2c8 >  lr : debug_dma_map_sg+0x1ac/0x2c8 >  sp : ffffff8016517850 >  x29: ffffff8016517860 x28: 0000000000010000 >  x27: 00000000ffffffff x26: ffffff80da45eb00 >  x25: ffffffd03c465000 x24: ffffffd03b3c1000 >  x23: ffffff803e262d80 x22: ffffff80d9a0d010 >  x21: 0000000000000001 x20: 0000000000000001 >  x19: 0000000000000001 x18: 00000000ffff0a10 >  x17: ffffffd03b84a000 x16: 0000000000000037 >  x15: ffffffd03a950610 x14: 0000000000000001 >  x13: 0000000000000000 x12: 00000000a3b31442 >  x11: 0000000000000000 x10: dfffffd000000001 >  x9 : f544368f90c5ee00 x8 : f544368f90c5ee00 >  x7 : ffffffd03af5d570 x6 : 0000000000000000 >  x5 : 0000000000000080 x4 : 0000000000000001 >  x3 : ffffffd03a9174b0 x2 : 0000000000000001 >  x1 : 0000000000000008 x0 : 000000000000007a >  Call trace: >   debug_dma_map_sg+0x1ac/0x2c8 >   vb2_dma_sg_alloc+0x274/0x2f4 [videobuf2_dma_sg] >   __vb2_queue_alloc+0x14c/0x3b0 [videobuf2_common] >   vb2_core_reqbufs+0x234/0x374 [videobuf2_common] >   vb2_reqbufs+0x4c/0x64 [videobuf2_v4l2] >   v4l2_m2m_reqbufs+0x50/0x84 [v4l2_mem2mem] >   v4l2_m2m_ioctl_reqbufs+0x2c/0x38 [v4l2_mem2mem] >   v4l_reqbufs+0x4c/0x5c >   __video_do_ioctl+0x2cc/0x3e0 >   video_usercopy+0x3b0/0x910 >   video_ioctl2+0x38/0x48 >   v4l2_ioctl+0x6c/0x80 >   do_video_ioctl+0xb54/0x2708 >   v4l2_compat_ioctl32+0x5c/0xcc >   __se_compat_sys_ioctl+0x100/0x2064 >   __arm64_compat_sys_ioctl+0x20/0x2c >   el0_svc_common+0xa8/0x178 >   el0_svc_compat_handler+0x2c/0x40 >   el0_svc_compat+0x8/0x10 > > Thanks, > Sai > Do you have the mentioned above commit when you see this warning ? -- regards, Stan