From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 4F2672E7BA4 for ; Fri, 18 Jul 2025 17:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752859614; cv=none; b=tAs3GburfZh3/Zi0diJlqbagJV5cjt58dFlrRSzy2wM7UXG4uuMUYFr/UGgkF75H6GACTwdnzhGipqAIZ7CMPz7Mrk52cx5CRosYJ6OwJkAXP5eo8XSVycgtDleCJoJiYokeliclnfzWvyUobRGAn4IUpcFydE6DTo3g1Ut/wRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752859614; c=relaxed/simple; bh=ZQApwEQ02/d8oHeWrr7hvbCAGhlqib0c03SG7L+E0gM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UrFg/yOCBrmwxqzIkcqOW+x5hKJKfm8Qfmtem2t1BfynGKcfTlR/TkL6dyyBVuS6UZBKuYWzthbhdfazisTqhyvEvrQhMUIxEjTF3arlt1//FvS5vPACgigXmKF4D1aJTLpve2esxdq+rmIFKhoOMsmp6LCg3ypMzCO+BgKR0fc= 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=WkhBU3LM; arc=none smtp.client-ip=205.220.180.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="WkhBU3LM" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56IH79Yc008788 for ; Fri, 18 Jul 2025 17:26:51 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= fv+mEh4f0MhcLN21Yyg9tehverC4r+K2gbgLijocXdM=; b=WkhBU3LMpFoMdlPM vAqhiFUJdo1Zy9EYgRDMvp+udPTuHcKx9lPDzeI2ZXq/5cm7elI1QDI9LLxeG7gS hM6o9dZC2AWKDDE9ER2UAtPb/2eWJ6s7I3lTT8VDrIQ8Lz+8/oZgNsOnR6tkiv3M 94c+I8oV1nqbS5IF9e9qGIAskI1hdNYx8UqAIqikMGRgjMivqEVAGMXOOwgcHFDw 86IzJ625OAki5wWOvc3cxljvy5wf4/Gn9QN7kvCjiE5iYaW7iZNCxeJgbNqMtIKR jnNnOF8dKB9rBjiPu7wk4qG9V5hUF7oHJKiK64hHUIbeNs/4uKN/X6SZ8025kYzP 0hTlwg== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ufxbcems-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 18 Jul 2025 17:26:51 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-75ab147e0a3so287944b3a.3 for ; Fri, 18 Jul 2025 10:26:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752859610; x=1753464410; 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=fv+mEh4f0MhcLN21Yyg9tehverC4r+K2gbgLijocXdM=; b=ehqYhWZ1SHRu8GlA6UVIBUndqx9oI/zZyWaQZBGkNAuuN7S0CeObrqMwJ139JuXgDp QDzNsljtjP1JdKmOovCKqHmJXNP2L23FWnfnxsPs7KniO5aC3VIiiX9x864eFh47dux+ CDh+lWNoldjGfocA0jXmXYfwdoP3X2k6TflAkjeMmUksdWBG26XWGm2VxHufrj2zu+tV QjAZL+js/TbL+egcTJroK9IapSHrp+BOhOgbvXbwId0DmbFrCXLeLvKEnO3UPKmD8NYg K4GT9oNrirXeAryYSGVyuLrXftB4CIRLpgdOvhaye/NuQ4JzrV2Rcc7g9pXJymrOSCA/ DWxw== X-Forwarded-Encrypted: i=1; AJvYcCVuZmYPBXzt5a4vZGcvY6TzDSfVfJ9Ct0xV1D7f6ZBT8kms3Ht+QdSdNr+FW+S8H11L78X9/5SW8ELY32k=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4b/RK+3CIsp6l6p3Ke+d/B9B5ZD6sVThkvHDgJ8g3tnBAB+iu ErQ7owjLnTnuISsqvdUw8ieTA3HUwniRE9/T49ZRxw2wJsF7wMO1d7YUt83bIcWsoQjoKf5PqWi qd2JKaxrSgTbjzABB6vjHMMn5g0hdfsmx8WXxQFwW6hgcyV272Smmp5NN7x/a9UqarDk= X-Gm-Gg: ASbGncsbrrmzgMNOlYSGhpAQewwvP+oyZ4L21gZQQ0RPN45D3L+pBxLeFRMtBRi/HzY 1XitJs9b3a1UvFsUMAUfiVORgNpphaGx8p2ZX2q2+KBS9HJB1x0cnWlyTl59GF1K5idNHBcwXb2 RppJ/NYf5Z/b8xAJHu5VoHZYEIG15QBSGm4zpHpjpRS6Y44SITroKWiPcmsDNw6NBLRM/+dJu0h a27n2/VZKj7qNtmmBBnO/R5/7Dv+7aPZGobegiZOOsAN0HThz1xsb35txrhHXozq7KtyYbr4rdJ IiRBkdyVq7qXDnzQwV0xy3TKm7nPSgI/SS0C4AZghjWd0CQHowlnOIB6tEaDn2a/95+powkacE7 k1Y8SeWyej6QgOw== X-Received: by 2002:a05:6a00:3392:b0:740:9e87:9625 with SMTP id d2e1a72fcca58-7572267d1f8mr16458203b3a.4.1752859609729; Fri, 18 Jul 2025 10:26:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqQ9S63kSJn6y6OyUDc3uTWz9C+4cH8naBY6AZisiTbM1Dmrh1Aqbj7AEM/eK1YFdABEhA9g== X-Received: by 2002:a05:6a00:3392:b0:740:9e87:9625 with SMTP id d2e1a72fcca58-7572267d1f8mr16458162b3a.4.1752859609159; Fri, 18 Jul 2025 10:26:49 -0700 (PDT) Received: from [10.226.59.182] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-759cbd67ed2sm1530796b3a.135.2025.07.18.10.26.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Jul 2025 10:26:48 -0700 (PDT) Message-ID: Date: Fri, 18 Jul 2025 11:26:45 -0600 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 v8 04/10] accel/rocket: Add job submission IOCTL 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 References: <20250713-6-10-rocket-v8-0-64fa3115e910@tomeuvizoso.net> <20250713-6-10-rocket-v8-4-64fa3115e910@tomeuvizoso.net> Content-Language: en-US From: Jeff Hugo In-Reply-To: <20250713-6-10-rocket-v8-4-64fa3115e910@tomeuvizoso.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: s12xyRWOpiiu9V9R1Yh7oDL-mVHBAn_S X-Proofpoint-ORIG-GUID: s12xyRWOpiiu9V9R1Yh7oDL-mVHBAn_S X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE4MDEzOCBTYWx0ZWRfXzhILL2m2iwbR TmZpAWGtERk5Nd0WaMTP/+UZDZk/SV7WHYu3s/t+mDVvPGezus0PQksoOdHwqKPbF2kBtvGhfxi OsjlleMcqYmeWXcn/8hEKG0mDJSfjKr3rzuUIryk8ZuhxbuuxaS6DjmUDNcHnH0K7XQX4B7nxdW j2AW8vrUtWmUK1o3PIvqgez3x4AM/cGKXAO2r3E9yDFMdFz1kmS4199lZJt3FbZuj4WctQAZ5I2 5ozispsr8Xmt9Rg6qEmIaNZABzKKkd6mO3bxvEAs4zBnc9iXAn0BCyKCCKTfIYDeHToHeUhZfNF XmSC3tPTwG61AKtBRp4rSbZuYGWGCWyci4M0W5W4uVSc0R8dd6RyOzoM4JrvWIUTpo/fkExJUJc CnNfrWrn9+4mdhaYTNfLeOjfK0MjU2N2R8Cokw/u8RKctabqau8mWXZCp8Zb5nXTDUCo3iYr X-Authority-Analysis: v=2.4 cv=Xc2JzJ55 c=1 sm=1 tr=0 ts=687a83db cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=DISFzqtZAAAA:8 a=EUspDBNiAAAA:8 a=OV0_J1LtQ3fB1FIpcGAA:9 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv: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 bulkscore=0 mlxscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507180138 On 7/13/2025 2:38 AM, Tomeu Vizoso wrote: > Using the DRM GPU scheduler infrastructure, with a scheduler for each > core. > > Userspace can decide for a series of tasks to be executed sequentially > in the same core, so SRAM locality can be taken advantage of. > > The job submission code was initially based on Panfrost. > > v2: > - Remove hardcoded number of cores > - Misc. style fixes (Jeffrey Hugo) > - Repack IOCTL struct (Jeffrey Hugo) > > v3: > - Adapt to a split of the register block in the DT bindings (Nicolas > Frattaroli) > - Make use of GPL-2.0-only for the copyright notice (Jeff Hugo) > - Use drm_* logging functions (Thomas Zimmermann) > - Rename reg i/o macros (Thomas Zimmermann) > - Add padding to ioctls and check for zero (Jeff Hugo) > - Improve error handling (Nicolas Frattaroli) > > v6: > - Use mutexes guard (Markus Elfring) > - Use u64_to_user_ptr (Jeff Hugo) > - Drop rocket_fence (Rob Herring) > > v7: > - Assign its own IOMMU domain to each client, for isolation (Daniel > Stone and Robin Murphy) > > v8: > - Use reset lines to reset the cores (Robin Murphy) > - Use the macros to compute the values for the bitfields (Robin Murphy) > - More descriptive name for the IRQ (Robin Murphy) > - Simplify job interrupt handing (Robin Murphy) > - Correctly acquire a reference to the IOMMU (Robin Murphy) > - Specify the size of the embedded structs in the IOCTLs for future > extensibility (Rob Herring) > - Expose only 32 bits for the address of the regcmd BO (Robin Murphy) > > Tested-by: Heiko Stuebner > Signed-off-by: Tomeu Vizoso Reviewed-by: Jeff Hugo One optional nit below - > +/** > + * struct drm_rocket_submit - ioctl argument for submitting commands to the NPU. > + * > + * The kernel will schedule the execution of these jobs in dependency order. > + */ > +struct drm_rocket_submit { > + /** Input: Pointer to an array of struct drm_rocket_job. */ > + __u64 jobs; > + > + /** Input: Number of jobs passed in. */ > + __u32 job_count; > + > + /** Input: Size in bytes of the structs in the @jobs field. */ > + __u32 job_struct_size; > + > + /** Reserved, must be zero. */ > + __u64 reserved; It does not appear that this field is needed for padding, and I don't see the rest of the series using this. This could be dropped, although maybe you have a use for it in the near future?