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 2ECE143BDDA for ; Thu, 23 Jul 2026 10:21:33 +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=1784802095; cv=none; b=u5rYZsXjLsGqwFvBx4eg6ofhXxhjyvF+udUdjoSpXBM9qeleAOF1mrtOHfnPFYpxFvf1/81VHVZYTPd14aP1Xv8U3zDfNMowTBs/VuEPTvzKB4oI4XZTkQos6lWAaf9Vt2KBk5TLTwSDe32PTXHpy+sMBN1joia5Em8Tuta8LgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784802095; c=relaxed/simple; bh=UmdblSpZaurXsYbimbPkFcYNgBfTLQ8n8EEy99+CMIw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GzHpP8nzyhEjGb+16SKYIVNjioCqqPTDsCAh7VxU0WBvugISVrgNiwSgJDXS14fVWN6AEHOrBmFaIVryUHSSyI5rmvsk8QeNcV2QBmi5QPMmSrhLGGIJDpQp+vNSitPxl3RGDR9u5jXSBZKD6cvzSvFi5Kx1gRDRCoZiCr7jUV0= 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=H9lk/fwE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=G6I73DRn; 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="H9lk/fwE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="G6I73DRn" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66N9DoKv3567777 for ; Thu, 23 Jul 2026 10:21:32 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= judSlP75ZLbiXWBghDPK2goZdlDsavKdoWDvXwUlnWs=; b=H9lk/fwEWjBgknIh EJNkqhTME/rYJpf+KCFf6SwuQZNQznWQZD9L/Gm+zxZswtfx7kiYI2e4O2Af2mxU scEQqSuupLnTphcMwambNKdhCVZ3jKS1k1dOaBjhm1c8qRf/nKUxe4OPaI/8p+4l 2ISxmNYeiWw5jHrtDXCbxttEybaUh9uDBtVzslniyd6amkLd/zpaPPJVFBz98Vvq 6iJUeIgggQU3816xxQryaKP1U60dnlY7vKqpsgfi8iFADae7YiQ+RqWMdlG+H47a mj/3nkRqFfi/6d9WXXDe+IDnJXrl1aHXpam5ZgLB1KtiTcfs788xXdAdbt0BdD0w adM/SA== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fkg5208nj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Jul 2026 10:21:32 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8484b9fb055so1206620b3a.0 for ; Thu, 23 Jul 2026 03:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784802091; x=1785406891; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=judSlP75ZLbiXWBghDPK2goZdlDsavKdoWDvXwUlnWs=; b=G6I73DRn9G/qk/FvV1QoDctNXqZ89IjGY/B72Ge+a283Rr1aGzTyvedSUuu4qlJ0Zk cDqq2yDNrJFB9EM5d/ZgGGGWUVHuFvOjUWBXzIPz/nIG6oVmNn21iT7nlkq+u0A6ikE4 rSfSj96rqUEXB0qCiGC0tRwCUvOcBIb+J/ywoctKcy8lBOo+W0HhyEyGNMCEsER77JeB TWtNvXjYQpny83/uIzfJyNIbW5K/0AJ584q+bW5ua3VYClJubmGaDUtGeNPdrkeZcaA4 /Rr2nZh5Kw0txFmsxPHZpMrIw4dWshzQ2wdPGCHFBGOPenE12MvPVb5+qHGz+wDrQoSh 12PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784802091; x=1785406891; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=judSlP75ZLbiXWBghDPK2goZdlDsavKdoWDvXwUlnWs=; b=PXnxYa4WZlzifAaDC3q40zGsPgYrdkyGUm0wrBpLwuPuTEz+QIxTlgXW8smyr7HbXe LC0VPG9JznB1u00/kTyCtiCCanceBVnxGHo+GrLe1xfebqT4V2iylenxpe5q0DYOjoiV GTJIwxPF2IccQgnOw5pRprq4/b5AtjWYSz++04Yy7+6nVPgqIhKTb8BbIFN74pAD5cG8 ynAhXgi72Vh2aQVTaouccp+VIiFtp2rShObGwW7OZVWDxM14AxN6K9A0n6dfL0ier+bX CR9aaqHh7F4GMs6PIB8+XK0JAGQgBIX3HUHm39OAtVoy4xA9mtFcGtjBou597SsJeT0d VfgA== X-Forwarded-Encrypted: i=1; AHgh+RqqmTfoqsUgGxkQidgnLcaCMI4uSkIhyQ5vUsP9/75/B5jL4sykJZNrhatZolpx3Zk4u07F5HDUGYQ+9cQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwsdQ0vMFwUhupEIEW/aNRV/szb7e2V9SGAmarLPOdYfr0+aU8T BwgcQoIaCrSKO6ypnAsImMQ/o9rAhUZU7c4oveDCnZ+5QnlA1sUoamPIxxXZGfWG3q78DT7n9lv vfZs3Kl400TLooYztonZa35nRZDIn458FuDkCCkeU/EB91svXDWQAUkRSNH4VRl9VbLc= X-Gm-Gg: AR+sD1202/D2DFqY7GWZfziFU0i6jTiamXK7IKGRqiy7OeyMKvXyzJzh3/YJIn/UkGS xtUNs+6njYtZ3mxAoscOgFuAcwHDs7dIopFhw7NRvAjzap3djPsc863xCOic324jmifsLJlEbbO poGJaFe2qlr8pvti7PF88Yb39P7HoPZamv+QOfCZa4mIc9YE0Mo0vdxzzva31Jh2Hh8VUTxFuse dzZ66ZTDLCVRXJUPoInshd410PwUO51mNP0OR+yCdL4ZkuzLlpyXhGiTQ9EaEjrEbz1PyUrSa5s 2wD8p9hAo6+ca4bBuR9RnUuXz6OQDtHA1ThiCvV2wndXupvBPd3C5z4EJxDNuqGrJGA1UPnupAB uNNBfcqP4Y2BbyDAuXmRaTykYLRD9DGo= X-Received: by 2002:a05:6a00:12ce:b0:848:50a5:a70b with SMTP id d2e1a72fcca58-84e2bc6be0cmr2803087b3a.21.1784802091192; Thu, 23 Jul 2026 03:21:31 -0700 (PDT) X-Received: by 2002:a05:6a00:12ce:b0:848:50a5:a70b with SMTP id d2e1a72fcca58-84e2bc6be0cmr2803055b3a.21.1784802090737; Thu, 23 Jul 2026 03:21:30 -0700 (PDT) Received: from hu-sachinku-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e17285662sm2781395b3a.20.2026.07.23.03.21.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2026 03:21:30 -0700 (PDT) From: Sachin Kumar Garg Date: Thu, 23 Jul 2026 15:51:13 +0530 Subject: [PATCH v4 1/3] media: iris: cache work mode after computing it in iris_set_stage Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260723-iris_multi_slice-v4-1-45f0a3fe7fce@oss.qualcomm.com> References: <20260723-iris_multi_slice-v4-0-45f0a3fe7fce@oss.qualcomm.com> In-Reply-To: <20260723-iris_multi_slice-v4-0-45f0a3fe7fce@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Vedang Nagar , Stefan Schmidt , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Sachin Kumar Garg X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784802081; l=1396; i=sachin.garg@oss.qualcomm.com; s=20260211; h=from:subject:message-id; bh=UmdblSpZaurXsYbimbPkFcYNgBfTLQ8n8EEy99+CMIw=; b=F9+ooebJvkuELuNzkFk5+MqGqOBn0gZUxVZadAybiu7GQIiXbJrAs+tEZixzAHfyFkQwrJYvX MBRQ4oGkgDjATrWrKdXSjZWX46XO7dyuEkDLZ4p6ERTmV9ur6fvSQWT X-Developer-Key: i=sachin.garg@oss.qualcomm.com; a=ed25519; pk=KcRhp4CP9cR1V2tg6xSNRnB2STYaU0vVigdUF4Actu0= X-Authority-Analysis: v=2.4 cv=DtZmPm/+ c=1 sm=1 tr=0 ts=6a61eb2c cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=DQE9uWRhMQBL0dtU3VIA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIzMDEwMSBTYWx0ZWRfX8/aUhmsHmhyG m/zV47QQLdSo1DgMzPK1JaSk8awyGgKIp4jKcyljvgvdlcKrmz7Cc3j52gxTvmWBR1yGAwT8qtb wUUO9mEJzvfVtHFCxITNQa0RZ1LOnlE= X-Proofpoint-GUID: 6Gvyaf9Z8MrZEnRGxTsNEprvYgUS1iRq X-Proofpoint-ORIG-GUID: 6Gvyaf9Z8MrZEnRGxTsNEprvYgUS1iRq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIzMDEwMSBTYWx0ZWRfXyGk06mARfcrF oFlO2wRCrbGqcvJsNogDiuK9t6Uov+IQY/vk26xc9k5358jWm9RqryyamXqXHDDzIOzEEHT5jbV 6MCDyfpBBRiCvRwe9V565wn83Ux2QAUeX2OSRa7hO+m9y0rnHDaDEEm3tvVsoWpr6edLjEfzUFh OjRuzDvG39uLpsEhA9Pl1cB5NJrrOjYDIgixvOFfUH0SqamBZSGAibiQOiSzEzPlU8Vm3jgNVmU tLaK3KLrj/1NKaOQ3S8K8//AatYTUFKgJioAtC+vScoJs6t/o/ZH0nWP+z7TAsBZrrxanMXIfnY uO32A8iytHH5MIEWdSG2cIZsVj+b8ZXs4UvD9zcbZS0P2RtCImB6lFvmoUVOjB0goTZ8kvb1Mf+ wnnwqvBpxgJzdJjO9MSatq53jk5bks77jIIySnToOC4hIxRTwtFOF+0HAFA4FdD4lZpRbHUvko/ a9xnv779K701InzrMcA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-23_03,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 bulkscore=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607230101 iris_set_stage() computes work_mode and sends it to firmware but never updates inst->fw_caps[STAGE].value, leaving the cached STAGE value stale. iris_vpu_enc_bin_size() and iris_vpu3x_vpu4x_calculate_frequency() read this cached value, so a stale default causes them to miscalculate buffer size and clock frequency for sessions actually running in a different stage than the cached one. Update inst->fw_caps[cap_id].value with the computed work_mode before sending it to firmware, keeping the cache consistent with what is actually configured. Fixes: 3a19d7b9e08b ("media: iris: implement set properties to firmware during streamon") Signed-off-by: Sachin Kumar Garg --- drivers/media/platform/qcom/iris/iris_ctrls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c index 10e33b8a73f6..58d195d2ab87 100644 --- a/drivers/media/platform/qcom/iris/iris_ctrls.c +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c @@ -521,6 +521,8 @@ int iris_set_stage(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id work_mode = STAGE_1; } + inst->fw_caps[cap_id].value = work_mode; + return hfi_ops->session_set_property(inst, hfi_id, HFI_HOST_FLAGS_NONE, iris_get_port_info(inst, cap_id), -- 2.34.1