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 C7A59336881 for ; Fri, 14 Aug 2026 05:28:58 +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=1786685340; cv=none; b=CUlUy42728KgsLLE8qhsatTFQ91WIX8cHwF0uOJetSp/pLvXajyuSUHxWZd4mSiG0IZ3EST3lE4FmRCrEcqt6o6PVwTgXHlZnT3NfBkdosOf98597Sr2Z38EXpU3m9fOusP3/+PMabrzW51OeFEUffYXPoWqTvyeDTnlGmHsOYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786685340; c=relaxed/simple; bh=fiIorYuwQdKLyxfc7Axbk7gZDVZKalA0vc4EHt8rVjI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PGtTXuPT/lCfpezcA30nSzmiMGPHsJNDZ4C+hOxYja12Qcl4s4s+nxwpknwq5MJ4/3x0ij8FkYLtN776lLFlH2f6K4Blc/QKgNBxDcboQF24wwGWd90ECg51qZVq8F2a7Q2/ql3XwDxbS/8RGrfIACf7QDpbX05Mqb6dUtnDNho= 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=bSzyXrxp; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=OV30ruE7; arc=none smtp.client-ip=205.220.168.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="bSzyXrxp"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OV30ruE7" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67E4QfU6308291 for ; Fri, 14 Aug 2026 05:28:58 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= 6ZJnLmavSs5ydP+8z3gvvG51/+kfclGe/xcvpERwJ1k=; b=bSzyXrxpV0p8faUS dNTRkPMIj2TNAsmu8WCTDu1z00AI82fUwyVKH8DfbsluFPQqCDeUJjZQLoweN6P4 GTVjWcjmvfbdWEljbjOoVVXgCm3jgYBVEVNHuLgH/rxu+23rbrV5+/AynZh+9gDh NzpNj3xs81J6Mw/sHHb5kD0pF/WjeZDJodVz0TqdqZClQfprOqshVcD5prh3eLTV a6xJGVKDCZV9xbthL9ZlFo5NZ/LsBejzfQDKhd0Z1E+2R2fzOz4kgte+H4KORnna xO8lrkK9zRPt41Or/cBw+XVxiYiipm+zmWLrQMUFofHtjR0uHLVoqIUBvKfjgfiA xCDJRw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g1j2f2fqe-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 14 Aug 2026 05:28:57 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-38dbf293831so1350504a91.3 for ; Thu, 13 Aug 2026 22:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786685337; x=1787290137; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6ZJnLmavSs5ydP+8z3gvvG51/+kfclGe/xcvpERwJ1k=; b=OV30ruE7sI1oVTHHuoJ4Rvg6cGXojNayCB2Es7qIO1fZGBMY+iPkGvqsO7LQJYHqC0 b9uV9zwdWOlv+3aoFczcgzTJ6liS2PkkYQ2PBCrhSTMZX4egSbYnu1qCNkyu8sIQZz3o yiPaQDY56jn8JzwJfTUwBa5wWgENcwPRc8LlJvteuzYNgENgaBUW0twhlCsl+abL6Ow0 JNJ7HbpTEUXbJ0h4RefqyKAudQbFngTHY2AhJs+hKN4L/iKkkKnBR1vzwImVQPLyh2QF T4SHB32f3K+qqBDgb8DcqRxorvFVPQ2jQpqNeXNFduP1EQAfwYtyEHllzVRQ/ms16mfD ExvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786685337; x=1787290137; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6ZJnLmavSs5ydP+8z3gvvG51/+kfclGe/xcvpERwJ1k=; b=B94kS863QTc4cyy/0YxehlkQyCVjmc5L6IdHfXL0MW5gOtCAV7YMvAdNFDNQ/P8Jc3 4aBaN/nwOaysVCKDsPmVxNdFv6gkNf8p+lEcW8vJXn/L8e1oCQzQsJ5q3iZ8T3q+4spe 9BeYbzEo2xP5wZYP4PZKdKbFnW8sDMEREPM5fGKCP7PHdeMNyyFUjpDt77FDXgVBgi+n 7x48vs24va6lFO1XlTgPgRzEjoYI2zimWWb+rdyGZFg7TidWMFiPQcWRXoUB8n8bytj7 Bh1Cv/v8utDKLZCNUPZpfgS1DZ2tNYRA3lWEmbknIvRW1gKgL1nIONaSSiuTvzt8I7MH Kllw== X-Forwarded-Encrypted: i=1; AHgh+RpRqpjkyefE8eCkq0oGh2s608nRoeNqMot/S5QlRsoy3DY7Cy+7WjJvNTuOHov6BRVytRKHYkEw6EBNFP0=@vger.kernel.org X-Gm-Message-State: AOJu0YzhelKqWzVYtxCOOFQ19E79iCwHJc7PpExALnmDxdgKjLVmdfU7 tBkTaxJRUWkCabdBTnx2COmCJz4RYHDqMwUatw39HZ0BK1WCXt3fVktPCK44S+FB+3v05SnL0SQ TUQNNhPSRhSEIdAdO+Q0+Sm7CaA7w+QYQJUE2gHWLEDVQLn2UM0lcBZplHkPWpZey2k0= X-Gm-Gg: AR+sD10bYqqREm0mf240tFpCzc+XgSKn+fObJFniYiVmCCBRIDIo7iJ8dh5aE0fQ9hr M0vMgkQi/5+5CZdNrcsCncgdKcmJKdeZdBXFkoX8BNQimEvz0xCZC1qgmosNnRL5MgRwY0WGuoS fyao2iRLSmskJT+EXU7s3l7jO/tQJlh8RGmW2PbCpdYogNX4mjGIgGlNqRmL3WowcDUdH6dipR6 DILORjZjStPilhgOdQsnXLPnST7rEq2UXPHVSitwynKG9TthiALfKiYQtqp4JYHcOOZn1A+lVoZ TY9iV06QTKc3/gIQ1MOY1X0THPeSj5yFyBu/HlpFvgxTSpFtvTu0BlAKQAPHeh3ohmOAGxtrV3/ jNs0BKXyrQ9UUwfysz+6NFYD9WDvC5alA X-Received: by 2002:a17:90b:48ce:b0:390:b41a:b92b with SMTP id 98e67ed59e1d1-3933b6d05c3mr4055271a91.4.1786685336939; Thu, 13 Aug 2026 22:28:56 -0700 (PDT) X-Received: by 2002:a17:90b:48ce:b0:390:b41a:b92b with SMTP id 98e67ed59e1d1-3933b6d05c3mr4055235a91.4.1786685336542; Thu, 13 Aug 2026 22:28:56 -0700 (PDT) Received: from [10.206.101.140] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-141388bd5a7sm6389114c88.15.2026.08.13.22.28.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Aug 2026 22:28:55 -0700 (PDT) Message-ID: <46af20c8-1182-2db3-0099-63e27903a6f5@oss.qualcomm.com> Date: Fri, 14 Aug 2026 10:58:47 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 1/4] dt-bindings: media: qcom,sc7280-venus: Add dma-coherent property To: Rob Herring Cc: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Mauro Carvalho Chehab , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Mansur Alisha Shaik , Bjorn Andersson , Konrad Dybcio , Abhinav Kumar , Hans Verkuil , Stefan Schmidt , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260801-iris-fixes-dma-pseq-fint-v1-0-aba0cb22f6ab@oss.qualcomm.com> <20260801-iris-fixes-dma-pseq-fint-v1-1-aba0cb22f6ab@oss.qualcomm.com> <20260811135103.GA2063083-robh@kernel.org> Content-Language: en-US From: Vishnu Reddy In-Reply-To: <20260811135103.GA2063083-robh@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=FeMHAp+6 c=1 sm=1 tr=0 ts=6a7ea799 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EcCIuVCxoMd83uxLhvwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: WiPhIxqP3q7NKasPeQwuIjENtnii6ZEJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODE0MDA0MCBTYWx0ZWRfX7ZelsvkP/sZm 5+V0vhOJmtbXo3p5mBgSxLeUuwIHtMHog0gUspiktKRmGQT44i4oPtbuNDmxG4u/8vjeiNs1kPT TflE1a+d5FXZiqkGWCbfDuxT1eY+8gjuR7rWoe8lbMtTV+3mnrxAZDIBZo4aFB2BOFP11k/qmtt OZFm4TM+AUQkk491XtvXueqUKvMBttBmBkiSYJRNgO5lZKHA36DsOSN/9JOWx917ks74GVEF8xE tKyk8TngpZPj78kfshH1PqYSX+k3TlETssuknPwSr1E00oNiJhRayBh3/0wUWjhu/LRlxhVDTXX hC9b27OC8nayK5Vzui8ukDS6I9GQBPclCoRAQ3vxRdM/KhKq2e1goZGfaYoZDJWQIzlqma3mmMg iGMzwk7U/0UyduvezoIXJejgdX40XOIhU/f/c5kbsvmjjswe3buNtAXUXXxyMrpKa4m6bh82qJa 2qzEg8FL8lscX55NNgw== X-Proofpoint-ORIG-GUID: WiPhIxqP3q7NKasPeQwuIjENtnii6ZEJ X-Proofpoint-Spam-Info: AW1haW4tMjYwODE0MDA0MCBTYWx0ZWRfX05aDx4jcY3RB ETzVia/EtknjZSHqD6dMoJGvJDAB5FG7Xsd/WQO5NzJFju0OpTgQsKMH1YhNmNz+MxUWptIkVDh Ijlw9rg9uCL5skjp5KKJ0M+zEGFoFZg= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-14_02,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608140040 On 8/11/2026 7:21 PM, Rob Herring wrote: > On Sat, Aug 01, 2026 at 01:07:27PM +0530, Vishnu Reddy wrote: >> While testing with some higher resolution clips, the venus hardware >> triggers a fault due to wrong input data being received. Corruption >> was also observed in the captured output when the client dumped it >> to a file. >> >> On debugging, this was traced to the venus node not declaring >> dma-coherent. As a result, DMA buffers shared between the CPU and the >> venus video hardware/controller are not guaranteed to be I/O coherent: >> CPU writes to an input buffer can remain in CPU caches without being >> visible to the video hardware when it reads the same buffer, so the >> hardware receives input data that does not match what the CPU wrote. >> Likewise, on the capture path, data written by the video hardware to >> the output buffer may not be visible to the CPU, so the client reads >> stale or partial data, resulting in corruption. > The only side effect of 'dma-coherent' not being present should be doing > unnecessary cache flushes. It should still work. Maybe you are missing > some DMA API sync functions? dma-coherent tells the kernel that this device DMA path is hardware-coherent, so the SMMU maps its buffers as cacheable. That attribute is what causes the coherent interconnect to snoop CPU cache lines on every VPU transaction, so hardware keeps CPU caches and VPU visible memory in sync — which is why the dma-coherent property lets us skip the unnecessary cache clean/invalidate. If a device doesn't support I/O coherence, its buffers would instead be mapped non-cacheable, no snooping would occur, and the driver would need explicit dma_sync_*() calls at each transition. Venus on SC7280 does support I/O coherence, so dma-coherent describes that existing hardware capability to the DMA subsystem. > Rob >