Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1504921pxu; Fri, 27 Nov 2020 08:40:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB6JrlH9CSMAYrqrl/EUmr3S2OQco0yPZWGUcCiWmrXrxtpMn5WXK4aqY2iiMEP9yXjJFg X-Received: by 2002:a50:9ee6:: with SMTP id a93mr3524356edf.174.1606495232987; Fri, 27 Nov 2020 08:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606495232; cv=none; d=google.com; s=arc-20160816; b=sadfPeH6At4xnt++Uf0Ut4Hlq4V1nvoJ2rJpOVhXF03DO6u6HiD/Ba//MIyNmbUu/J ufh6RX40zR9ivJtB73o3PFzrRNJDh5zdVTiA195VnDWIjmWd/vUAxbn+rkPg8lcFECM0 8cZDbvGodXCVLXD+Yf2595yNXTBmXuMipicNcNCEQLOpgNfQTZQbLxJfEYEs1FfCHQr6 D8W3UVTUHENgepZnEW6+DIdtBucXkEIXyxlekNNyFPlYVWh1GCwBPewIOXqyr1HReWSB oycHo5E7+ugHJp2Flans+LnImOTkCJoQ7VnvXmmh61nr4oscbOlnWsUW/t49tJJ8wBtX PJ7A== 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=oeonf9+ssH3tiDFtNGxaIF9eFeoLL2QUF0mZX8JcTPU=; b=pIwgB2Gt6GSfUSj2lDyxtVdzRwwQwdlrKfkcywRbTLlO5nkR+GICd8R6fsMLIdjgJs XTtA61ZqRElpPf8icCMRK2Y1jluza5P4XT++u2Paj+twJIwzXGSLElfzy0eu7BQzjjBK yk8B2HmKbELbzEcrSImTGK2xe+zeC8xgMU3fIv+SnVVxFbnGkfC8SsmEnfr31lEESCWg K2LdhlbbF1u0muQE7WxDrsYWFwwMX5fO9j0egdIUlrXQCzrg8tlFTCSiGtUTtgHLWZAE VQba/4a2B6npavTyNlPlV/UfWr4bAIyjkB04aTcQ/VifWkNavsd9m3EfxcXdqLw6ts8R /elQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u5qG5Vuq; 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 cc10si6084850edb.156.2020.11.27.08.40.09; Fri, 27 Nov 2020 08:40:32 -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=u5qG5Vuq; 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 S1731507AbgK0Qft (ORCPT + 99 others); Fri, 27 Nov 2020 11:35:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731440AbgK0Qft (ORCPT ); Fri, 27 Nov 2020 11:35:49 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1144CC0613D1; Fri, 27 Nov 2020 08:35:49 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id w4so4705952pgg.13; Fri, 27 Nov 2020 08:35:49 -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=oeonf9+ssH3tiDFtNGxaIF9eFeoLL2QUF0mZX8JcTPU=; b=u5qG5VuqAze9SNNcnAbaUKVq1mkcdhDQWZM6B3QdZEl7iWEHODXsr8rpisnEYNdjRC S7jXTIe03qoBCAmKmp8gG6sdaPJTd09SObWlJ8gTHqdza5Ki4LK6T2BWVRKtk2OBRsFF PJ3boGvmfUsNNlvg58QC5VGBLRlamzW4piMxa8naYTcSrZHGcVtv8dCeOQInXNiEvr21 WM1/EZTauFRLacGMfrYjQFOZDwS5QflyeuD8xrXa9uW8riWHQSEyPHvnzfHJ5mPQMgDJ 5YcUrL+v2FYYOIJTRJinpVJ0vmMcAWW6FLdpnRld/u62AMycLSGZoE/MjrJIqdGPD9VL pYpQ== 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=oeonf9+ssH3tiDFtNGxaIF9eFeoLL2QUF0mZX8JcTPU=; b=qRyWqx4isHZBGA/A1YVpLNPYXmW8LKD8ZKsX8JO9nGS83+KZB71ZJ+6gLK7HFnA63z zFl+qCljylP1+jvkREnUSZtAVmMflZ80z0nbPgq8yc6k187jGECfaJElDqqDY8mdJc6D rttsmRbspdzO/MgcdKhabYz8LaBBRoIzhiFE6B5W8veMJABcbhPDdLoo0u76O4mGivcP stmENzff0oyKjrGbtGG/vWpqnusR+Z8Sibo8o2upwxVqjvmBJL+5fQrmczxPKcUZONei lRnL2AtDOd/6ODYW3cVWngFzA/iaaWXDtT+xLqtK8QolOcoIAopx9hFsl+XbD9VUybcE yLjg== X-Gm-Message-State: AOAM5315TiknG2nZIPooPpynSFaFGUh6fdzr5jJ6ojajqIJSE6St6o4V MU7QmMbHw+l4sEH9FJil4SM= X-Received: by 2002:a63:5845:: with SMTP id i5mr7290832pgm.355.1606494948492; Fri, 27 Nov 2020 08:35:48 -0800 (PST) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id u3sm8091620pfu.47.2020.11.27.08.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 08:35:47 -0800 (PST) Date: Sat, 28 Nov 2020 01:35:45 +0900 From: Sergey Senozhatsky To: Hans Verkuil Cc: Sergey Senozhatsky , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, 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: <509cc69b-39d7-4b13-f392-ebf25530c8fe@xs4all.nl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -ss