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 9C5FD225416; Thu, 1 May 2025 19:14: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=1746126855; cv=none; b=EukBMp9IlgOY8qrIrH/1kS9Fqi6lnTum1Ovn8jdvntDozTyClyXewLXTNuTN5R6aCGNJVruY5tjDQw8HRh96bPCrXWAP+S6Cs/5mL8DKBwmkQ3hwBfoi7Y+LaUOH1PDHUvyvLl8TyhQRlUQfsBVpInOiRNYEUF82cyb9sLh4fmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746126855; c=relaxed/simple; bh=Pd2Kg2ayD8WxvEpIbMv/wTv7bZdVAIXuv3XoG0dyxn4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=G50sTTKPdPl8pWmlxgHbuns/JnVkkcMxIyZFtvmFCjWYGsmrxRhxLnEB4X0fgNgL5Zitnl+8gZqK9muJz3+jAEd89Jj+YWK29K3+TyrE/DLH5RUChCbTnIX2hcSuCuNWAQ+zrUcbZXMvgRn1nIlEOPCN7Ys36RvPa+/NFW2rTXc= 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=i7KyLmiX; 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="i7KyLmiX" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 541D27wt009612; Thu, 1 May 2025 19:14:07 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= anZTlQGINjEwk7MGYBvk7Wndy/nFAOAc+zo3CaZv/Co=; b=i7KyLmiXdAukIvph qxqOI1XJQm1xjL+minwFZBejKWWvSVGCqhX0JS09zMifJDW0QtH4/4CeQyHFTPwE tg+RT8atv5rjaShIr/kVTX+Z0Bnmi6WmulAEhsxR9EAdQOHaPjeR4fX9WAhZwEP/ 2TgrfSBG5s7WQhLNEzu+vPzPxNAoRfw6ZYvKRqtj1Zu+5hVrnW3d8H3rVx8r/H7r 8p+sBkVrr0uQCMduAcU181LE2G8zGsUgGuK0FFgyK1MHc0ctYu1rNt6yI3hapmIr YSxx7UGIvrHHOsdZwXRwo6jmwB+QZOhFWudaANDR5pAy06DXxXxJxuEusidxLu44 XRyjKQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46b6u4e70m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 May 2025 19:14:07 +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 541JE63G021971 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 May 2025 19:14:06 GMT Received: from hu-dikshita-hyd.qualcomm.com (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; Thu, 1 May 2025 12:14:00 -0700 From: Dikshita Agarwal Date: Fri, 2 May 2025 00:43:32 +0530 Subject: [PATCH v3 02/23] media: iris: Update CAPTURE format info based on OUTPUT format Precedence: bulk X-Mailing-List: devicetree@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: <20250502-qcom-iris-hevc-vp9-v3-2-552158a10a7d@quicinc.com> References: <20250502-qcom-iris-hevc-vp9-v3-0-552158a10a7d@quicinc.com> In-Reply-To: <20250502-qcom-iris-hevc-vp9-v3-0-552158a10a7d@quicinc.com> To: Vikash Garodia , Abhinav Kumar , Mauro Carvalho Chehab , Stefan Schmidt , Hans Verkuil , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Bryan O'Donoghue , Dmitry Baryshkov , Neil Armstrong , Nicolas Dufresne , , , , , Dikshita Agarwal , <20250417-topic-sm8x50-iris-v10-v7-0-f020cb1d0e98@linaro.org>, <20250424-qcs8300_iris-v5-0-f118f505c300@quicinc.com>, X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1746126827; l=1454; i=quic_dikshita@quicinc.com; s=20240917; h=from:subject:message-id; bh=Pd2Kg2ayD8WxvEpIbMv/wTv7bZdVAIXuv3XoG0dyxn4=; b=S+qkXp5VoNA8DUhNJU7J+IEdOSfAMV8/QoIwKFQPsB1smUi/eeOdXwt4wbhTwyWpV9tUUZmg5 pSCyriY4Sw7CwwGHxoKZofCIAZVDmZgbtHk+ZMGYt8M9ITsLllYJYUW X-Developer-Key: i=quic_dikshita@quicinc.com; a=ed25519; pk=EEvKY6Ar1OI5SWf44FJ1Ebo1KuQEVbbf5UNPO+UHVhM= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: hWaYqjI6mxlNZH8Ey9ZoRzY6ajFb-WR- X-Authority-Analysis: v=2.4 cv=Yaq95xRf c=1 sm=1 tr=0 ts=6813c7ff cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=dt9VzEwgFbYA:10 a=VwQbUJbxAAAA:8 a=KKAkSRfTAAAA:8 a=COk6AnOGAAAA:8 a=H4aCPc18VLGkYZj90ZUA:9 a=QEXdDO2ut3YA:10 a=cvBusfyB2V15izCimMoJ:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTAxMDE0NyBTYWx0ZWRfX1t7IcKouqYZt XngMS9z3c5Co+rPh11/nVeQEwWMEmT1sWrHH6E6bknnYA0j065TwuzovX5I+O5tPVsq/MDA6lue lvE6B7hLwvj9sVQlRT+k9PfjfbgSuaCyFD5y2qLy9z39eBJT9FIePIHMvUbaToR+212ZDszRPVU ygSPS1Q9KCvUy7jysHNLyxKwz19HSyCMT99ylYU6ewYC9+/7GGSmLob+IHFcf92gCAim2EdzF2g UproSCRrK7xDxPRkteq8yEeWCrP7sDotsjbGlOWrRJdnuqTHTPMII3JiQOWWJvUl70qFZ86GqIU JT7ybjrPSqGV2PlylcO23pB21TwhxILrxVdBh3MwbnnhXMSWqTSY1ZqB4FAC0Ek0VQaKoqp0W7O j5ngdG3L8JM4AVxE8qz0M4VJ+lrOz6pA3z0GZhgGK8FDPpObOKOTrbm+mi58Wv9Q31UGmtAT X-Proofpoint-GUID: hWaYqjI6mxlNZH8Ey9ZoRzY6ajFb-WR- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-01_06,2025-04-24_02,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 clxscore=1015 suspectscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2505010147 Update the width, height and buffer size of CAPTURE based on the resolution set to OUTPUT via VIDIOC_S_FMT. This is required to set the updated capture resolution to firmware when S_FMT is called only for OUTPUT. Cc: stable@vger.kernel.org Fixes: b530b95de22c ("media: iris: implement s_fmt, g_fmt and try_fmt ioctls") Reviewed-by: Bryan O'Donoghue Acked-by: Vikash Garodia Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/iris/iris_vdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c index 9c049b9671cc..d342f733feb9 100644 --- a/drivers/media/platform/qcom/iris/iris_vdec.c +++ b/drivers/media/platform/qcom/iris/iris_vdec.c @@ -171,6 +171,11 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f) output_fmt->fmt.pix_mp.ycbcr_enc = f->fmt.pix_mp.ycbcr_enc; output_fmt->fmt.pix_mp.quantization = f->fmt.pix_mp.quantization; + /* Update capture format based on new ip w/h */ + output_fmt->fmt.pix_mp.width = ALIGN(f->fmt.pix_mp.width, 128); + output_fmt->fmt.pix_mp.height = ALIGN(f->fmt.pix_mp.height, 32); + inst->buffers[BUF_OUTPUT].size = iris_get_buffer_size(inst, BUF_OUTPUT); + inst->crop.left = 0; inst->crop.top = 0; inst->crop.width = f->fmt.pix_mp.width; -- 2.34.1