From patchwork Mon May 22 06:48:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dikshita Agarwal X-Patchwork-Id: 13249840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50111C7EE31 for ; Mon, 22 May 2023 06:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232227AbjEVGwx (ORCPT ); Mon, 22 May 2023 02:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbjEVGwV (ORCPT ); Mon, 22 May 2023 02:52:21 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5150CE4C; Sun, 21 May 2023 23:49:58 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34M6T3VO002771; Mon, 22 May 2023 06:48:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=97C7E/ruo2fQ6WsXwzNHXyAX/tYTuB0c8MXBnXS5uTY=; b=SdI0Su3Dl0RpB1SLkW1RXWdHELddFagi3RLkehuHUoDaAAq32K9+iZ+x9QUfvA4Q6dqe yKbOGJ4n8S661prXwtqIkEIRzryoszqPFdvc9WKrrUFyV9zhTICWUL5wtt8Pd27O1hMs xbjRwUrq1/wCOAqzh0gLzcCskwv4ZSKbLhVUJeZzL5sE/DKlj4iv2zL7okYMMLlF3FZs 2Se566flmowuIidOQIr1tnBTGzZNtg4BsmuGqOuHWQJN9LEhMsHKfkH7MPEoJ5emWFY7 Eo5RLLcQ6xyzfnbHOq4z6MLQ7f1heE7q2Z1ZVbNKtUuJZdiK9Rcy07CHgMp4YKsTLysK yQ== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qpqgf2s98-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 May 2023 06:48:31 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 34M6mRaE009797; Mon, 22 May 2023 06:48:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3qpq9kej0h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 May 2023 06:48:28 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34M6mR85009791; Mon, 22 May 2023 06:48:28 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 34M6mRpt009802; Mon, 22 May 2023 06:48:28 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id 373CE3F5C; Mon, 22 May 2023 12:18:27 +0530 (+0530) From: Dikshita Agarwal To: linux-media@vger.kernel.org, stanimir.k.varbanov@gmail.com, quic_vgarodia@quicinc.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dikshita Agarwal Subject: [PATCH v2 4/4] venus: return P010 as preferred format for 10 bit decode Date: Mon, 22 May 2023 12:18:18 +0530 Message-Id: <1684738098-17372-5-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1684738098-17372-1-git-send-email-quic_dikshita@quicinc.com> References: <1684738098-17372-1-git-send-email-quic_dikshita@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: g-8ZQpjSNxMT2_E4YoXx7Yqx8ZITgbkR X-Proofpoint-GUID: g-8ZQpjSNxMT2_E4YoXx7Yqx8ZITgbkR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-22_04,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 phishscore=0 mlxscore=0 bulkscore=0 mlxlogscore=868 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305220057 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If bit depth is detected as 10 bit by firmware, return P010 as preferred decoder format to the client. Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/vdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 96eceda..12a2e99 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1503,8 +1503,13 @@ static void vdec_event_change(struct venus_inst *inst, inst->out_width = ev_data->width; inst->out_height = ev_data->height; - if (inst->bit_depth != ev_data->bit_depth) + if (inst->bit_depth != ev_data->bit_depth) { inst->bit_depth = ev_data->bit_depth; + if (inst->bit_depth == VIDC_BITDEPTH_10) + inst->fmt_cap = &vdec_formats[VENUS_FMT_P010]; + else + inst->fmt_cap = &vdec_formats[VENUS_FMT_NV12]; + } if (inst->pic_struct != ev_data->pic_struct) inst->pic_struct = ev_data->pic_struct;