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 B5E803B9DB7 for ; Fri, 27 Mar 2026 10:37:13 +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=1774607835; cv=none; b=tJzqjGrRn+hCzH3jH1DRkpmJe6ld6ToOz+JOfpNSlYfHna2/ywSZQI5P1mfr5sUCn3TWkGQT5BBAoDs24dMkBk0Jazf/Ceggx3g5d9pAE18Y7AXOFNT9dDHoWtyU6cKYI760fabvPmWcDZZnTtm6XpHjJ+cB/wNbFOCqDhQJgCk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774607835; c=relaxed/simple; bh=2WWz6PCT+kY+/BNdNJEg2/Qme6Ui7DX/fyXIjEpSeh4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ug+mYJn7Zj2n06q4jH3Hz4YesZVO4+9CNxEqpIB1DqtPc97au+apw80rWA4njpqAGEkftC9ahl0t0ZhItSgIgIyLe8dWIA4huSsScIrcHqcyA//jPUlND5GblPaC/BbhehuvO4tunGyHLMBMWBzZkXGBTXwgSoCN+BzKQlwfL4s= 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=gvDGaJyq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UQOYR2tZ; 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="gvDGaJyq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UQOYR2tZ" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62R6wEUT1710544 for ; Fri, 27 Mar 2026 10:37:13 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= KXK+Mf/ZrsGiJRXbh5eHrmVzB3+0zk0auj0U1dEWne0=; b=gvDGaJyqN1zcEZab FgSvh2zYseGKWm+h7p84fHOeOhCc2jNBKEbRnOu3dD52bB4B+PeNfdOffGdwKNaf ip5zm2EfKzPKlNRbJhTLDpNtZKnxT1JCcuUnbEDS+IzYIyuMvLg2rjCsOI2zunrQ ujrNwEXkKp9gqwROuM4Kr5gPHLItgUhN9sOWZsDygdOSQfdnd3gsq+GweNoVT8IS UpZSeev8TP3HXtok2lcdJmY5kopMlJgQgLRSGBNTGkH6wrBMBOI2cFPChyA2C8PI lBhiYFng2ami4F4l45Ng4rqmBi+s798nN2dOAE0xZ6rx3JcUa7x1AUPu2B/mFAqq eN4Jsg== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d5bxvjm4w-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 27 Mar 2026 10:37:13 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-50943e69b08so6054941cf.2 for ; Fri, 27 Mar 2026 03:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1774607832; x=1775212632; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KXK+Mf/ZrsGiJRXbh5eHrmVzB3+0zk0auj0U1dEWne0=; b=UQOYR2tZn47ArJV8TySjAmGY2G7xeyN6AKe+CLdsxG32o7edu/BDOq/eo3oDUqyuLL 29zcRbb2IFeamB2TMVJgtQ3Uq9J749Fzq8++Y7hk2UttInoNF8hxBZ6PVz2+aFuUbF0R 2dR77U+R+tMB8C9wlFZRheULPw6FDr1D+ctrgr7NTb4xAsUswYQV5g/T8HQMUH7VsgLQ O1G/xspSNCL34k6w2SfmSJ9kLJTf8eNajbTgbEW4ubRr3a66yoqBWa4ntgi/tnTpQec1 UdiM43C1jKXo3RWXxKcR4FCUspUAgDekDMFOi1UniGNrGcg044m7sqyHy6PHpR+/M+9j wRDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774607832; x=1775212632; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KXK+Mf/ZrsGiJRXbh5eHrmVzB3+0zk0auj0U1dEWne0=; b=AH6ZA2UTQa76cBvvX4ERhj17hdHsnsFo6+IRwzbgC9r1VmqJud19mB7jMDjNihsgeo 72b+rccBwwU7YJQhostH9pvP2jN0dCT3AzzjW1jj/EbcftNZDXW2QSIDRgWk4U9RE0SX B0ULedkfXN41vszVmYIg9mJa9+sknHX7w0SYGVvVuKskXeSlL2Lbes8x1My6JLzWvUMu OLqmqv7FF7sV6GkvBprnfIVvArhKBSkXlbLmnWKSUdCygFq4rAg8iMlqAzkKLfyHSX39 XvoMLHm04bmRQox4sWXFWheEN1lVVm4HzWB+PRVgClHHXeOP0KIh6VbcAfnovum7oJcD 7DTA== X-Forwarded-Encrypted: i=1; AJvYcCUOMBD4C+OkrSndLTIu7xk+9id5QUyvHExzRpEGx5jrnFEi8YnF55bJG7/YXnH8aL/yyhwYR1R2vuL2W3g=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+oZNqAGAsISwrSI2WVaAX2UkiOAaekXQWkYCGOIADyUNh5iUt VN9Jeor1uOks3+fZ9BNE+meiot7U8cyPVYqmUNOOqSDNsjtlJqYDFGS/eNREtv0YhbKkt7wg1Eu DJHdSfRPhFyBd+hWSjr0txh+J3Ojma8wl93wL4aJ3y5faotJvH9wj3eoxsqj25wdipHI= X-Gm-Gg: ATEYQzyK01ri3Xnd30vVJW3lk3Qy8PBW5C1cYRtRKzKGSrBij2vgwGVUZPzPf7l9ke+ /A7O0IAJrcZwdSxYV+R5vFwO+tXFVphX7uKIRn4CaiuEHVSGikJfBTVWO7isHi+xk2YCpuoT4dX 3En2w6VSSriJHQXxJBSnq1mcL4UcBK/BMUJahe994rtweSaxOV8JMEz8DXU3/1Vw2pVd3+JMYhL ovp2f9O97IOrvV33k/7fuZIsEYuH1tSpWuO/ziF1jGxPz4PlNj1d6bpqzNiOD4iYSrwoFfvddPW I49XIVaN5nPyCS78BF67Negg++lE/2d45/4N4xyEMB8M7XuhWBh7GLUWUdzxjtAccACcZUw5Ysl tS1cgnD0ooPzup8O8lNp/6OlWMP4rRTLCbTNCwBmdsdOZcRa77Ta6Mb4UAo9owxmC5xOoY+Oeex FY3W8= X-Received: by 2002:a05:622a:17c7:b0:50b:3489:5495 with SMTP id d75a77b69052e-50ba3ab19bcmr16602651cf.8.1774607832097; Fri, 27 Mar 2026 03:37:12 -0700 (PDT) X-Received: by 2002:a05:622a:17c7:b0:50b:3489:5495 with SMTP id d75a77b69052e-50ba3ab19bcmr16602371cf.8.1774607831654; Fri, 27 Mar 2026 03:37:11 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b9b2044274dsm226449466b.59.2026.03.27.03.37.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2026 03:37:10 -0700 (PDT) Message-ID: <4a55d9c0-4138-4905-a736-01b966670a9b@oss.qualcomm.com> Date: Fri, 27 Mar 2026 11:37:07 +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 08/16] drm/msm/a6xx: Update HFI definitions To: Akhil P Oommen Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Rob Clark , Sean Paul , Konrad Dybcio , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Marijn Suijten , David Airlie , Simona Vetter , Antonino Maniscalco , Connor Abbott , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann References: <20260324-a8xx-gpu-batch2-v1-0-fc95b8d9c017@oss.qualcomm.com> <20260324-a8xx-gpu-batch2-v1-8-fc95b8d9c017@oss.qualcomm.com> <30a4cdad-47c0-43f0-9327-04c28eac52ae@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: aaobMpVaSuQ1LXX8EptPbMRhmIDIZd9r X-Proofpoint-ORIG-GUID: aaobMpVaSuQ1LXX8EptPbMRhmIDIZd9r X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI3MDA3NiBTYWx0ZWRfXxEnHUrYeCLs5 h8dMRwLzddOqC2itiG5qrrG5jS4BHyes8MaNs0R3Of5jrmAHH0cIBQ7b64GvLFWoaKmXeri5CVt 7Fm6uKJa0R4AYBJuUfBbwDLbF3AFSBWXovhdyrA5z6PfbCmsj1xkSreTEDtVs7hvxF12x1I0weh +8lF1Dtweaa6VAbBo9ZLcDDF3FZ38j3eYHwykWfZw+Rh9BQVpiUd77vQme6fVHKMkS6kwClKUAD K6ZTgIuPRHCXnAoaMQTeZqWEORM+r6C/PT8QFD8kevy7e8xYkVuqRrd6PruJPyIKeFEZf168OVz HWN85vNG2wG9OMrmFPo9UI9Epkqn3x4jZ39dvu0mBJHzvj5hbxavo0g9RCgb4Fz7S9lLID1s0tS XMNZ6PeyAaDLP4P8AnKVQseKDEbBo33ouJ6+VuXbOXqdY/jEqXbHQncUOWECll/l0Pnjo/2aeLt 7UJOBAtz16BRl2Ihb6Q== X-Authority-Analysis: v=2.4 cv=ToXrRTXh c=1 sm=1 tr=0 ts=69c65dd9 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=oNxwg4Oaq7jLDjx2sdcA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_04,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603270076 On 3/26/26 6:47 PM, Akhil P Oommen wrote: > On 3/24/2026 3:30 PM, Konrad Dybcio wrote: >> On 3/23/26 9:12 PM, Akhil P Oommen wrote: >>> Update the HFI definitions to support additional GMU based power >>> features. >>> >>> Signed-off-by: Akhil P Oommen >>> --- >> >> [...] >> >>> +#define CLX_DATA(irated, num_phases, clx_path, extd_intf) \ >>> + ((extd_intf << 29) | \ >>> + (clx_path << 28) | \ >>> + (num_phases << 22) | \ >>> + (irated << 16)) >>> + >>> +struct a6xx_hfi_clx_domain_v2 { >>> + /** >>> + * @data: BITS[0:15] Migration time >>> + * BITS[16:21] Current rating >>> + * BITS[22:27] Phases for domain >>> + * BITS[28:28] Path notification >>> + * BITS[29:31] Extra features >>> + */ >> >> My first thought would be to define these as bitfields, i.e. >> u16 mitigation_time >> u8 current_rating : 6; >> u8 num_phases : 6; >> u8 path_notification : 1; >> u8 extra_features : 3; >> > > I am unsure if the compiler would mess with the ordering. Aside from the > fact that this is an ABI with the firmware, what make this piece of data > very risk is that, these are power related configurations where the > issues due to misconfiguration won't be immediately obvious. These are two fully equivalent ways of representing the same data. The compiler won't reorder them, since data in structs is.. stuctured.. In any case, either of them is fine. The struct definition would be more convenient to work with if the data was provided in C code, whereas I can see the simple-u32 being more convenient if it's going to be pulled from the DTS Konrad