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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80B05ECAAA1 for ; Tue, 30 Aug 2022 18:23:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E709910E352; Tue, 30 Aug 2022 18:23:38 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id A3CCA10E352 for ; Tue, 30 Aug 2022 18:23:34 +0000 (UTC) Received: from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32465481; Tue, 30 Aug 2022 20:23:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661883812; bh=uH2RujtJW24+NlHEo7Rl1VvmvbNokKsSNH3cq36NFVY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ES4RuUJSw5KwsaRB8c5Tlc/rgSwzuSVDr6e4YUcSpkaRVlh7QrQCTMlP70R+oPWC6 ZJ3T2AmgdWAVAzpe5JCr4az83Rk5vjU1optGw7WzdkKpQ5LIaWgDGhEE1IxSvr1x4t +sljZmDmqSh4FCFo/8Tr7m/5o1uUdLOfVU7jYIxw= Message-ID: Date: Tue, 30 Aug 2022 21:23:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 3/3] drm: omapdrm: Do no allocate non-scanout GEMs through DMM/TILER Content-Language: en-US To: Ivaylo Dimitrov , Yongqin Liu , Andrew Davis References: <1642587791-13222-1-git-send-email-ivo.g.dimitrov.75@gmail.com> <1642587791-13222-4-git-send-email-ivo.g.dimitrov.75@gmail.com> <5b6d3e7f-c638-fdc7-5080-44d34abed610@ideasonboard.com> <4128aed0-211a-d12a-6a86-deb4457d39f7@gmail.com> <235621d0-2141-5ef9-bcd4-5c48b985b3a0@gmail.com> <5dc2c212-4967-ab2d-c016-f3b3a854fe32@ti.com> <0eb026d9-faaa-68cb-cdcd-7d031acfbb03@gmail.com> From: Tomi Valkeinen In-Reply-To: <0eb026d9-faaa-68cb-cdcd-7d031acfbb03@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Bajjuri, Praneeth" , Tomi Valkeinen , merlijn@wizzup.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, tony@atomide.com, linux-omap@vger.kernel.org, Sumit Semwal Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 30/08/2022 21:08, Ivaylo Dimitrov wrote: >>>          flags &= ~OMAP_BO_TILED_MASK; >>>          flags |= 0x00000008; >>>          flags |= OMAP_BO_WC; >>> >>>          bo = omap_bo_new(dev, size, flags); >>> >>> As you can see we use 0x00000008 (OMAP_BO_MEM_CONTIG) unconditionally. >>> This was a hack added since even non-scanout buffers sometimes need >>> to be contiguous (video decoder surfaces), but we had no way back > > Hmm, why would video decoder need linear memory? No MMU? Not sure about this case, but many/most IPs don't have MMU. E.g. CSI-2 or parallel capture. >>> If you tell me what the code should look like, I can rebuild the >>> lib and post a copy. >>> >>> Long term, I'd like to start using DMA-BUF Heaps for CMA memory >>> allocations in gralloc and elsewhere, then drop out the DMM/TILER >>> support from OMAPDRM, since it never really belonged there in >>> the first place (being a IOMMU unrelated to the display/GPU). >>> > > Umm, how will we rotate scanout buffers then? Didn't we discuss this earlier in this thread. Or some other thread. Related to VRFB... I'm not sure =). Anyway, neither VRFB nor DMM/TILER are part of the DSS. They're part of the memory subsystem. They can be used without DSS being in the setup. Thus the code for VRFB and DMM/TILER should not be in the DSS driver. The DSS driver should still, of course, support DMM/TILER (and maybe VRFB some day) in the "use" sense, i.e. so that DSS can use the DMM/TILER provided from another driver. But how exactly that's to be implemented, I don't know. Tomi