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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB3A2ECAAD1 for ; Tue, 30 Aug 2022 18:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbiH3SXn (ORCPT ); Tue, 30 Aug 2022 14:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbiH3SXh (ORCPT ); Tue, 30 Aug 2022 14:23:37 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30783481EB; Tue, 30 Aug 2022 11:23:35 -0700 (PDT) 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 Cc: "Bajjuri, Praneeth" , airlied@linux.ie, Tomi Valkeinen , merlijn@wizzup.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tony@atomide.com, linux-omap@vger.kernel.org, Sumit Semwal 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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