Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp307432pxf; Thu, 11 Mar 2021 04:31:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM711Z2ond2ZmpEIq8vwPTprjszOGXS08+WuWvdWpwkXRJKgTGRwmvVxGmOXq5XNriQ0tJ X-Received: by 2002:aa7:d1cd:: with SMTP id g13mr8204369edp.369.1615465893698; Thu, 11 Mar 2021 04:31:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615465893; cv=none; d=google.com; s=arc-20160816; b=td+T2c6FNGn/TzG0rA2YdddnltzKYvD/e5EPhVBPJ/C4KkmEYzW5USSIOGbQrRvvLt is5hpM92a+hsCgMuOSEQ0xtan909eF4QMcPnbQmmROGaooCuMAGGLY2sa3MkSnhipeDJ yOHGZAI0llE0prrOWfiNkUUY1GBXM90xLmBwOI4jcGLUqs4KtHWWNpxtOjU7/b/Qpj7O PyLdOGoHzIVPYL4O27LEQi+2rBpqXppy7qjkvm2XJ6kFg4F99gsCFlSqfBUh443OFpaB KBcvwFfP6W68U7FtcOR9rMl32WHhbPeZapRpADg4qMaCUwdSLgSHyXaV5Pumi78kkeUh l/Cw== 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=Fw9Oe2NoViifBKrF8ZRFWH2mNOhfvyMxIi7quHv4ySw=; b=Pnx5WALREyY7H6JNq9Mo2fC+ifHuoB5Gr503FuO5Cl2NFUnbkMHMtkxPS+ykfLIT68 DcvM0Xa/9M1CP1bovjzBvwDxhOzzo1dHzHmWdBOTBKD2GAlEpZAa0fhyBEm+eUfQ9zBp X5jmsXzqlm2ABmudwxpZssg2t9DxwR9gdIoDtdhzNEsNWxFo9RKcwRqT2apyj6IutgJj GRXXskyV83iEJ071dkd4iVW+NYVeY5Uav5l6CmFw/WEZ8iJ6908A9g6ux5yZwJdMiQRX q+KWMVhH6kJ5xtYwgtY1uib80I40F0kJLH5IR22TpICBYx0rwf/ifc9HilrqAN6LoHhJ Ruyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZUsRH+IC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si1531520ejr.511.2021.03.11.04.31.11; Thu, 11 Mar 2021 04:31:33 -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=@infradead.org header.s=casper.20170209 header.b=ZUsRH+IC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbhCKMaC (ORCPT + 99 others); Thu, 11 Mar 2021 07:30:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232850AbhCKM3a (ORCPT ); Thu, 11 Mar 2021 07:29:30 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED314C061574; Thu, 11 Mar 2021 04:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Fw9Oe2NoViifBKrF8ZRFWH2mNOhfvyMxIi7quHv4ySw=; b=ZUsRH+ICX4De04o7mGT3YC59jz h4+GBZl+8QAWL3vOkAOnoGsujndsYZuSCC/8Nqe5jYpFWR8+D3STwgqCSY56+dVR0oMwLIDnh0InR wEKAcTAGjN4+xtijAduqy89PqK1QM7226ybshs1SS+/BpGtyY0ZunLY39bvh57Yy7pq7oZWF0BLiq Kzdm8knOW6DaAJ+yK7tl0OEkEHrYoheUVwSAfxEYeUH4eVAC8j3xUWYFgHcXHixGqa1lDyvk+Pxny w5MufRFNm2o/rOzg1+9o9DSXOfOnPHLXmIf31ZNXLhrLJe/wyBmslmxJX/9tq0hf8lxnBIcsIJYS8 g1sbMh+w==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lKKQo-007Iqu-9i; Thu, 11 Mar 2021 12:29:01 +0000 Date: Thu, 11 Mar 2021 12:28:46 +0000 From: Christoph Hellwig To: Paul Cercueil Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sam Ravnborg , od@zcrc.me, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH v2 4/5] drm: Add and export function drm_gem_cma_sync_data Message-ID: <20210311122846.GC1739082@infradead.org> References: <20210307202835.253907-1-paul@crapouillou.net> <20210307202835.253907-5-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210307202835.253907-5-paul@crapouillou.net> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 07, 2021 at 08:28:34PM +0000, Paul Cercueil wrote: > + drm_atomic_for_each_plane_damage(&iter, &clip) { > + for (i = 0; i < finfo->num_planes; i++) { > + daddr = drm_fb_cma_get_gem_addr(state->fb, state, i); > + > + /* Ignore x1/x2 values, invalidate complete lines */ > + offset = clip.y1 * state->fb->pitches[i]; > + > + dma_sync_single_for_device(dev, daddr + offset, > + (clip.y2 - clip.y1) * state->fb->pitches[i], > + DMA_TO_DEVICE); Are these helpers only ever used to transfer data to the device and never from it? If so please clearly document that.