From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2856F1F1315 for ; Fri, 18 Jul 2025 17:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752858889; cv=none; b=B4LbqkuGQcg3w+deyre/Gzt0gCQ91V6poNEtFM8nqqgR6enQiA6R755XBjZfnh3jkWD8lomJakqtNUoAF/oNd5/AiMVUeakO4/mmyTwunvB8iwMbE3ev5Pok9x1We8bI0jvlkViOuG+g+rjqcfGnpnGAUU9HnnBk/XNzHlW05NU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752858889; c=relaxed/simple; bh=tmfDngngXq6fj8ZEFrgrno4R29+ACZBn3BYWv0UP28A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CHfqN+shd2WZBe+rRLE5JGWf9soS32uiRwWj35wyWjOx+GT29toyoXr2oKHAx2eD6adS8R4RqLSBlZ5COvbpUX08iH0gFUZgPkzia17/DP1wZ45GsH6HynO8QXW+hMNHZu1lDPr0p3ApfO6uV+qQOX+MUdPeNzc3Bg67mCDpKek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=G9HONGQ2; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="G9HONGQ2" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56IEbkuP022268 for ; Fri, 18 Jul 2025 17:14:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hvQRsE2lG7WyIIQnwV/DeD9T4vuk4piXmEgdbjYc460=; b=G9HONGQ2Qa2uUbLZ VJY4Lqvyrv1n/8Lykdjk8ImdB8+wf9SYMMzho7gbPSwHGSDoxrUBE0CiNNwxX9tU eiuk2i03SYOOUMR/fzdvSMV4XqbJNDyDuvShdivyYxYc+NZo6O9pnZkJG20id4xH +GQ6CivijZWO/Yf86g+q8FR696sTRXmGqNM957Ntrk/wR/1dcjZG442XRPYcu9Dl 2t6TTIi6n2flM1t9PB5QfE+BihzXzRoIFag/A/QdGofEojZLvcAH6xsAgHzN8Kev m3Vck5j3SQIkQddI4fbh5TebcaUGQBnIOFC3p8FE571tDb26sN/rlJWab2c9WjXO d5BCRQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wqsycdab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 18 Jul 2025 17:14:47 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-311ef4fb5fdso2839575a91.1 for ; Fri, 18 Jul 2025 10:14:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752858886; x=1753463686; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hvQRsE2lG7WyIIQnwV/DeD9T4vuk4piXmEgdbjYc460=; b=hAKk3//e2MzYjds3Sd96t3pqD2925bIbDg6k6TBpEriTc4SfU5e7u3e29PbRX8Qfa2 WBY4QOX9aJ5Xl3x5eIvLXNapTUZrgk7WBY7VDqaxPfSI5/CunZ9BDQMQMmuM0FzeNDYf b1PnGmyiCVnU9XDs7ApsG7gZiAYH6ts3O6ZL5HcQ8sxrrJwAdrBI8Vm5sXcTBLFnz4aS UYEOkIlr5e0Yx+wpW89E5hZxuefcR8jCDA/1Co1eO6+9ig/8EXN+SrSZPzJ+9bTciTlV 7uF3MsG9/mXMPWtLQumfaWZZdApY+6zk7H7YJjtG/5C5qD88Xyd+Dw0JvnrE6oh8npdA Vegg== X-Gm-Message-State: AOJu0YwJZKDe/6kmfAz3gRwkeWLl7j/wHFm03BqtrpfNDxALi54S6wOO yUevmVW82jmkHBCK1hBmO8w7JO6OwAs+lXagubMXWo3Ota30d6oa3XWzANWJqTak4E6k8GhoEYy Ztk5ivuVmErILvbhYJaKoszn+dAibmbQfztlMjJ8nZ37Wq+OdWEt2P3VPGRNYi50I X-Gm-Gg: ASbGncv5aYUDXQ7vrGIarA9CQsMQ7zNcV7cp45Z/Ku5y2O5BFj/MR28OJhYy8vGXeUn nHNtWgzm7AviQDwlHTN8QlAbRKtuHtkmE/tW6GT8DwePfem6DTaWwu4QqTvles/JYwBjUtxieeV y5wkrC6GzKEX3yFwqBZsSMxWV8vFBITFCBqxcbd87kXGAGnH9ON57VG78SUS6LLfNdFI2nG0D4a Ffhq8iCMycNMribycllWZVmMrYaB8NH0/hrMJjftSuTTSftyqQ7aXeOFyZiTBQioAsIctxO+rbk /CaDBSVMZA9fwAjuEhrSODmVQuZhPK47o+mW35XgEOk/eWp/qb3k8Kp0WB2aiJAmAQbLbCM9z3z Bhyp6lbvRdUlXrw== X-Received: by 2002:a17:90b:48c8:b0:315:b07a:ac12 with SMTP id 98e67ed59e1d1-31c9e6f71b8mr18347587a91.14.1752858886386; Fri, 18 Jul 2025 10:14:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAZ4uYoT0jpgwok+1LqJLQaSu3L2fEp1diUxE597ewVDpbjd87lEWbuWkSUsEweCpZR2VK2w== X-Received: by 2002:a17:90b:48c8:b0:315:b07a:ac12 with SMTP id 98e67ed59e1d1-31c9e6f71b8mr18347517a91.14.1752858885895; Fri, 18 Jul 2025 10:14:45 -0700 (PDT) Received: from [10.226.59.182] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31cc3e5b56fsm1593934a91.16.2025.07.18.10.14.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Jul 2025 10:14:45 -0700 (PDT) Message-ID: <7753e1e8-5e2d-4d8b-8a46-a6fbc58a144d@oss.qualcomm.com> Date: Fri, 18 Jul 2025 11:14:42 -0600 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 02/10] accel/rocket: Add a new driver for Rockchip's NPU To: Tomeu Vizoso , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Oded Gabbay , Jonathan Corbet , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Sebastian Reichel , Nicolas Frattaroli , Kever Yang , Robin Murphy , Daniel Stone , Da Xue , Philipp Zabel Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Robert Foss References: <20250713-6-10-rocket-v8-0-64fa3115e910@tomeuvizoso.net> <20250713-6-10-rocket-v8-2-64fa3115e910@tomeuvizoso.net> Content-Language: en-US From: Jeff Hugo In-Reply-To: <20250713-6-10-rocket-v8-2-64fa3115e910@tomeuvizoso.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE4MDEzNiBTYWx0ZWRfXxyFMsFCeS8gb pbZ7ADGSfqM4y9F6owthRooDI1TQ7t3jFMF/wv6yOERG4IYTGOVVaaP1Ts99MLPZNx2UcM4vYLg WKv8KaeXY/SVg8HDEXzAEYFtCYzfn9PE3oaqOeWX9I8GzK5k1rOu3s2QAuEZV4ZvV9+FR9vM2UM R9BT4bY5avG1cPtq7JUnu0PD9TIfEgvyEWhbWPqHCsCybBka9hRf+TuadbNKt05Zuc+cKuSr+fR NEPw4ZU1GkpyN7FDO+8f56D/lWLG7FnCEfckW8QYmggtCNAqZoPq/dyvkGH0EsvOttd6lNfGBkJ EQFXnxQfIVE6F9JiBkNAvGGEbw1GEdjJdRg8MGWKqnJh54I2z4CRxROu+QyYcmo46KA+VGquFAy 1sL11BJzP3fs9Js4ryAD2RCAOF1kBsQeyrQ4Y6i4V3ZbP336fGPUNgfZ0THLdXFd6S9c5E3p X-Proofpoint-GUID: 640ybdIFuIhn2eQMdpDrBDPFSJlrxs0v X-Proofpoint-ORIG-GUID: 640ybdIFuIhn2eQMdpDrBDPFSJlrxs0v X-Authority-Analysis: v=2.4 cv=McZsu4/f c=1 sm=1 tr=0 ts=687a8107 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=VwQbUJbxAAAA:8 a=DISFzqtZAAAA:8 a=EUspDBNiAAAA:8 a=V6djkQ_TFPnTOxwyQKcA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 a=aug85vrO5LANNmmtkfAW:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-18_04,2025-07-17_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507180136 On 7/13/2025 2:38 AM, Tomeu Vizoso wrote: > This initial version supports the NPU as shipped in the RK3588 SoC and > described in the first part of its TRM, in Chapter 36. > > This NPU contains 3 independent cores that the driver can submit jobs > to. > > This commit adds just hardware initialization and power management. > > v2: > - Split cores and IOMMUs as independent devices (Sebastian Reichel) > - Add some documentation (Jeffrey Hugo) > - Be more explicit in the Kconfig documentation (Jeffrey Hugo) > - Remove resets, as these haven't been found useful so far (Zenghui Yu) > - Repack structs (Jeffrey Hugo) > - Use DEFINE_DRM_ACCEL_FOPS (Jeffrey Hugo) > - Use devm_drm_dev_alloc (Jeffrey Hugo) > - Use probe log helper (Jeffrey Hugo) > - Introduce UABI header in a later patch (Jeffrey Hugo) > > v3: > - Adapt to a split of the register block in the DT bindings (Nicolas > Frattaroli) > - Move registers header to its own commit (Thomas Zimmermann) > - Misc. cleanups (Thomas Zimmermann and Jeff Hugo) > - Make use of GPL-2.0-only for the copyright notice (Jeff Hugo) > - PM improvements (Nicolas Frattaroli) > > v4: > - Use bulk clk API (Krzysztof Kozlowski) > > v6: > - Remove mention to NVDLA, as the hardware is only incidentally related > (Kever Yang) > - Use calloc instead of GFP_ZERO (Jeff Hugo) > - Explicitly include linux/container_of.h (Jeff Hugo) > - pclk and npu clocks are now needed by all cores (Rob Herring) > > v7: > - Assign its own IOMMU domain to each client, for isolation (Daniel > Stone and Robin Murphy) > > v8: > - Kconfig: fix depends to be more explicit about Rockchip, and remove > superfluous selects (Robin Murphy) > - Use reset lines to reset the cores (Robin Murphy) > - Reference count the module > - Set dma_set_max_seg_size > - Correctly acquire a reference to the IOMMU (Robin Murphy) > - Remove notion of top core (Robin Murphy) > > Reviewed-by: Robert Foss > Tested-by: Heiko Stuebner > Signed-off-by: Tomeu Vizoso Reviewed-by: Jeff Hugo