Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1942505pxu; Fri, 27 Nov 2020 21:14:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJErIrCJjVsP75GP8zATsd8zMZecmpFL/T/be0+JLH1OhFjGIqG4rBx/68PDOZZglghfCa X-Received: by 2002:a17:906:29db:: with SMTP id y27mr11660355eje.179.1606540451963; Fri, 27 Nov 2020 21:14:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606540451; cv=none; d=google.com; s=arc-20160816; b=nPCLor3D8XpjyaWF8e5bfvYjYUv47X/AG0LJ7Hug9gKjrSfu5uLQCmm1LUJ2ZwXqyv AIkMvj4uIuNgYVAMDnDoONyxtIFHBxe8RcOxxVXxhplUUxWwfF3wEosQc1cfHLUpUo26 5YNmU52fQQwnRe8oVi95r8Yap1kccYuvM25OxT8YC7ux8bcGCQErfqZtHxYwXOc6M1/d 8Liu+dPtaa4WSBcOmyqV/uFhQsnUnBJY10jkp3YTY670VKzOBAUQ+UOY8R7aMsEC9uZB HLiRRP4+1Uq26CsZkmJ0lCnTywmek8vfPixVERJ4jfO1ZJNamFkCgWJSO2jeO68hN+zT c83A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1wR2Kvfb5vjG8T/PCijsWnV5/Q6MbpEzV8Vjtc0CiDc=; b=HyFF7kaZ1HJ+b5fTgLrfM+tihqjCHv8hjRM4oeTnX/R2LlS5wuqFUdplOJv6bSnxUP dhZzNkm/eOzRA5lwz/+MNh18FN9IO39MGFyaA9QIrIa33KwReuS5jVPrwEvmzpbWyB7P hNrZd0UjUMBAxG1y1ADfhqDGe8qBFpAtureYaUA97FJ9jI597eR7NPCuvUiBjE3/+IP8 63wuVDlIGVrHo3AnqQe6mjXSdQECPkhZftK3S6xoRs1jC3n3vwz7F12b4JkiKPLXHjpJ 670/acWauxIQXdE/dRyOGdQL32PfIozV4wKmpKYeeH41phReD/kYG/SprCrwXpbINCvx x8Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aHPcBfuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s29si6588928eds.473.2020.11.27.21.13.49; Fri, 27 Nov 2020 21:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aHPcBfuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726010AbgK1FIc (ORCPT + 99 others); Sat, 28 Nov 2020 00:08:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbgK1FE6 (ORCPT ); Sat, 28 Nov 2020 00:04:58 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 830AEC0613D1; Fri, 27 Nov 2020 21:04:46 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id t37so5829175pga.7; Fri, 27 Nov 2020 21:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1wR2Kvfb5vjG8T/PCijsWnV5/Q6MbpEzV8Vjtc0CiDc=; b=aHPcBfuVBnDc/UEbN7yMv5xeqS+GxfQGwavrxwH6cH4XS0raWlwle2tQKxQSUKmkN+ ovcJzX6Y4PIz6fLFX2fxop62ys7QHTYbs/aY0kduavQ4HiA+m210l88xCcG0TrY0B0Xm lmQmrOENCW7G94Z2pZ765mi4uQqb1a7HPz8pyLn5vMtocTqCSfmnnk/Qri7m5VnMkItZ ovINqEOaUi17LvC+LfoKIOhByqt8svCwXXmEgQ6cvZdzzygDmK09fMWf0iGCniTz4F8e rHIvaVcboSMS+SweQeAfQOyp0TC1iUkw4teva/lt5tG2QUOiG9S7raHKEdoWNtD4Rv8D 7onA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1wR2Kvfb5vjG8T/PCijsWnV5/Q6MbpEzV8Vjtc0CiDc=; b=VCaUBwWUK4LqxWUIkXjKGsHDLPvhoYrPqfdef8hP2ypjX0Pawy0Ft1NgWklxM/XSTi lZzCSRSrbJmghyX6PUjpzhQqzHk1zMN9HX3YvtUZ+iU4bRtnPANREHeIAPiUZ3UXTN6u bN7XnpdVIFuD4hDf/yJnSByNUwxDAfmXV6j6wXMQ7T/+xMfbPFeWzxsuwkQAmQ3AO+jM IhEaP9i3+iwXozU4O5gW9O8jYwGN/yyKreIAqfzkxe+ryapyagmH2lXz1rE7cESgj96W zVoj4jklusQtKxSFDp90Q35uJF/I53/HujNXshyOBAtoLKY/dCRN8kdw6PdfWa4bCTyO YDFw== X-Gm-Message-State: AOAM530K1J7lQ2Tx+wX7980RyoNr8EY/htsoFgq8sZ3gsocogCLgjQx0 qOTyeT0h/OvnjBFRLK9be+s= X-Received: by 2002:a17:90a:e386:: with SMTP id b6mr2978528pjz.134.1606539886076; Fri, 27 Nov 2020 21:04:46 -0800 (PST) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id p14sm13192489pjo.53.2020.11.27.21.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 21:04:44 -0800 (PST) Date: Sat, 28 Nov 2020 14:04:42 +0900 From: Sergey Senozhatsky To: Tomasz Figa Cc: Sergey Senozhatsky , Hans Verkuil , Marek Szyprowski , Mauro Carvalho Chehab , Linux Media Mailing List , Linux Kernel Mailing List , Sergey Senozhatsky Subject: Re: [PATCH] media: vb2: always set buffer cache sync hints Message-ID: References: <20201127094136.1051071-1-sergey.senozhatsky@gmail.com> <0dbfa509-8c82-7470-c18b-24ab5c92dc4b@xs4all.nl> <509cc69b-39d7-4b13-f392-ebf25530c8fe@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/11/28 01:50), Tomasz Figa wrote: > On Sat, Nov 28, 2020 at 1:35 AM Sergey Senozhatsky > wrote: > > > > On (20/11/27 15:56), Hans Verkuil wrote: > > > Yes. > > > > > > BTW, wouldn't it be sufficient to change this code to: > > > > > > if (!q->allow_cache_hints && q->memory != VB2_MEMORY_DMABUF) { > > > vb->need_cache_sync_on_prepare = 1; > > > vb->need_cache_sync_on_finish = 1; > > > } > > > > I think it would be sufficient. > > Does it matter at this point if allow_cache_hints is set or not? That's a good question. I'd say that it'll probably make sense to set need_cache_sync for as many buffers as possible, regardless the queue configuration (except for ->memory type), just to stay on the safe side. I can spin another patch version. -ss