Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp651582pxb; Tue, 5 Apr 2022 17:21:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmoVP1Ebi8AA7vW+nXAaMen2o6TKzGFjeDuEf4lMjGgFXVqacPoJyx7V37qPXq8Be1qBIw X-Received: by 2002:a17:906:5d05:b0:6df:f88c:ae96 with SMTP id g5-20020a1709065d0500b006dff88cae96mr5954810ejt.480.1649204503281; Tue, 05 Apr 2022 17:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649204503; cv=none; d=google.com; s=arc-20160816; b=pduADLcicvbhrU19MHs7fJhZkc6QZ3xxcvIzlpOy2RpQLaE3g1XnwOXbQAGKRP2BG7 OD4qLt9IoiM1buHdLoTmbvVmJBzYgLjOhAnSjoDHPF1NGURxnrvNrNJ3/6yOtwng+W+B 3q8eEeQFixcv52rUd4HmlgrO8rcRQStbXst8v7k9yHrnFicFdEIdKLbioXPAm+htbEld n9be/cnWl/0LnAW4D202IFB3qGwvjkDwoA3zKy+TEWhtGNefAsBwAIyQB/ictoD46YzB A2jkpiPsu3sS/EgrEN/uZxHi1quz+IVLFM1Y9we7HSQpic4F1R0e1f9sNz+1snXmmcZE nNDQ== 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=KVr8UpuTmd/Ug3/74qi4Gs0Igmkd3gKBJdujhDXThhqPfvX7Psi91jW9yQ/hKiX1Ae Eridx9Xds5etoes1LCVCJLV48SX99BIcpuQ51fV6JJUrNyWoNCHNacYAgF2GvnOs3V68 rQ+T+XMuqxu0xpVG2BvA7Bjtu4j56hfdYZDokvc7PUdK5qUG+czH9VhfU0+XcWmI3A31 mWNANRK78XFgRY9k8vZ4Z+R2h0RZpmMf6KzqSmJVbS/EFZvvJfWtFx4ZECcCa455NWpq tSAWchHb71bidjszJ3GhCR9banjnZOOuggcHQTyyJnWHqedxLJ6A9tJYu0aq54CbGifJ h2Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e7VbB3Jj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb11-20020a0564020d0b00b00418fe90d5cfsi13181285edb.576.2022.04.05.17.21.11; Tue, 05 Apr 2022 17:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e7VbB3Jj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382431AbiDEMPG (ORCPT + 99 others); Tue, 5 Apr 2022 08:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244775AbiDEIwi (ORCPT ); Tue, 5 Apr 2022 04:52:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D09E5FB5; Tue, 5 Apr 2022 01:43:44 -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 E5FAFB81A32; Tue, 5 Apr 2022 08:43:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50584C385A1; Tue, 5 Apr 2022 08:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148221; bh=1xsjRKMqP5RqWtFVtYhBnlBrA69egcb28RKZGj3GV+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e7VbB3JjJcEhgOp5D4D58e7RifoUVfWZGZgVoIC3PcGQDwxi45wg+/agPchsE/xIa oC3IoVNeGJ6rMYXV+Rc4WwtbaK/P71QPmcKsZ1jeMW8x24YsnSvPIbaVUvDdmp46Jy I4Rl3KXwjil/5ohDq+iHpcU7ciY0Ks6GmZpblhVw= 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.16 0279/1017] media: camss: csid-170: fix non-10bit formats Date: Tue, 5 Apr 2022 09:19:52 +0200 Message-Id: <20220405070402.549655007@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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