From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12829C433E0 for ; Thu, 11 Mar 2021 12:30:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B899864FE2 for ; Thu, 11 Mar 2021 12:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233061AbhCKMaC (ORCPT ); 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.