Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp638388pxb; Tue, 5 Apr 2022 16:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDu+eFJWidV62xin1Qz4qgupOynO8WkfsebWEYyMmuMXoa1ISB+jq0l/ThDMmkBAAgCmqK X-Received: by 2002:a17:903:1205:b0:151:8ae9:93ea with SMTP id l5-20020a170903120500b001518ae993eamr5814894plh.37.1649202801330; Tue, 05 Apr 2022 16:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649202801; cv=none; d=google.com; s=arc-20160816; b=eGUKFUuFSHjkRSZD+9ntJlDbWfD6ty88VT02/ESsDpYjc8y29xmhIIpT4Chx1VaNs1 aKYXgkm8ECglS7QFDz7DqYEl7+G4EcGDUTuvm+jS3Sa/B5RdbkvWQHKgErgFlFcoEmp4 5V0iS2Hb+gZDfIXPtwVakXz+uS9y645ICsZt28aL371zGDXxmiizidOz695/goN9SN+x MV++60lR25gEFPzs5M1haa+/cCcWs8/6gbClaMqKLHBkXIS8TSs2W8CNyeBPmqTMIxwq 1n6gKBrRQxNhAzrt/UIM65VIavKvGHT5skV4w0EyruiRANd8Z0AYu+n5nDkL0E9YM7Uc 1Jqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rVnwWhVNY9AEI2l4LPIRnrCpTGWGnO+vapHMpM9lA2Q=; b=MLKaTKyWpuVO02iXA36mIz4WQekzq6MxK3NoJgt7pSWL905mmQGbBjvpIFx+WpL0ih xuAN/r1h/YqJPFJTIFFQqvjAItuHMI0L3q4nN2mLqLVEglrzUOs3MRr/6Ojvuhgz/Gxh DiKl3ocqt9s9oKWaJ7ACxgKhrkrQMiwx62GuUNHuOpVcHISdWeeq24+GTcxXLRk77xMz WIs7SiV0LtHrgRioYDO6AfAmwX47+Y8Yxt7VAaR0EXv1Utjqm4RDJqUUugdSG0MqQPsl mpCQE/TYUUfm8q8XmGrIPcaS2lG40z0+CSVjIYPzYyX2SAPq4cQ0QFUzGXYi5r5ghUQp ML2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vy6R+J5c; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c12-20020a17090a8d0c00b001befccfd1b3si3100861pjo.181.2022.04.05.16.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:53:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vy6R+J5c; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E481BC95; Tue, 5 Apr 2022 16:39:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379610AbiDEPNV (ORCPT + 99 others); Tue, 5 Apr 2022 11:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346353AbiDEJov (ORCPT ); Tue, 5 Apr 2022 05:44:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE5DD9E94; Tue, 5 Apr 2022 02:30:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E3DC9B81CAE; Tue, 5 Apr 2022 09:30:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35CD9C385A0; Tue, 5 Apr 2022 09:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151023; bh=1xsjRKMqP5RqWtFVtYhBnlBrA69egcb28RKZGj3GV+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vy6R+J5c28tJE7nYqyWi4aPk2ISYRxha6PYtGSgBj+A6HkvFzM4RdjKYiAqe0lNGj j4/gYls42YlZdHNlUhNeVcBr/Qa/fRLPT1e7XWcoY0vIpYaq4KmvQ9lGfgivYluxs+ CVh7FpbMWorSQ0PavSWpu3hvwiVWwsE3eNe+T78k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Marek , Robert Foss , Julian Grahsl , Bryan ODonoghue , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.15 266/913] media: camss: csid-170: fix non-10bit formats Date: Tue, 5 Apr 2022 09:22:08 +0200 Message-Id: <20220405070347.830005965@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Marek [ Upstream commit 14d510e040f85ff05734fd6db8bae44b47886464 ] Use the decode_format/data_type from the "format" struct instead of a hardcoded 10-bit format. Fixes: eebe6d00e9bf ("media: camss: Add support for CSID hardware version Titan 170") Signed-off-by: Jonathan Marek Reviewed-by: Robert Foss Tested-by: Julian Grahsl Tested-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/qcom/camss/camss-csid-170.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csid-170.c b/drivers/media/platform/qcom/camss/camss-csid-170.c index ac22ff29d2a9..aa65043c3303 100644 --- a/drivers/media/platform/qcom/camss/camss-csid-170.c +++ b/drivers/media/platform/qcom/camss/camss-csid-170.c @@ -366,7 +366,7 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable) val |= input_format->width & 0x1fff << TPG_DT_n_CFG_0_FRAME_WIDTH; writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_0(0)); - val = DATA_TYPE_RAW_10BIT << TPG_DT_n_CFG_1_DATA_TYPE; + val = format->data_type << TPG_DT_n_CFG_1_DATA_TYPE; writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_1(0)); val = tg->mode << TPG_DT_n_CFG_2_PAYLOAD_MODE; @@ -382,8 +382,9 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable) val = 1 << RDI_CFG0_BYTE_CNTR_EN; val |= 1 << RDI_CFG0_FORMAT_MEASURE_EN; val |= 1 << RDI_CFG0_TIMESTAMP_EN; + /* note: for non-RDI path, this should be format->decode_format */ val |= DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT; - val |= DATA_TYPE_RAW_10BIT << RDI_CFG0_DATA_TYPE; + val |= format->data_type << RDI_CFG0_DATA_TYPE; val |= vc << RDI_CFG0_VIRTUAL_CHANNEL; val |= dt_id << RDI_CFG0_DT_ID; writel_relaxed(val, csid->base + CSID_RDI_CFG0(0)); -- 2.34.1