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 57F1D2CA5 for ; Fri, 18 Oct 2024 20:47:24 +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=1729284446; cv=none; b=Mb0ZzNtmvLhy0d8nBJmdGFii2qGMGNGyaCKY5sMG3TxnZYayilcf1j6XxL76P0U4QDQZIZV+exNs5j7MV1K/tE1ZHVoLIVtt0c561ViDE9ENIbnwUXUrRsWd4OuXXpsnTRfBbtqoz74klFjQuHkvuB3t9MEA1I5qFli5/cgblps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729284446; c=relaxed/simple; bh=NfD8fPvBFqJ+Bwmzg6xrJ1U3rr8cry1s0S+hVZNz9O4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=UJI6ipSXiNO3eowV4qrjWkvPGQTWYaBcXA7NZ/6fLNjy7pHVv7+tmfEShh0ofSpGJH92QYZZbEH12LJpTJ0X9nCE7KzYkzVdBwE1HOgbMHtqT/OVPoF0wDqEkAz87OuQI4gidrrmFULcX4c3g9kDOQXvGvXjPYjHFD7u8gPabzQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=OinUBPtS; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OinUBPtS" 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 49IBfT29021848; Fri, 18 Oct 2024 20:47:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= GS1Oq3FUcmFG5PcZjImzqPlOyhYc0W1H2YX3pqZnlTQ=; b=OinUBPtSR3i1L1A3 42mntLKSXD1iR+3Ic3plqScoktyFrP+2/+ibg3OC542+XZ4f/fiD2hkO1F/xUZc7 kcZ9i7Up6k6UloJFnwawI7txDsH+AkRIkPEa/VSP/NGN5I06+xxTZRqMyIJt9OSr ye6vWWx5I3KjLfV+zhstxjRP0sem+3l2qsDQ2jsQiANkqvWRyqVEZkGIVBrFDwcB v7Vs15gj9Kiy2khHkS0Z/UameQXRNcPZR+Qen7dfmjZdJVRDY2oAH1pSHSITVs81 0i9jqpLaihTEU7ErBwnC1Hn75g2G7uYUi1YFYoBdQx1MOlgYNPtH5hIcN4KwAmvE Cr+oWg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42be8cb0e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Oct 2024 20:47:19 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49IKlI0c032122 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Oct 2024 20:47:18 GMT Received: from [10.226.59.182] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 18 Oct 2024 13:47:18 -0700 Message-ID: <45e167e3-dab6-691f-2ab9-056d92db4149@quicinc.com> Date: Fri, 18 Oct 2024 14:47:17 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH V4 05/10] accel/amdxdna: Add hardware context Content-Language: en-US To: Lizhi Hou , , CC: , , , , References: <20241011231244.3182625-1-lizhi.hou@amd.com> <20241011231244.3182625-6-lizhi.hou@amd.com> From: Jeffrey Hugo In-Reply-To: <20241011231244.3182625-6-lizhi.hou@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: di87O5uBnu234SbUdnUbi9YtZlKvMtFR X-Proofpoint-ORIG-GUID: di87O5uBnu234SbUdnUbi9YtZlKvMtFR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 suspectscore=0 mlxlogscore=756 lowpriorityscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410180133 On 10/11/2024 5:12 PM, Lizhi Hou wrote: > The hardware can be shared among multiple user applications. The > hardware resources are allocated/freed based on the request from > user application via driver IOCTLs. > > DRM_IOCTL_AMDXDNA_CREATE_HWCTX > Allocate tile columns and create a hardware context structure to track the > usage and status of the resources. A hardware context ID is returned for > XDNA command execution. > > DRM_IOCTL_AMDXDNA_DESTROY_HWCTX > Release hardware context based on its ID. The tile columns belong to > this hardware context will be reclaimed. > > DRM_IOCTL_AMDXDNA_CONFIG_HWCTX > Config hardware context. Bind the hardware context to the required > resources. > > Co-developed-by: Min Ma > Signed-off-by: Min Ma > Signed-off-by: Lizhi Hou Reviewed-by: Jeffrey Hugo