Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp936162rdb; Fri, 2 Feb 2024 08:21:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRkBtDrMMVC6uy3cGnt2HgiRpMvQpykwhpFIjkyhCuv+XP5clto34JNMgtqVjSfsKJ6Abq X-Received: by 2002:a17:906:a295:b0:a27:6e73:a248 with SMTP id i21-20020a170906a29500b00a276e73a248mr4578985ejz.68.1706890908161; Fri, 02 Feb 2024 08:21:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706890908; cv=pass; d=google.com; s=arc-20160816; b=MacvxRUIB/XzzOp1F6tzEcRI9rHOQnQPNg/CEwB48yFp+r2nlwzEt7qZLgN9Kp+5ss OixWByG9pYge6hDd/gmzjh0mHBBIr34xOI4KNeKvwKdCT7syQYb9jDnFXI6lMxloDd82 apEIushNaYFPiTMgtFJlMT1cgHd+X0gBJh9xSXBAU+WR0HMjHF4rvEjzSWsmMPULt2PO dBnObMeNE96ZTs4oDXRuLgtDWzVK78VqBNAtFkxioabFHJ634wUGovGzRm/3ioTfBOru +NPNR0yp/8ATzFd9a5l+vZ1PfwReYq6+QLzJNYzZnVXb5P8890CzAUDZRwuc8C2waMMx fUQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=QdOH44GqBNuJv7gNhF+H71j52RbjvAKIOcCjf68RgNE=; fh=q51vFPxYqhJlhtdLv5V99cvdvpOmixvfpyyDeTFWWP4=; b=HG/wEB3qctqVGvCrrcLeOFAjquAieSdkfyekHemWSNj1yC/VKLr6LBbqe+S4S1cpgF nKVWvdI/Y/kVaunO6khCHie7PSc5+sK7DdVj9OVzfBWI/DabDfkLr4vQrHPoeSpKk8dt VS/wGxGTY2qxXrZ9cTr4trikuMbfbLg832JNukeW+hwJI5ZOcTAYfcZgKSKVGV0L+Fi/ YYof2rhDpHctoTdh2xkN4Nb0M1bEuVzj+j64UwW6XpG71eSSzVyBQ8yuxHr3BOonISWV Mcv07e+RqRDGs48YXKQOmPxbMcnunPzX6bs0iTvMWnd3vWocD+qGyJmKmRAgT+757ioK zGnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ovroj3df; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50103-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUwdHJVVt8ZJIEvxZ0DIqur/G0SKQggR3rP3nKau0PJ3XVM/PKjMhxXBwI97JzEPgf8Rqzk5zyOwAmIBXUOsp/C7VZxfZeiL8b2EzNnbg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lg6-20020a170906f88600b00a3714c140b7si515831ejb.709.2024.02.02.08.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:21:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50103-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ovroj3df; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50103-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E64E71F2D8C7 for ; Fri, 2 Feb 2024 16:11:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7C771474DC; Fri, 2 Feb 2024 16:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ovroj3df" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB19C1474C8 for ; Fri, 2 Feb 2024 16:08:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706890091; cv=none; b=rC4AeFDD8bQe0lxjmRGCJ/R0DaALx1CJgRVw2j0R1sTIIwgJQ2ypSgv6WRYcXOJWvoBfZtTF45wgYx19aaMSMy4DNR5wnnY9B63eSM/i7RVBhc3zhPTkpU7zfzhMZv2uQ3tFxoXgRINcIk1rPYXGL2eB1AmWZFn26Gq6gpFpGEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706890091; c=relaxed/simple; bh=1Sy1DahY5LhmMgnq6h+UTVpAneW/WiqYKvKoRqACwPU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=U8VcGLs/oEMHudTQsriTvvqpPr+Oqn1TglgzBHfRNVTWcYhR+vDKe4vjfvoOqSXyRVG/xYv60KcX+L9PHqjnMDM3GDgRTE3HZVhVEBwrJUKhX90DQAe2/uE+NsRod3uuKWxRqIPgWgEaZE5k9JLHVecoVu91WGsYFzQ6kL91SCY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Ovroj3df; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2d0600551e8so27042581fa.0 for ; Fri, 02 Feb 2024 08:08:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706890088; x=1707494888; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QdOH44GqBNuJv7gNhF+H71j52RbjvAKIOcCjf68RgNE=; b=Ovroj3df70dPtuyRQBmahU5qlBI8SM2xLqy5+or/4w0q1un2pO9WshDLPXEJldH0tv NrlvfJNwXIo4/16XcF21XGQnQcDcTGfbIlmfDGiP8hk/DnKPATlSzr7ChLhy2g711qtJ d1XYNWoB0nmasoA/p916HY8K6E+3e1CbvmkVJLrq3v6PP25m+pJyyJBjk0VVnNXbxOf8 aU1gWuqfgbgXYoxnbBgSHzSj1LdwfkmVmE7Ep5a3OqjKC0VtS6wCS0ah9JOsMLihhMc/ 0sHzW7+2gfDr443MsP/4rJZtMvnrC76CRBY6g/GQMPvQqPD6peRpZm/81fFxEjkoOnsc 5Ocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706890088; x=1707494888; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QdOH44GqBNuJv7gNhF+H71j52RbjvAKIOcCjf68RgNE=; b=a0WEwrP6dgpW6AHYBAmo0Hxwts4XWsplqcf2cqvpklJreWebiKAAgylQ1PTzSrWk5w jPhQZ3c8urTCibtJ3dSWzBoxEtTb5X12kXWyae4h5Fw4eaiamyi4AxH5lrdkz+AMZoj1 Esmluj1GBOA+RGaZtwIkxRPDsUJaJnn2JiqUsA9O+gO8u8NjADiEQ2TOdBet5wozeRrG EdBeePS55lsehS19+ifXhh92oL176jtld2Fw3k1sjKEHCpb5xzH3/x33NjhxhAYirMfo opp+zvYsZMimc9AZ1oHDHcSNzn3CNaooqPGxKHbPUy6GdUAHXwBJj5nciLcJho1i2RsK ytyg== X-Gm-Message-State: AOJu0Yy0dAz+hLOahr8Ml4ykAVN89jjHMmGIk9/g0H8eYZl8FYLczfs6 WFbCbQ2Ju2HnnUB322DPDFXsdIlPhhmlKMdcpc8L37Giauey5W7E+W19L3UQyUQ= X-Received: by 2002:a2e:7817:0:b0:2cc:ee90:e565 with SMTP id t23-20020a2e7817000000b002ccee90e565mr3978358ljc.9.1706890087987; Fri, 02 Feb 2024 08:08:07 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXqPx1EgWdIp0lFo8BPwv2/q4cv9bzZXeZ/oyJT3AWNycWfGQEXvl4Ls9weA+6/2Pls2WfzCdZC+3RmSm++Wol4l8sJjZC0e3+dc0vch2PewDnGfg7FbJhA7+q5XJ8NXNWWhkPC5lF44NzD9uhvpohWfJ0taE2FxmByIxtl8DqNF3Xw3/Ai7BYbiwaR1kX9BFPxq/jvvf8IGcs11ThNXN/BXeTcnJt0H6apnER5n4/ERCE7Jzie5Cah9B0ZUb2BdYaDVxovzpBw6dckW6fj9C4sR/LoPX2/U4wfUGmVeQJh97iGZleLlA59+wuWwR9+o+dEwUP9J85yMVtZbKjOQThb96ZR4rjpBI/BKNb1KpO2ybgZoYAsX+Rz+EmhMbPcX41QxSI7jnpHGuILgKzKilKG4u8AIaocwTBc54vLTzTTLGY= Received: from [192.168.1.20] ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id r3-20020aa7da03000000b0055ef0105f2fsm928458eds.80.2024.02.02.08.08.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 08:08:07 -0800 (PST) Message-ID: Date: Fri, 2 Feb 2024 17:08:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] dt-bindings: media: Add sram-size Property for Wave5 Content-Language: en-US To: Nishanth Menon Cc: Brandon Brnich , Nas Chung , Jackson Lee , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vignesh Raghavendra , Darren Etheridge References: <20240201184238.2542695-1-b-brnich@ti.com> <1209b7cf-5be2-4107-aa6b-d67a32ea3737@linaro.org> <20240202125257.p4astjuxpzr5ltjs@dragster> <8091a8cf-c1c0-49b0-b136-1ad0d185aa6a@linaro.org> <20240202155813.szxvi7bfp5xh7rvw@babble> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkr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+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20240202155813.szxvi7bfp5xh7rvw@babble> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 02/02/2024 16:58, Nishanth Menon wrote: > On 14:56-20240202, Krzysztof Kozlowski wrote: >> On 02/02/2024 13:52, Nishanth Menon wrote: >>> On 11:47-20240202, Krzysztof Kozlowski wrote: >>>> On 01/02/2024 19:42, Brandon Brnich wrote: >>>>> Wave521c has capability to use SRAM carveout to store reference data with >>>>> purpose of reducing memory bandwidth. To properly use this pool, the driver >>>>> expects to have an sram and sram-size node. Without sram-size node, driver >>>>> will default value to zero, making sram node irrelevant. >>>> >>>> I am sorry, but what driver expects should not be rationale for new >>>> property. This justification suggests clearly it is not a property for DT. >>>> >>> >>> Yup, the argumentation in the commit message is from the wrong >>> perspective. bindings are OS agnostic hardware description, and what >>> driver does with the description is driver's problem. >>> >>> I will at least paraphrase my understanding: >>> In this case, however, the hardware block will limp along with >>> the usage of DDR (as is the current description), due to the >>> latencies involved for DDR accesses. However, the hardware block >>> has capability to use a substantially lower latency SRAM to provide >>> proper performance and hence for example, deal with higher resolution >>> data streams. This SRAM is instantiated at SoC level rather than >>> embedded within the hardware block itself. >> >> That sounds like OS policy. Why would different boards with the same >> component have this set differently? Based on amount of available >> memory? This, I believe, is runtime configuration because it might >> depend on user-space you run. Based on purpose (e.g. optimize for >> decoding or general usage)? Again, run-time because same hardware board >> can be used for different purposes. >> > > Why is this OS policy? It is a hardware capability. How amount of SRAM size is hardware capability? Each hardware can work probably with 1, 2 or 100 pages. > Traditionally > many similar hardware blocks would have allocated local SRAM for > worst case inside the hardware block itself and don't need to use > DDR in the first place. However, for this hardware block, it has > capability to use some part of one of the many SRAM blocks in the SoC, > not be shared for some part of the system - so from a hardware > description perspective, we will need to call that out as to which > SRAM is available for the hardware block. Just because more than one device wants some memory, does not mean this is hardware property. Drivers can ask how much memory available there is. OS knows how many users of memory there is, so knows how much to allocate for each device. > > Why would different boards need this differently? simply because > different cameras have different resolution and framerates - and you > dont want to pay the worst case sram penalty for all product > configuration. Choice of resolution and framerate is runtime choice or use-case dependent, not board level configuration, therefore amount of SRAM size to use is as well. > > Further, Linux is not the only thing that runs on these SoCs.. these are > mixed systems with autonomous operations of uC cores who may or maynot > (typically not) even need to communicate with MPU to state which part of > resource they are hogging (hence the board level definition). OK that could be the case but I could also say choice of RTOS or any other is also board-independent. Best regards, Krzysztof